Skip to content

TuSDK/Zogo_LiveDemo-tusdk-iOS

Repository files navigation

Zego Express Video Example Topics iOS (Objective-C)

English | 中文

Zego Express Video Example Topics iOS Demo (Objective-C)

Prepare the environment

Please ensure that the development environment meets the following technical requirements:

  • Xcode 6.0 or higher
  • iOS devices or simulators with iOS version no less than 8.0 and audio and video support (the real machine is recommended).
  • iOS device already connected to Internet

Download SDK

If the SDK ZegoExpressEngine.xcframework required to run the Demo project is missing from this Repository, you need to download it and place in the Libs folder of the Demo project

You can use Terminal to run the DownloadSDK.sh script in this directory, it will automatically download the latest SDK and move it to the corresponding directory.

Or, manually download the SDK from the URL below, unzip it and put the ZegoExpressEngine.xcframework under Libs

https://storage.zego.im/express/video/apple/zego-express-video-apple.zip

.
├── Libs
│   └── ZegoExpressEngine.xcframework
├── README_zh.md
├── README.md
├── ZegoExpressExample
└── ZegoExpressExample.xcodeproj

Running the sample code

  1. Install Xcode: Open AppStore, search Xcode, download and install.

  2. Open ZegoExpressExample.xcodeproj with Xcode.

    Open Xcode, and click File -> Open... in the upper left corner.

    Find the ZegoExpressExample.xcodeproj in the sample code folder downloaded and unzipped in the first step, and click Open.

  3. Sign in Apple ID account.

    Open Xcode, click Xcode -> Preference in the upper left corner, select the Account tab, click the + sign in the lower left corner, and select Apple ID.

    Enter your Apple ID and password to sign in.

  4. Modify Apple Developer Certificate.

    Open Xcode, click the ZegoExpressExample project in left side.

    Click on the Signing & Capabilities tab and select your developer certificate in Team.

  5. The appID , userID and token required for SDK initialization are missing from the downloaded Demo source. You should go to ZEGO Management Site apply for appID , userID and token. If you don't fill in the correct appID , userID and token, the source code will not run properly, so you need to modify ZGKeyCenter.m under the directory ZegoExpressExample/Helper to fill in the correct appID , userID and token.

    // Developers can get appID from admin console.
    // https://console.zego.im/dashboard
    // for example: 123456789;
    static unsigned int _appID = <#Enter your appID#>;
    
    // Developers should customize a user ID.
    // for example: @"zego_benjamin";
    static NSString *_userID = @"<#Enter your userID#>";
    
    // Developers can get token from admin console.
    // https://console.zego.im/dashboard
    // Note: The user ID used to generate the token needs to be the same as the userID filled in above!
    // for example: @"04AAAAAxxxxxxxxxxxxxx";
    static NSString *_token = @"<#Enter your token#>";
    
  6. Connect your iOS device to the computer, click 🔨 Generic iOS Device in the upper left corner of Xcode to select the iOS device (or Simulator)

  7. Click the Build button to compile and run.

FAQ

  1. The app ID "im.zego.ZegoExpressExample" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.

    Refer to Modify Bundle Identifier and Apple Developer Certificate above, switch to your own development certificate in Targets -> Signing & Capabilities and modify Bundle Identifier before running.

  2. dyld: Library not loaded

    This is bug of iOS 13.3.1, please upgrade to iOS 13.4 or above.

About

涂图美颜对接即构音视频iOD端

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published