zoukankan      html  css  js  c++  java
  • DJI SDK iOS 开发之二:搭建主要的开发环境

    本文想介绍搭建主要的DJI SDK iOS下的开发环境,只是DJI官方已经给出了非常具体的执行其demo的教程。网址例如以下:
    https://dev.dji.com/cn/guide
    我这里总结一下搭建一个新的project的步骤:

    Step 1:注冊一个app
    这里写图片描写叙述

    这里的识别码和app密钥非常重要。DJI在这里做了限制。


    对于iOS开发来说。识别码就是project的bundle identifier。密钥则使用SDK在执行时对程序进行注冊。

    Step 2:建立project

    Step 3:导入DJISDK.Framework
    这个在下载的SDK中lib目录里面。
    这里写图片描写叙述
    还须要链接 libz.dylib这个库。

    Step 3:增加注冊代码

    AppDelegate.h
    #import <DJISDK/DJISDK.h>
    @interface AppDelegate : UIResponder <UIApplicationDelegate,DJIAppManagerDelegate>
    
    AppDelegate.mm
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.
        //Register App with key
        NSString* appKey = @"57ecf55facf5564967f33333";
        [DJIAppManager registerApp:appKey withDelegate:self];
    
        return YES;
    }
    
    - (void)appManagerDidRegisterWithError:(int)errorCode
    {
        NSString* message = @"Register App Successed!";
        if (errorCode != RegisterSuccess) {
            message = @"Register App Failed!";
        }
        UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Register App" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alertView show];
    }
    

    须要注意的是由于其SDK使用了c++。所以要把m后缀改成mm

    这样主要的project就能执行了。


    对于链接视频库。在官方文档中有具体介绍。这里不多讲。

    OK。这样我们就能够開始真正进行具体开发了。
    【注明:本文为原创文章,转载请注明出处:blog.csdn.net/songrotek】

  • 相关阅读:
    UVA10891
    UVA10453
    UVA 10201
    UVA10154
    UVA11137
    UVA10617
    UVA10271
    UVA10739
    UVA10306
    节流防抖
  • 原文地址:https://www.cnblogs.com/liguangsunls/p/7279219.html
Copyright © 2011-2022 走看看