Skip to content

iOS Tracking Implementation Guide

Info

As of version 1.1.4, GPS geo-location data is not captured by default and will only be derived from the IP address. You can set the geo-location enable by the trackerConfig.setGeoLocationEnabled(true). To capture GPS geo-location data (requires permission grant by user).

Warning

Do not reshare this document with anyone unless they need to implement WOGAA tracking on their mobile applications.


Latest Version

The latest version of WOGAA Mobile Trackers is 2.1.2. (Compiled with Xcode 12.5) WOGAA Mobile Tracker supports Swift and Objective-C for iOS.


Overview

  1. Install via CocoaPods, Carthage or Manually.
  2. Implement codes for iOS tracking.
  3. Check iOS implementation
  4. Verification of iOS implementation

Step 1. Install via CocoaPods, Carthage or Manually

Method 1: Install via CocoaPods

CocoPods is a dependency manager for Swift and Objective-C Cocoa projects.

  1. Create or update your Podfile. (see example below)
  2. Run pod install.

Podfile Example

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/wogaa/Specs.git'

target 'MasterDetailExampleApp' do
  pod 'Tracker', '~> 1.1'
  use_frameworks!
end
  1. Download Tracker-2.1.2.zip.
  2. Unzip Tracker-2.1.2.zip.
  3. Drag Tracker.framework into your project.
  4. Add Tracker.framework into your Embedded Binaries.

Step 2. Implement codes for iOS Tracking

In your AppDelegate class for Swift,

  1. Add import Tracker.
  2. Add the following codes in application(:didFinishLaunchingWithOptions:) function for the appropriate environment.

For Staging

Tracker.start()

For Production

Tracker.start(for: .production)

In your AppDelegate class for Objective-C,

  1. Add #import <Tracker/Tracker.h>.
  2. Add the following codes in (void)applicationDidFinishLaunching:(UIApplication *)application; function for the appropriate environment.

For Staging

[Tracker start];

For Production

[Tracker startWith:EnvironmentProduction];


Step 3. Check iOS Implementation

Method 1: Manually check the logs

Example

[WOGAA Tracker] Started (2.1.2)

Info

[WOGAA Tracker] Started (2.1.2) shows tracker has started and the version number of the tracker

Use tool to check if data is being received in your environment(s).

Info

- Staging received events will take about 10 seconds to process. (Last 24 hours)

- Production received events will take 1 day to process.


Step 4. Verification of iOS Implementation

A verification email will be sent once we have successfully received data from your mobile application in production server.

It may take up to 7 working days for the verification. Please let us know if there is any issues with regards to this via support@wogaa.gov.sg


Reference Implementation

https://github.com/wogaa/mobile-tracker-examples/tree/main/iOS