While the sample code shows that it is possible to get the SDK access token required for the subsequent login process by directly specifying the SecretID and SecretSign in the client code, don't use this approach when you develop your own app. To ensure system security, get the SDK access token by posting a Get SDK access token request from your application server to the RoomKit server.
Download the RoomKit sample code.
Open Terminal, go to the directory where the Podfile is located, and run the command
pod repo update to update the local dependency library index. This step may take a while ( about 3 to 20 minutes) to complete, depending on your network condition,
Run the command
pod install and wait for all the dependent libraries to be downloaded (the size of RoomKit related SDKs is about 300 MB).
Double-click the file
ZegoRoomkitDemo.xcworkspace in the unzipped folder.
Change the bundle identifier and signing certificate.
a. In the Xcode project navigator, click the project ZegoRoomkitDemo.
b. Select the target ZegoRoomkitDemo, click Signing & Capabilities, then under Signing, choose your team from the Team pop-up menu, and change Bundle Identifier and App Groups to your own value. Repeat the same steps for the extension target ZegoRoomkitDemoScreenShare.
For the target ZegoRoomkitDemo, change the settings as indicated below:
For the extension target ZegoRoomkitDemoScreenShare, change the settings as indicated below:
Modify the source file
Specify the values of the parameters that are required for initializing the RoomKit SDK, including
kProductID. You must use the values you obtained according to the procedure mentioned in the Prerequisites section above. Otherwise, the sample code will not run correctly.
Connect the iOS device to your development computer. Then, from the scheme menu in the Xcode toolbar, choose the connected iOS device (or an iOS simulator) as the run destination.
Click the Run button in the toolbar to build and run the sample code.