SDK接入指南

MMVideoSDK提供两种方式供iOS开发者选择。

  • 通过cocoaspods (推荐)
  • 手动接入

1. 通过cocoapods接入

在工程的Podfile添加以下代码:

source  'https://github.com/cosmos33/MMSpecs.git'

use_frameworks!

pod 'MMVideoSDK', '2.5.0'
pod 'MMMedia','2.5.0'
pod 'MMCV','3.0.0-s'

保存并执行pod install

2. 手动接入

  • 下载MMVideoSDK MMFramework文件夹下为拍摄器SDK,GPUImage,KVOController,Mantle,MetalPetal,ZipArchive为依赖的三方库(可自行添加,或直接使用)。
  • Buile Settings -> Preprocessor Macros -> Bebug 和 Release 选项里添加 HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB MZ_ZIP_NO_SIGNING $(inherited)
  • Build Settings ->Other Linker Flags 添加 -ObjC

  • 拖拽 VideoSDK 到Xcode工程内(注意勾选Copy items if needs选项)

  • 添加依赖库:

    • ARKit.framework
    • AVFoundation.framework
    • CoreVideo.framework
    • CoreMedia.framework
    • CoreAudio.framework
    • CoreML.framework (optinal)
    • AssetsLibrary.framework
    • Vision.framework (optinal)
    • Accelerate.framework
    • Metal.framework
    • MetalKit.framework
    • CoreGraphic.framework
    • libz.tbd
    • libc++.tbd
    • libresolv.tbd
    • libiconv.tbd

3. 工程配置

  • 在info.plist中添加以下权限
* Privacy - Media Library Usage Description
* Privacy - Camera Usage Description
* Privacy - Microphone Usage Description
* Privacy - Photo Library Additions Usage Description
* Privacy - Photo Library Usage Description
  • 进入 EditScheme -> Run -> Options, 更改GPU Frame Capture 以及 Metal API Validation 均为 Disabled
  • 进入主工程build settings, 设置project以及targetEnable BitcodeNO

4. SDK使用

  • 导入头文件

在工程AppDelegate.m 文件导入头文件

    @import RecordSDK;
  • 初始化
    [MDRecordManager initSDK:@"此处替换为您的AppId"];
    if ([MDRecordManager isReady]) {
        [MDRecordManager fetchConfigUsingAppId];
    }

5. Demo下载地址

Copyright © momo 2019 all right reserved,powered by Gitbook修订时间: 2021-08-30 19:38:21

results matching ""

    No results matching ""