Copy the two
framework files highlighted in red into your project, as shown in the following figure.
Currently, the upload module is highly coupled with the editing module. To directly use the demo source code of SmartVideo, you need to integrate the
import for editing module first. If you follow the procedure for integrating the
import for editing module, the code of video production and upload is also integrated.
Add the following reference to a
.pch file in your project:
If your project does not contain a
.pch file, you can copy the
PrefixHeader.pch file from the demo. Keep the preceding reference in the
.pch file and choose
TARGETS > Build Settings to configure the PCH file, as shown in the following figure.
Prefix Header: Enter the directory of the
PrefixHeader.pch file in your project, for example,
$(SRCROOT)/Your own directory/PrefixHeader.pch.
- Open the project and select the target. Choose
Other Linker Flags. Add the
Build Options. Set
Open the project and select the target. Choose
Linked Frameworks and Libraries. Click + to add the following system library:
Edit the Info.plist file and add the following fields to apply for the camera, album, and music access permissions:
* Privacy - NSCameraUsageDescription
* Privacy - NSPhotoLibraryAddUsageDescription
* Privacy - NSPhotoLibraryUsageDescription
* Privacy - NSAppleMusicUsageDescription
You can also add the following code to the source code of the Info.plist file:
The upload feature is dependent on the video editing feature. After you integrate the video editing feature, the relevant code is also copied into your project. In this case, you do not need to compile the navigation code. The upload module can be triggered following the editing process. For more information about the code of the upload SDK, see the AliyunUploadViewController.m file in the following directory: demo/AliyunVideoClient_Entrance/AlivcShortVideo/AlivcShortVideoFile/VideoPublish/Control/AliyunUploadViewController.m.