We are pleased to release version 0.8.0 of the Snowplow Objective-C Tracker. This release introduces data consent tracking, push notification tracking, a Swift demonstration app, and several updates and bug fixes.
In the rest of this post we will cover:
- Data consent tracking
- Push notification tracking
- Swift demonstration app
- XCode 9 bugfixes
- Other changes
- Getting help
Against the backdrop of the upcoming GDPR and ePrivacy regulations, this release adds new events to track when users give their consent to, and withdraw their consent from, various forms of data collection.
We envision that many digital businesses will want to track the consent of their users against relatively finegrained “bundles” of specific data usecases, which we model in Snowplow as consent documents.
The two new consent tracking methods are:
trackConsentGrantedEvent, for the giving of consent
trackConsentWithdrawnEvent, for the removal of consent
Each consent event will be associated to one or more consent documents, attached to the event as contexts.
Here is an example of a user opting out of data collection per a specific consent document
The tracker now has support for tracking push notifications.
trackPushNotificationEvent can be called on the
tracker instance from inside any of the push notification methods implemented in
An example can be found in the Swift demo app, implemented using the notification API in iOS 11.2 ([UserNotifications][usernotifications]). It looks likes this:
Documentation can be found here.
To provide an example of how the tracker integrates into a Swift project, we’ve added a Swift demonstration app to the repo.
For additional information regarding integrating the tracker into a Swift project, the documentation has been updated to address common issues like exception handling, and importing.
It’s also important to familiarize yourself with how to view generated interfaces – essential for finding the type signatures of the tracker methods when translated from Objective-C to Swift.
To improve compatibility with XCode 9 we have fixed a naming conflict in the SnowplowTests bundle (issue #343).
Other updates include:
trackSelfDescribingEventmethod as an alias for
NSGregorianCalendarwith NSCalendarIdentifierGregorian (issue #329)
- Adding preprocessor flags to disable OpenIDFA or IDFV as required (issue #334)
identifyUseras an alias for
- Dropping iOS 8 as a test target, and adding iOS 10 and 11 (issue #344)
- Add method to
SPTrackerto get the session’s
- Fix truncation of structured event value to 6 digits (issue #299)
To add the Snowplow Objective-C Tracker as a dependency to your own app, add the following into your Podfile:
If you prefer, you can manually add the tracker’s source c
ode and dependencies into your project’s codebase, or use the Static Framework for iOS.
As always, please check out the following links: