Manual install
Updated
Install the Signaling SDK for your platform, using a package manager or a downloaded package.
To manually install the Signaling SDK for iOS, do one of the following:
Automatically integrate the SDK with CocoaPods
-
In Terminal, navigate to the project path, and run the
pod initcommand to create aPodfilein the project folder. -
Open the
Podfile, delete all contents, and input the following code:target 'Your App' do use_frameworks! pod 'AgoraRtm_iOS' end -
Replace
Your Appwith the target name of your project. -
Go back to Terminal, and run the
pod updatecommand to update the local libraries. -
Run the
pod installcommand to install the Signaling SDK. Once you successfully install the SDK, it showsPod installation complete!in Terminal, and you can see anxcworkspacefile in the project folder. -
Open the generated
xcworkspacefile.
Manually add the SDK files
v1.4.4 or later
iOS apps integrated with Signaling SDK v1.4.4 cannot be published on the App Store due to review issues. If you want to publish your app on the App Store, you must use other versions of the SDK.
-
Extract the files in Signaling SDK to a local folder.
-
Copy
AgoraRtmKit.xcframeworkfrom the SDK to your project. -
Open Xcode, and navigate to TARGETS > Project Name > General > Frameworks, Libraries, and Embedded Content.
-
Click + > Add Other... > Add Files to add the corresponding library. Ensure that the Embed attribute of the dynamic library is Embed & Sign.
Once the dynamic library is added, the project automatically links to other system libraries.
The SDK uses the XCFramework. If you are using a build tool that does not support XCFramework integration, Agora provides the following scripts to help you integrate:
- Use the
change_to_all_arch.shscript to convert the XCFramework to the universal framework. - If you need to publish an iOS app on the App Store, use the
remove_simulator_arch.shscript to remove the simulator before packaging the app.
The steps to execute these scripts are as follows:
-
Copy the above script files to your project, and execute the following code to generate
AgoraRtmKit.framework:sh change_to_all_arch.sh "<AgoraRtmKit.xcframework path>" sh remove_simulator_arch.sh "<AgoraRtmKit.framework path>" -
In Xcode, go to the TARGETS > Project Name > Build Phases > Link Binary with Libraries menu, and click + to add
AgoraRtmKit.xcframework. Ensure that the Embed attribute of the dynamic library is Embed & Sign.
Earlier than v1.4.4
-
Copy the
AgoraRtmKit.frameworkfile in thelibsfolder to the project folder. -
In Xcode, go to the TARGETS > Project Name > Build Phases > Link Binary with Libraries menu, and click + to add the following frameworks and libraries. To add the
AgoraRtmKit.frameworkfile, remember to click Add Other... after clicking +.AgoraRtmKit.frameworklibc++.tbdlibresolv.tbdSystemConfiguration.frameworkCoreTelephony.framework
