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
- Add the following code to your Podfile
pod "DeployGateSDK"
- Install iOS SDK via CocoaPods
$ pod install
Carthage
We are not supporting for now.
Manual linking
- Download DeployGate SDK
Download SDK from this link.
- Configure your project to link SDK
Unzip the downloaded zip file, and copy DeployGateSDK-embeddedframework to your project's Frameworks.
- Add SystemConfiguration.framework to your Libraries
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 configured | Description |
---|---|
USERNAME | A name of app owner |
API_KEY | A 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.
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.