API Tracking for Apple apps

API Tracking for Apple apps

API Tracking is a part of Apptics' Analytics SDK which allows you to track the success rate and response time for the REST APIs configured in the Apptics web console. Refer to the user guide to configure APIs in the web console.

Installation

  1. source 'https://github.com/CocoaPods/Specs.git'
    
    target '[TARGET NAME]' do
      pod 'AppticsApiTracker'
    end
Import
Obj-C
  1. #import <AppticsApiTracker/AppticsApiTracker.h>
Swift
  1. import AppticsApiTracker

  1. Once the configuration is done in the web console, you will get an API ID.
  2. Add the API ID in the header field of your API call. If the API ID is not added in the API header field, we match the incoming URLs with all the URLs that you have configured in the web console.
  3. For enabling interception, add Apptics between your (NS)URLSession and internet. Register your session configuration (NS)URLSessionConfiguration) to Apptics using (enableApiTrackingForSessionConfiguration).

Use the below configuration with (NS)URLSession

Obj-C
  1. NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
    [APAPIManager enableForSesionConfiguration:configuration];
Swift
  1. let configuration = URLSessionConfiguration.default
    APAPIManager.enable(configuration)
  1. Use the above configuration with your (NS)URLSession.
Obj-C
  1. NSURLSession *session = [[NSURLSession alloc] initWithConfiguration:configuration];
Swift
  1. let session = URLSession(configuration: configuration)
  1. If you are using any third-party frameworks like AFNetworking/Alamofire, pass the sessionConfiguration to the initializer of AFURLSessionManager/Manager.
Obj-C
  1. Objective-C (AFNetworking)
    AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
Swift
  1. let manager = Alamofire.SessionManager(configuration: configuration)

Tracking with API ID

  1. Once the API configuration is done, include this key-value pair (API ID) in the header field of your HTTP connection. API-ID: <API-ID>

Track manually with API ID

  1. Use startTrackApi method with the API ID and the request method name (GET, POST, PUT, etc.) before making a network call. It will return a tracking ID. Pass that ID along with the API response code (200, 400, etc.) to the endTrackApimethod.
  1. NSString *tracking_id = APAPIManager.startTrackingApi(<#T##API_ID: String##String#>, httpMethod: <#T##String#>)
  1. Call the endTrackApi method once the API has returned the response.
  1. APAPIManager.endTrackingApi(<#T##trackId: String##String#>, responseCode: <#T##String#>)

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                        Manage your brands on social media

                                          Zoho Desk Resources

                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                            Zoho Marketing Automation

                                              Zoho Sheet Resources

                                               

                                                  Zoho Forms Resources


                                                    Secure your business
                                                    communication with Zoho Mail


                                                    Mail on the move with
                                                    Zoho Mail mobile application

                                                      Stay on top of your schedule
                                                      at all times


                                                      Carry your calendar with you
                                                      Anytime, anywhere




                                                            Zoho Sign Resources

                                                              Sign, Paperless!

                                                              Sign and send business documents on the go!

                                                              Get Started Now




                                                                      Zoho TeamInbox Resources



                                                                              Zoho DataPrep Resources



                                                                                Zoho DataPrep Demo

                                                                                Get a personalized demo or POC

                                                                                REGISTER NOW


                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now









                                                                                                      • Related Articles

                                                                                                      • API Tracking for Android apps

                                                                                                        API Tracking is a part of Apptics' Analytics SDK which allows you to track the success rate and response time for the REST APIs configured in the Apptics web console. Refer to the user guide to configure APIs in the web console. Before you begin, ...
                                                                                                      • API Tracking for Windows apps

                                                                                                        Apptics SDK provides multiple options for tracking your application APIs. To track the APIs, configure them in the Apptics web console, refer to our user guide. Once the configuration is done in the web console, you will get an API ID. Use the below ...
                                                                                                      • Integrate Zoho Apptics with Apple apps

                                                                                                        Prerequisites Install Xcode version 9.0 or later. Install Pod version 1.5.3 or later. Open your project in Xcode. Your project must target iOS 9.0 or later. Swift project must use Swift 4.0 or later. Requirements Apptics version min. OS Version min. ...
                                                                                                      • API Tracking in Zoho Apptics

                                                                                                        Overview API tracking provides insights into how many APIs are being used, what is the success/failure rates of each API, and the average duration of the API. You can view the stats for APIs based on attributes such as brand, platform, bundle id, app ...
                                                                                                      • In-app Updates for Apple apps

                                                                                                        In-app update is a separate library from Apptics and is used to show new version available alerts in Apple apps as per the configuration done in the Apptics web console. Refer to the user guide to do the configuration in the web console. There are ...
                                                                                                        Wherever you are is as good as
                                                                                                        your workplace

                                                                                                          Resources

                                                                                                          Videos

                                                                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                          eBooks

                                                                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                          Webinars

                                                                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                          CRM Tips

                                                                                                          Make the most of Zoho CRM with these useful tips.



                                                                                                            Zoho Show Resources