This article wants to introduce the development environment under the basic DJI SDK iOS, but DJI has given a very detailed tutorial on how to run its demo, the following URL:
Https://dev.dji.com/cn/guide
Here I summarize the steps to build a new project:
Step 1: Register an App
The ID and app key are important. DJI has made restrictions here.
For iOS development, the identification code is the project bundle identifier. The key is used by the SDK to register the program at run time.
Step 2: Establish the project
Step 3: Import djisdk.framework
This is in the Lib folder of the downloaded SDK.
Also need to link libz.dylib this library.
Step 3: Join the registration code
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:Nilcancelbuttontitle:@"OK"Otherbuttontitles:Nil]; [Alertview show];}
Note that because the SDK uses C + +, you need to change the M suffix to mm
So the basic project will be able to run.
For the link video Library, in the official documents are detailed, here is not much to say.
OK, so that we can begin to actually develop the concrete.
"Note: This article is original article, reprint please indicate source: Blog.csdn.net/songrotek"
DJI SDK IOS Development II: Building a basic development environment