Coder Social home page Coder Social logo

lemon-ios's Introduction

Lemon Video iOS SDK

简介

该SDK中包含 lemonsdk、pptvsdk、libTVEngine、VenvyVideoSDK 四个SDK(libTVEngine、VenvyVideoSDK这两个是zip压缩文件,需要解压),SDK接入说明文档,monkeyDemo 是一个SDK接入的demo,可以运行查看SDK接入效果。

接入环境要求及配置

  • 设备要求:iPhone 4S以上;系统要求:iOS7.0以上。运行环境:支持真机运行。
  • 添加所需支持库:将 LemonSDK_v1.0.0 中的SDK导入到项目中,添加下面所列依赖库
    libc++.1.tbd, libiconv.tbd, libz.tbd, libxml2.tbd, libsqlite3.0.tbd, libstdc++.6.tbd, libstdc++.tbd, libbz2.tbd, libobjc.A.tbd, CoreTelephony.framework, SystemConfiguration.framework, OpenGLES.framework, QuartzCore.framework, Accelerate.framework, AudioToolbox.framework, CoreAudio.framework, MediaPlayer.framework, AdSupport.framework, AVFoundation.framework, CoreMedia.framework, WebKit.framework, MobileCoreServices.framework, Security.framework, CoreMotion.framework, CFNetwork.framework, CoreGraphics.framework, CoreText.framework, CoreLocation.framework, UIKit.framework
  • Other Linker Flags 设置为 –ObjC
  • Info.plist中需要添加View controller-based status bar appearance,值为NO
  • 不能使用bitcode,设置为no
  • 在info plist中增加以下字段以便可以发送http请求:
    <key>NSAppTransportSecurity</key> <dict>
    <key>NSAllowsArbitraryLoads</key><true/> </dict>

接入方法

  • 初始化SDK:联系柠檬运营提供相应的APP包名申请渠道key:SecretKey ,应用key:AppKey,播放器的key:vvAppKey; 在工程的AppDelegate.m 文件中引入头文件
  #import <VenvyVideoSDK/VenvyVideoSDK.h><br>
  #import <LemonSDK/LemonSDK.h>
  配置申请的相关key:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      //Override point for customization after application launch.
      ……
      
      //注册appkey和渠道key,向柠檬方运营获取
      [NMRegisterSDK registerSdkWithAppKey:@"应用key" secretKey:@"渠道key"];
      //设置播放器的APPKey,必须要设置的,通过运营部想柠檬方运营获取
      [VenvyVideoSDK setAppKey:@"NJgVo3B8-"];//设置vvAppKey
    
      //设置 登录页面, 用于跳转登录
      [NMRegisterSDK loginViewController:[LoginViewController class]];
      //设置 选择支付方式页面, 用于调用支付时跳转
      [NMRegisterSDK payViewController:[PayViewController class]];

      ……

      return YES;

}
  • SDK的使用 在app登录成功后调用柠檬的同步用户接口,传入用户手机号、昵称、头像路径,如果是游客,可传空值。 引入头文件 #import <LemonSDK/LemonSDK.h>
    ……
    
      [NMRegisterSDK checkAndUpdateUserWithMobile:@“手机号” nickName:@“昵称” faceUrl:@“头像” success:^(BOOL checkSuccess, NSError *error) {        //手机号、昵称是必填的
          if (checkSuccess) {
              NSLog(@"success");
          } else {
              NSLog(@"error");
          }
      }];
    
      ……
    进入柠檬影视模块主页,在柠檬影视模块入口处调用方法:
    ……
    
      [NMRegisterSDK loadViewController:self];
    
    ……

用到的第三方框架及版本

AFNetworking-3.0.4以上、MJExtension-3.0.10以上、MJRefresh-3.1.0以上、SDWebImage-3.7.5以上、MBProgressHUD
影视模块内部有用到友盟统计进行统计相关数据,需要导入友盟SDK,当前用到的版本是v4.0.4。

lemon-ios's People

Contributors

lemonwei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.