Please follow the steps below to integrate Quixxi Analytics SDK to iOS applications:

  1. Create a new app in Quixxi Portal using Add New button.
  2. In "Create your app" dialog give a name of your application and click Continue
  3. Click the newly created app and choose "Control" in header tab and choose Package in left side menu.
  4. Click "Add Platform" and choose iOS and check Analytics in Select module option.
  5. Give proper package name for your application and hit "Start Packaging" .
    Let’s see how to setup Quixxi Analytics with your application in following steps.
  6. In your Xcode project drag and drop the QuixxiAnalytics.framework and QuixxiActivation.framework into your project.
  7. After adding the QuixxiActivation.framework, select Your Project target > Build phases-> Copy Bundle Resources-> add Quixxikeys.txt file from inside the activation framework.
  8. Under the general tab look for the embedded binaries, click the (+) plus button and choose the QuixxiAnalytics.framework and QuixxiActivation.framework.
  9. In your Xcode project drag and drop the(QuixxiAnalyticsLibraryiOS) folder into your project.
  10. In your Xcode project drag and drop the QuixxiActivation.framework you received to the library.
  11. To add the framework to the project, click on the Project and choose targets of your project and choose the general tab.
  12. Under the general tab look for the embedded binaries, click the (+) plus button and choose the QuixxiActivation.framework.
  13. After adding the QuixxiActivation.framework ,select build phase->copy bundle resource->add Quixxikeys.txt file from inside the activation framework.
  14. Select project and choose->build phase->link library and add “libsqlite3.0.tbd”.

Initialising the Quixxi Analytics SDK

        Initialise the Quixxi Analytics SDK, first import QuixxiAnalytics.h file in the Appdelegate.h.


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">-#import <QuixxiAnalytics/QuixxiAnalytics.h></span></span>


        Now add the following code to application:didFinishLaunchingWithOptions in AppDelegate.m file.


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">[[QuixxiAnalytics sharedAnalytics] startAnalytics];</span></span>


Sending events

        Include header file QuixxiAnalytics.h in the class ,where you are sending the event.


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">[[QuixxiAnalytics sharedAnalytics] addEventTitle:<Title>
   Description:<Description>
       withCompletion:^(NSString *resultString, NSError *error)
       {
       //Do something
       }];</span></span>


        title - a string unique identifier of your event

        description - a string describes your event value



<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">[[QuixxiAnalytics sharedAnalytics] addEventTitle:<Title>
           Description:<Description>
               EventDetail:<Event details>
                   EventInfo:<Event dictionary>
                       completion:^(NSString *resultString, NSError *error)
                       {
                       //Do something
                       }];</span></span>


            title - a string unique identifier of your event
            description - a string describes your event value
            eventdetail- a string additional value of event
            eventinfo-an object value, NSDictionary value

Example


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">NSDictionary *eventDictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"user@email.com",@"email",@"testuser",@"username", nil];

[[QuixxiAnalytics sharedAnalytics] addEventTitle:<Title>
                            Description:<Description>
                                EventDetail:<Event>
                                    EventInfo:<eventDictionary>
                                        withCompletion:^(NSString *resultString, NSError *error)
                                        {
                                        if(error==nil){
                                        NSLog(@"event sent");
                                        }else{
                                        NSLog(@"Error: %@",[error localizedDescription]);
                                        }
                                        }];</span></span>



Update User Email


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">[[QuixxiAnalytics sharedAnalytics] setEmail:<EmailId>];</span></span>


EmailId - Update user mail id


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">[[QuixxiAnalytics sharedAnalytics] setEmail:@“test@gmail.com”];</span></span>