Skip to main content

DeployGate SDK for iOS

To use advanced feature of DeployGate like crash reporting, remote logs, etc., you need to integrate SDK into your app.

You can complete integrating it by just adding a single line.

Preperation

You need to upload an app before integrating iOS SDK to generate an app-specific API key.

How to install

You can install iOS sdk through manual linking or CocoaPods.

CocoaPods

  1. Add the following code to your Podfile
pod "DeployGateSDK"
  1. Install iOS SDK via CocoaPods
$ pod install

Carthage

We are not supporting for now.

Manual linking

  1. Download DeployGate SDK

Download SDK from this link.

  1. Configure your project to link SDK

Unzip the downloaded zip file, and copy DeployGateSDK-embeddedframework to your project's Frameworks.

Add Framework

  1. Add SystemConfiguration.framework to your Libraries

Add SystemConfigurationFramework

Integrate to your project

Initialize DeployGate SDK

Add the following code to initialize DeployGate SDK on app boot.

// in AppDelegate.swift

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
DeployGateSDK
.sharedInstance()
.launchApplication(withAuthor: "USERNAME", key: "API_KEY")
return true
}
// in AppDelegate.m

#import <DeployGateSDK/DeployGateSDK.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[DeployGateSDK sharedInstance] launchApplicationWithAuthor:@"USERNAME" key:@"APK_KEY"];
return YES;
}
Values to be configuredDescription
USERNAMEA name of app owner
API_KEYA value which is shown in the app detail page

Additional steps only for Swift projects

You need to prepare Bridging-Header.h and import DeployGateSDK.

#import <DeployGateSDK/DeployGateSDK.h>

How to create Bridging-Header.h

Xcode will ask you to create Bridging Header when you create an Objective-C file.

Create Bridging-Header.hの作成

Okay, let's build and upload your app to DeployGate. Now you are ready to receive boot and crash report. If you want to use User Authorization and so on, please continue proceeding to next section.