Get Gimbal up and running in your iOS App.
The following steps will set up an application in Xcode ready for enabling Gimbal features.
Make sure you are:
In Xcode choose File > New > Project
and create a new Application
Having trouble adding these to your project? Here's some help
Important Right click the Frameworks folder and choose the "Add files to ..." option to add these frameworks.
It is strongly recommended to add the Gimbal Frameworks using this method to ensure that the Target Membership checkbox is enabled properly. If an alternate method is used, then the Target Membership of the frameworks must be verified and checked.
Note You will find these frameworks in the
Frameworks
folder inside the Gimbal SDK zip file.
Your frameworks directory should now look like this:
For each Gimbal Framework, verify the Target Membership checkbox is set:
Verify your deployment target matches the iOS version of your device:
Follow the link below to create your application in Manager.
Bundle Identifier is needed when you register your application. For example bundle identifier is generated during Xcode project creation
Once your application is created the generated API key will be available.
Copy API key you generated in the Gimbal Manager
Create a plist file named UserContext.plist
in your project and add the following
properties. Insert your production api key for key PRODUCTION_API_KEY as shown below.
Add this code to the top of your AppDelegate implementation (.m) file.
#import <ContextCore/QLContextCoreConnector.h>
Add this code to your application: didFinishLaunchingWithOptions:
method in your AppDelegate.
QLContextCoreConnector *connector = [QLContextCoreConnector new]; [connector enableFromViewController:self.window.rootViewController success:^ { NSLog(@"Gimbal enabled"); } failure:^(NSError *error) { NSLog(@"Failed to initialize gimbal %@", error); }];
Important The location of this code in your
application will
depend on your design and intended usage of Gimbal. For the purpose of demonstrating how to quickly
get an application functioning we have placed it in the AppDelegate
For additional details on how to leverage the SDK functionality, refer to the sample applications and documentation included in the zip file provided.