All Products
Search
Document Center

:Build the short video client for iOS

Last Updated:Apr 11, 2025

This topic describes how to build the short video client for iOS.

Prepare the environment

Environment

Description

System version

iOS 9.0 or later is supported.

iPhone

iPhone 5 or later is supported.

CPU architecture

The ARM64, ARMv7, and ARMv7s architectures are supported for physical devices. Simulator architectures are not supported.

Xcode

Xcode 9.0 or later is supported. Download Xcode.

Prerequisites

Procedure

  1. Download the short video demo and decompress the package. For more information, see SDK overview and download.

    Directory structure:

    - demo  
          - |- AlivcCommon      # The public component.
          - |- AlivcCore        # The public component of the short video service.
          - |- AlivcCrop        # The component that contains the code used to implement the cropping UI.
          - |- AlivcEdit        # The component that contains the code used to implement the editing UI.
          - |- AlivcRecord      # The component that contains the code used to implement the recording UI.
          - |- AlivcSmartVideo  # The component of the short video service.
          - |- AliyunVideoClient_Entrance    # The project entry file of the short video service.
    - doc  # The related documentations.
    - sdk  # The SDK that is used by the project. You can manually import an SDK as needed.
    - xxxReleaseNote.md  # The release note.
  2. Import and configure the project.

    1. Open Xcode and click Open a project or file. Then, double-click the AliyunVideoClient_Entrance.xcworkspace file in the demo directory.

      打开

    2. Specify the server address.

      File path: demo/AlivcCommon/AlivcCommon/Classes/Macro/AlivcDefine.m.

      After you build the short video AppServer on an Elastic Compute Service (ECS) instance, set the kAlivcQuUrlString variable in the file to the public IP address of the ECS instance followed by the port number 8080.

      Example: http://<Public IP address of the ECS instance>:8080.

      Ip地址

  3. Modify the Bundle Identifier and Signing Certificate parameters.

    Important

    Change the Bundle Identifier parameter to com.<Comany name>.<Project name>. This helps avoid running failures caused by registered bundle IDs.

    The value of the Bundle Identifier parameter must be defined in the package_name parameter in the profile of your short video AppServer. Assume that you do not set the Bundle Identifier parameter on the short video AppServer. When your application runs on the short video client for iOS, the bundle ID interceptor that is deployed on the short video AppServer intercepts the bundle ID of the application. As a result, a 403 error with the "Request failed:forbidden" error message is returned when the application sends a request to the short video AppServer. For more information about how to set the Bundle Identifier parameter on the short video AppServer, see Build the short video AppServer.

    Modify the Bundle Identifier parameter on the General tab.修改General

    Modify the Signing Certificate parameter on the Sign & Capabilities tab.Sign

  4. On the Sign & Capabilities tab, select Automatically manage signing and set the Team parameter.

    1. Select an account from the Team drop-down list.

      选择Team

    2. If you do not have an account, click Add an Account to create one.

      添加

    3. Create an account.

      添加Team

    4. Select the created account from the Team drop-down list. Make sure that no error message appears after you add the signature.

  5. Compile and run the project.

    1. Select AlivcVoiceCallSoloClient as the target. Connect an iOS physical device to your computer by using a data cable. Select the physical device in Xcode, and then enable the developer mode in the system settings on the physical device.

    2. Click build and run.

    编译