Skip to end of metadata
Go to start of metadata

Version 1.2.4

This is Phunware's iOS SDK for the Analytics module. Visit for more details and to sign up.


  • MaaS Core v1.3.0 or greater
  • iOS 6.0 or greater
  • Xcode 6 or greater

Getting Started

  • Download MaaS Analytics and run the included sample app.
  • Continue reading below for installation and integration instructions.
  • Be sure to read the documentation for additional details.


The following frameworks are required:


MaaS Analytics has a dependency on MaaSCore.framework, which is available here: Core SDK

It's recommended that you add the MaaS frameworks to the 'Vendor/Phunware' directory. This directory should contain MaaSCore.framework and MaaSAnalytics.framework, as well as any other MaaS frameworks that you are using.


Documentation is included in the Documents folder in the repository as both HTML and as a .docset. You can also find the latest documentation here: Analytics API Reference (iOS)


You'll need to import the MaaSAnalytics.framework wherever you'd like to add analytic events. You may want to include it in your Prefix.pch.

#import <MaaSAnalytics/MaaSAnalytics.h>

Inside your application delegate, initialize MaaSCore in the application:didFinishLaunchingWithOptions: method. For more detailed MaaSCore installation instructions, please see: Core SDK Integration Guide (iOS) > Installation

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    // These values can be found for your application in the MaaS portal:
    [MaaSCore setApplicationID:@"APPLICATION_ID"
                 encryptionKey:@"ENCRYPT_KEY"]; // Currently unused. You can place any NSString value here.

Adding Events

To add events with MaaS Analytics:

- (void)viewWillAppear:(BOOL)animated 
	[super viewWillAppear:animated];

	[MaaSAnalytics addEvent:@"Featured Page View"];

Timed Events

MaaS Analytics supports timed analytics:

- (void)startLevel:(PWGameLevel *)level 
	// Start a timed event like so: 
	[MaaSAnalytics startTimedEvent:@"My Awesome Game - Level 1"]; 

- (void)endLevel:(PWGameLevel *)level
	// And end a timed event like so: 
	[MaaSAnalytics endTimedEvent:@"My Awesome Game - Level 1"]; 

Event Parameters

MaaS Analytics allows you to paramaterize your all of your events with up to 10 key / value pairs. All parameter keys and values must be alphanumeric strings.

- (void)viewWillAppear:(BOOL)animated
	[super viewWillAppear:animated];
	[MaaSAnalytics addEvent:@"Featured Page View" withParamaters:@{@"gender" : @"male"}];
	[MaaSAnalytics addEvent:@"My Awesome Game - Level 1" withParameters:@{@"difficulty" : @"easy"}];
	// Keep in mind that calling endTimedEvent:withParameters will replace any parameters that you specified in startTimedEvent:withParameters.
	[MaaSAnalytics endTimedEvent:@"My Awesome Game - Level 1" withParameters:@{@"difficulty" : @"easy", @"attempts" : @"5"}];


  • No labels