These docs are for v1.0. Click to read the latest docs for v2.0.

Initialize Smartech SDK

  1. Import Smartech SDK in AppDelegate.m or AppDelegate class.
#import <NetCorePush/NetCorePush.h>
import NetCorePush
  1. Setup the Smartech App ID and App Group.
NSString *const kSmartechAppID = @"APP ID THAT YOU GET FROM SMARTECH PANEL";
NSString *const kAppGroup = @"group.com.yourcompanyname.productname";
let kSmartechAppID = "APP ID THAT YOU GET FROM SMARTECH PANEL"
let kAppGroup = "group.com.yourcompanyname.productname"
  1. Call method to initialize Smartech SDK in didFinishLaunchingWithOptions
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //...
    [[NetCoreSharedManager sharedInstance] setUpAppGroup:kAppGroup];
    [[NetCoreSharedManager sharedInstance] handleApplicationLaunchEvent:launchOptions forApplicationId:kSmartechAppID];			        
   if (@available(iOS 10.0, *)) {
        [UNUserNotificationCenter currentNotificationCenter].delegate = self;
    } 
    [NetCorePushTaskManager sharedInstance].delegate = (id)self;
    //...
    return YES;
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    //...
    NetCoreSharedManager.sharedInstance().setUpAppGroup(kAppGroup)        
    NetCoreSharedManager.sharedInstance().handleApplicationLaunchEvent(launchOptions, forApplicationId: kSmartechAppID)
    NetCorePushTaskManager.sharedInstance().delegate = self
    if #available(iOS 10.0, *) {
            UNUserNotificationCenter.current().delegate = self
     }
    //...
    return true
}