Access drops travel SDK

The company recently introduced app to SDK I saw drops of travel, the official website, no demo document is not complete, the online data are few. To solve a lot of pit after finally successfully access a bit of travel SDK, write down this blog I hope there is a need for peers to take some less detours.

Go to the official website to download SDK and documentation

After dropping open platform to download, you need to Appid and Secrect, these 2 need you and drops official contact to get

Register inside the AppDelegate drops

#import "AppDelegate.h" #import < DIOpenSDK/DIOpenSDK.h> @interface; AppDelegate (@end @implementation AppDelegate) - (BOOL) application: (UIApplication * application) didFinishLaunchingWithOptions: (NSDictionary * launchOptions) {[DIOpenSDK registerApp:@ "drops from the access to the appid" secret:@ "drops from access to secret"]; return YES;}

Configure plist file

There is a hole, there is no written document to add Required background modes a NSLocationAlwaysUsageDescription and this one, so the collapse of one click drops travel, there is also the enable code set to NO. we look at the comparison of my plist file configuration.

Access drops travel SDK

Implementation method in viewcontroller

#import "ViewController.h" #import < DIOpenSDK/DIOpenSDK.h> @interface; ViewController (<); DIOpenSDKDelegate> @property (nonatomic, strong) UIButton *didiButton; @end @implementation ViewController (void viewDidLoad) {[super viewDidLoad]; _didiButton [UIButton = buttonWithType:UIButtonTypeSystem]; _didiButton.frame = CGRectMake (100, 100, 200, 100); [self.didiButton setTitle:@ forState:0]; "drops of travel" [_didiButton addTarget:self action:@selector (buttonAction) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:_didiButton];} - (void buttonAction) {DIOpenSDKRegisterOptions *options = nil [DIOpenSDK showDDPage:self animated:YES params:options; delegate:self];}
Access drops travel SDK
record screen 2.gif

well, you can call the car. Today is here, I wish you happy every day