For Native Objective-C Project
Step 1: Import DzoSDK Kit Framework
Copy "dzoconfig.json" to Project Resource
Config for DZOGAME
"buildTarget": "DZOGAME",
"useMultiLanguage": 0,
"defaultLanguageID": "VI",
Adjust the position of the Age18+ icon and the Dzo icon on the screen:
Position default:
"posision_default":[{
"buttonDzoHome":"",
"tag18Plus":"",
}]
Customize the position with 8 anchor points:
- topLeft, topCenter, topRight
- centerLeft, centerRight
- bottomLeft, bottomCenter, bottomRight
Example:
"posision_default":[{
"buttonDzoHome":"centerRight",
"tag18Plus":"topLeft",
}]
Custom color for Purchase Confirm Dialog
Example:
"layout_dialog":[{
"color_title":"#000000",
"color_button_buy":"#FFFFFF",
"color_button_cancel":"#000000",
}]
Copy "GoogleService-Info.plist" to Project
Copy file translations.json to project for Multi-Language function
Step 2: Config Signing & Capabilites Xcode Targets / Project IOS Click + Capability
- Add Background modes, Enter
- Check Remote notifications
- Add Sign in with Apple
- Add Push Notification
Final config like this picture
Build Setting
Set Build Settings -> Apple Clang - Language – Objective-C -> Weak References in Manual Retain Release to YES.
Step 3: Config Appdelegate AppDelegate Objective-C - Init Connect SDK
-
Set Enviroment (Real/Test)
-
Set Debug mode view (Remove it when release)
-
Init connnect on didFinishLaunchingWithOptions
Import header on AppDelegate
#import <DzoSDK_Kit/DZOSDKCoreKit.h>
#import <DzoSDK_Kit/UserInfo.h>
// SDK DZO application instance
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[DZOSDKCoreKit sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
return YES;
}
// SDK DZO openURL sourceApplication
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
NSLog(@"TAG openURL");
[[DZOSDKCoreKit sharedInstance] application:application openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
// SDK DZO openURL Referistall
#pragma mark DZOSDK FB Login, Google Login
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
NSLog(@"TAG openURL options");
[[DZOSDKCoreKit sharedInstance] application:application openURL:url options:options];
NSLog(@"TAG openURL");
return YES;
}
// SDK DZO Pushnotification
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
NSLog(@"TAG didReceiveRemoteNotification");
[[DZOSDKCoreKit sharedInstance] application:application didReceiveRemoteNotification:userInfo
fetchCompletionHandler:completionHandler ];
}
// SDK DZO didRegisterForRemoteNotificationsWithDeviceToken
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSLog(@"TAG didRegisterForRemoteNotificationsWithDeviceToken");
[[DZOSDKCoreKit sharedInstance] application:application
didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
// SDK DZO userNotificationCenter
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler
{
NSLog(@"TAG userNotificationCenter willPresentNotification");
[[DZOSDKCoreKit sharedInstance] userNotificationCenter:center
willPresentNotification:notification
withCompletionHandler:completionHandler];
}
// SDK DZO userNotificationCenter
- (void) userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void(^)(void))completionHandler
{
NSLog(@"TAG userNotificationCenter didReceiveNotificationResponse");
[[DZOSDKCoreKit sharedInstance] userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
}
// SDK DZO application continueUserActivity
- (BOOL) application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *))restorationHandler
{
NSLog(@"TAG continueUserActivity");
[[DZOSDKCoreKit sharedInstance] application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
// SDK DZO applicationDidBecomeActive for Appflyer
- (void)applicationDidBecomeActive:(UIApplication *)application {
{
//Appflyer Config
[[DZOSDKCoreKit sharedInstance] applicationDidBecomeActive:application];
}
//Ver 2.19
#pragma mark DZOSDK Share detection
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[[DZOSDKCoreKit sharedInstance] applicationDidFinishLaunching:application];
}