Installing the Daily Client SDK and Daily System Broadcast for iOS
Minimum iOS version
The Daily Client SDK for iOS requires iOS ≥ 13.0.
Swift Package Manager
In Xcode, go to File -> Add Packages...
and enter the following URL in 'Search or Enter Package URL' textbox in the top right corner of that window:
https://github.com/daily-co/daily-client-ios
Pick the desired dependency rule (under “Dependency Rule”), as well as build target (under “Add to Project”) and click “Add Package”.
Note: If you intend to use screen sharing, please add both Products, Daily and DailySystemBroadcast. For more details, refer to daily-client-ios on GitHub.
Cocoapods
Add the following line to your Podfile file:
pod 'Daily', '~> 0.25.0'# In case you wish to add support for screen sharingpod 'DailySystemBroadcast', '~> 0.25.0'
At which point it might look something like this:
target 'MyApp' dopod 'Daily', '~> 0.25.0'# In case you wish to add support for screen sharingpod 'DailySystemBroadcast', '~> 0.25.0'end
App setup
You will need to update your project's Info.plist
to add three new entries with the following keys:
NSCameraUsageDescription
NSMicrophoneUsageDescription
UIBackgroundModes
For the first two key's values, provide user-facing strings explaining why your app is asking for camera and microphone access.
UIBackgroundModes
is handled slightly differently and will resolve to an array. For its first item, specify the value voip
. This ensures that audio will continue uninterrupted when your app is sent to the background.
To add the new entries through Xcode, open the Info.plist
and add the following three entries:
Key | Type | Value |
---|---|---|
Privacy - Camera Usage Description | String | "Daily Playground needs camera access to work" |
Privacy - Microphone Usage Description | String | "Daily Playground needs microphone access to work" |
Required background modes | Array | 1 item |
---> Item 0 | String | "App provides Voice over IP services" |
If you view the raw file contents of Info.plist, it should look like this:
<dict>...<key>NSCameraUsageDescription</key><string>Daily Playground needs camera access to work</string><key>NSMicrophoneUsageDescription</key><string>Daily Playground needs microphone access to work</string><key>UIBackgroundModes</key><array><string>voip</string><string>audio</string></array>...</dict>
To learn more about building an app with the Daily Client SDK for iOS, see our mobile SDK guide and iOS demo app.