documentation
Appsee Cocos2d-x (iOS) Integration Instructions
Objective-C
Swift
Objective-C
Swift
You can install the iOS SDK through CocoaPods (recommended) or manually.
-
Install CocoaPods if you don't already have it.
If you don't want to use CocoaPods, you can install Appsee manually. -
If this is your first pod, run
pod init
.
Addpod 'AppseeGL'
to the corresponding target in your Podfile and runpod install
. -
Add the following value to your Info.plist, right after the first <dict> (right click > "Open As" > "Source Code"):
<key>com.appsee.ApiKey</key>
Your API keys are available in the Appsee dashboard.
<string>YOUR API KEY</string>
You will need to register or login in order to view your API keys.
-
In ios/AppController.mm, include:
#import <Appsee/Appsee.h>
import Appsee
-
Add the following line in your application:didFinishLaunchingWithOptions: method:
[Appsee start];
Appsee.start()
-
In your project tree, go to libs/cocos2dx/platform/ios, and locate CCGLView.m (may be EAGLView.m in older versions) - and add the following header at the top of the file:
#import <Appsee/Appsee.h>
Locate the following line:
if(![context_ presentRenderbuffer:GL_RENDERBUFFER])
and add this line right BEFORE it:
[Appsee appendGLFrame:self];
- Optional but highly recommended: in order to seamlessly upload crash dSYM files, integrate the Appsee Build Script.
Important Note
Appsee uploads data only when the app is minimized to the background.If you are running from XCode do not stop the app, just press on the "home" button in order for data to be uploaded.
Now, launch your app, use it for a few seconds and minimize the app to the background.
Visit the dashboard to view your first tracked session.
What's next?
You can review the full API reference docs to customize your Appsee implementation.Here are a few important topics to review:
- Adding custom events
- Sending user information
- Customizing screen segmentation
- Blocking sensitive user data