Option 2 - Manual Integration - Swift for Appoxee Standalone
Goal
To add the SDK to your apps code by manual integration, preform the following steps.
Attention
This topic covers a manual method that gives you greater control, and lets you override behaviour. For an automatic (basic) process, see SDK Integration.
Prerequisites
Xcode application with a base SDK of iOS 10 and above.
Xcode application with a deployment target of iOS 8 and above.
An account on the Appoxee dashboard with a configured application.
Procedure
1. Download the SDK from Github.
2. Drag AppoxeeSDK.framework into you project, or use cocoapods see link “add mobile push sdk”
3. Add the following import statement to your Objective-C bridging header
#import <AppoxeeSDK/AppoxeeSDK.h>
4. Add the following delegate notation:
class AppDelegate: UIResponder, UIApplicationDelegate, AppoxeeNotificationDelegate {
/* Class code goes here */
}
5. Add the following implementation to the method named: application:didFinishLaunchingWithOptions:, Where, xxx.xxx represents the SDK ID. These were created for you with the Appoxee Dashboard:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Appoxee.shared()?.engageWithLaunchOptions(launchOptions, andDelegate: nil, andSDKID: "123456789.00")
return true
}
6. Add the following implementation to the method named: application:didRegisterForRemoteNotificationsWithDeviceToken:
7. Add the following implementation to the method named: application:didReceiveRemoteNotification:
8. Add the following implementation to the method named: application:didRegisterUserNotificationSettings:
9. OPTIONAL STEP - To implement iOS8 'Push Actions', add the following implementation to the method named: application:handleActionWithIdentifier:forRemoteNotification:completionHandler:
10. OPTIONAL STEP – Silent push
Please review the documentation provided with the SDK for the below methods :
11. OPTIONAL STEP - Appoxee delegate: