Legacy iOS SDK Installation
This page documents the legacy Objective-C OEG iOS SDK (OEGFramework.framework), which is in maintenance-only mode and will be removed in a future release.
New games must integrate SDK v2 only. Use this page only as a reference for existing iOS games already shipping with the legacy framework. No new features will be added here.
This page documents the Objective-C OEGFramework.framework integration used by existing iOS games.
What you need from OEG
OEGFramework.frameworkoeg_config.jsonorSDKConfig.plistGoogleService-Info.plistif you use Google/Firebase features- Social credentials for Facebook / Google as needed
Requirements
- iOS 13.0+
- Xcode 15+
- Host app written in Objective-C or Swift
Add the framework
- Drag
OEGFramework.frameworkinto your Xcode project. - In Target > General > Frameworks, Libraries, and Embedded Content, set it to Embed & Sign.
Add configuration
The legacy iOS SDK now loads config in this order:
oeg_config.jsonSDKConfig.plistfallback
If you are integrating a new build, prefer oeg_config.json.
Preferred: oeg_config.json
Add the file to your app target so it is copied into the main bundle.
{
"coreConfig": {
"gameId": 36,
"apiBaseUrl": "https://dev-api-sdk-game.oeg.vn/",
"debugEnv": true
},
"snsConfig": {
"google_server_client_id": "YOUR_GOOGLE_SERVER_CLIENT_ID",
"tiktok_client_key": "YOUR_TIKTOK_CLIENT_KEY"
}
}
Fallback: SDKConfig.plist
Keep SDKConfig.plist only if your game still depends on the older plist-based delivery.
Add required plist files
GoogleService-Info.plist
Add GoogleService-Info.plist to the app bundle if you use:
- Google sign-in
- Firebase messaging / push
Configure URL schemes
At minimum, add the callback schemes required by the providers your game enables.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fbYOUR_FACEBOOK_APP_ID</string>
<string>YOUR_REVERSED_GOOGLE_CLIENT_ID</string>
</array>
</dict>
</array>
If your game still uses TikTok on a private build, add the TikTok scheme and query schemes required by that provider as well.
Wire the app lifecycle
The legacy framework expects the host app to forward app delegate events.
#import <OEGFramework/OEGManager.h>
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[OEGManager handleDidFinishLaunchingWithOptions:launchOptions];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
[OEGManager handleWillResignActive];
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
[OEGManager handleDidEnterBackground];
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
[OEGManager handleWillEnterForeground];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[OEGManager handleDidBecomeActive];
}
- (void)applicationWillTerminate:(UIApplication *)application {
[OEGManager handleWillTerminate];
}
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[OEGManager handleDidRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
return [OEGManager handleOpenURL:url options:options];
}
Push notifications
The SDK can request notification authorization itself through:
[OEGManager registerForRemoteNotifications:[UIApplication sharedApplication]];
In most games this is already triggered by handleDidFinishLaunchingWithOptions:.
Quick smoke test
Once the framework is embedded and lifecycle forwarding is wired, present the login UI:
[[OEGManager sharedManager] showLoginWithCallback:^(OEGActionType type, id response, BOOL success, NSError *error) {
if (success) {
NSLog(@"Login success");
}
}];