> For the complete documentation index, see [llms.txt](https://docs.bridgefy.me/sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bridgefy.me/sdk/ios/installation.md).

# Installation

### Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

1. Follow the [Apple documentation](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app) on how to add a package to your project.
2. Paste the following URL, `https://github.com/bridgefy/sdk-ios`, into the Package Dependencies search bar.
3. Use the version-based Package Requirements, and set the value to the latest version of the Bridgefy SDK.

### Cocoapods

CocoaPods is a dependency manager that lets you add third-party frameworks and libraries to projects. For installation instructions, see [Install CocoaPods](https://guides.cocoapods.org/using/getting-started.html#toc_3).

Add the Bridgefy SDK to your Podfile and install it in your project as follows:

1. Add pod 'BridgefySDK' to the do block:

   ```swift
   platform :ios, '13.0'

   target 'SDK test' do
   use_frameworks!

   pod 'BridgefySDK'
   end
   ```
2. Save the Podfile.
3. Run the following command in the Terminal:

   ```sh
   $ pod install
   ```

### Manually

1. Download the `BridgefySDK.framework` from this repository.
2. Drag the `BridgefySDK.framework` folder to the top of your project's hierarchy in Xcode.

![](https://2522171645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XKIMMP6VF2l9XuPV80l%2Fuploads%2FgCrxDVIb1kxgyMiwXvAT%2FInstallation1B.png?alt=media\&token=f2f1e047-d5fe-4af8-b0d5-4d86e8571d23)

3. Select `Copy items if needed` from the dialog window after releasing the folder into your project.<br>

![](https://2522171645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XKIMMP6VF2l9XuPV80l%2Fuploads%2F8mZzHqr9BAsRiJf6xAo3%2FInstallation2B.png?alt=media\&token=bcbf3f86-cb7f-4886-af21-16f8c64074b2)

4. In the general section of your project's target, go to the section `Frameworks, Libraries and Embedded Content`, look for the `BridgefySDK.framework`, and in the `Embed` column, select the option ***Embed & Sign***

![](https://2522171645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XKIMMP6VF2l9XuPV80l%2Fuploads%2F7hi2jufG9YXCaALm9XzB%2FInstallation3B.png?alt=media\&token=123bda5f-d1e8-4fe1-96a0-6de721f33808)

5\. Import the Bridgefy SDK using the following code:

```swift
import BridgefySDK
```

### Permissions

The BridgefySDK requires permission to use the Bluetooth antenna of the devices where it's installed; to achieve this, you have to add a couple of entries on the `Info.plist` of your project. The entries are depicted in the following image:

![](https://2522171645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XKIMMP6VF2l9XuPV80l%2Fuploads%2FyDqxIb2UmWEeKXXEfXnP%2FPermissionsB.png?alt=media\&token=64590e6d-f299-4403-8a63-1b20c6250059)
