New ways to understand in-app behavior with Apple iOS 16
With the latest updates to iOS and Xcode, Apple has introduced changes to its operating system and developer environment that give engineers and product teams creative new ways to uncover user behavior.
If you build mobile applications and strive to consistently improve in-app experiences, a major update to the mobile operating system powering your product is a significant development in your world. The OS is the environment in which your product lives, and the underlying technology that allows users to interact with it. For app developers, OS updates can sometimes present challenges––for instance, if your third-party SDKs no longer work as intended, or a feature in your app needs to be updated to meet the platform’s new API specs. However, they can also present opportunities in the form of potential new features and experiences, or easier, more maintainable ways to build your existing ones.
Apple recently released iOS 16, which introduces significant updates to the look, feel, and functionality of the operating system that powers Apple’s mobile devices. The most visible changes to come with this update are some prominent new interface features, including enhancements to the Lock Screen and new functionality for the Focus feature, among others. iPhone and iPad users aren’t the only ones for whom this update is relevant, however. iOS 16 comes with updates to Apple’s APIs and developer tools as well.
In addition to providing engineers with new ways to build applications and power the user experience, the technical updates accompanying iOS 16 also provide product teams with new opportunities for uncovering user insights and powering personalization and engineers with easier ways of capturing this data that were not possible with earlier versions of iOS. Let’s explore a few ways in which you can use some of Apple’s new API features and technical enhancements to shine new light on your users’ behavior and interests, and deliver personalized experiences based on their interactions with your products.
Enrich eCommerce events with new StoreKit data
Apple’s StoreKit framework helps developers build in-app purchase experiences and power interactions within the App Store. For application developers working on eCommerce products, the various APIs that StoreKit exposes are useful tools for building a complete picture of how customers move through eCommerce journeys. With iOS 16, Apple has made several new data points available via StoreKit that could provide valuable insight to product teams looking to flesh out eCommerce journeys. For example, a recentSubscriptionStartDate property is now included in the RenewalInfo. This property represents the date on which a customer began their most recent continuous subscription period. This data can help marketing power a number of personalization and analytics use cases, including:
- Focusing offers and deals on users whose subscription periods are about to expire
- Identifying behaviors associated with both renewing and lapsing
- Building user audiences based on subscription length
Additionally, StoreKit now contains a new AppTransaction object that includes a variety of properties related to customer transactions. Data points that can be captured from this new object include the date a user originally purchased the app from the App Store, the date a customer placed an order for the app before it’s available in the App Store, and the version of an app a customer used to make a transaction. Each of these pieces of information can provide marketing and product teams with useful insight into customer behavior and opportunities for better personalization.
iOS 16 also introduced updates to HealthKit. This repository stores a user’s health and fitness data, and provides a framework for iPhone and Apple Watch apps to access this information when users provide consent to do so. App developers in the health and fitness space can use the latest HealthKit updates to capture detailed information about a consenting user’s workouts. This enables Product Managers and Marketers to provide users with individualized communications and in-app experiences. For instance, if a growth team knows that a user typically exercises shortly after they wake up at 7am, a health app can send a user a notification with personalized workout recommendations at this specific time.
HealthKit also now supports new data types for running workout metrics, including running power, ground contact time, vertical oscillation, running speed, and stride length. These insights could be particularly useful to engagement teams aiming to help users achieve targeted fitness goals, who could use this data to deliver personalized and motivational experiences like:
- Sending users a congratulatory email or notification when they beat a personal record
- Display in-app workout recommendations based on a user’s current fitness data
- Show a user how their current records in various categories ranks among the total population of users
Overcome customer data collection challenges in your iOS apps
Collecting customer data on iOS devices can present engineering teams with a significant challenge, especially when data events need to be standardized across multiple platforms in addition to iOS. Additionally, operating system updates like the iOS 16 release can often present engineering teams with the major hurdle of having to update all of the third-party configurations and implementations installed in their products.
Standardizing your data collection with a Customer Data Platform (CDP) can help you avoid the headaches and time-intensive maintenance work that can sometimes accompany collecting data events on iOS apps. mParticle’s iOS SDK, for instance, provides engineers with simple APIs for capturing and standardizing user attributes and behavioral events on iOS applications, and our team continuously assures compatibility between our SDK and each new update from Apple. With the iOS 16 release, for example, the latest version of our SDK (8.8.1) is fully compatible with Xcode 13, the latest Xcode 14 beta, the latest iOS 16 beta, and all new features and capabilities that iOS 16 has introduced to SwiftUI, so minimal maintenance work was required on part of developers using our SDK.
The mParticle iOS SDK makes it easy to capture and standardize events like those discussed above. For instance, after querying the StoreKit API to get information like the recentSubscriptionStartDate property, you can easily send these values to mParticle as event Attributes in both native iOS development languages. The mParticle SDK captures and forwards custom attributes in Objective-C like this:
MPEvent *event = [[MPEvent alloc] initWithName:@"Subscription Start"
type:MPEventTypeTransaction];
event.customAttributes = @{@"recentSubscriptionStartDate":@"1666218713"};
[[MParticle sharedInstance] logEvent:event];
In Swift, it looks like this:
if let event = MPEvent(name: "Subscription Start", type: MPEventType.navigation) {
event.customAttributes = ["recentSubscriptionStartDate": "1666218713"]
MParticle.sharedInstance().logEvent(event)
}
mParticle also gives iOS developers a suite of tools to simplify data collection, and ensure data quality across platforms. Also, to further eliminate guesswork from the implementation process, we’ve developed a fully functional iOS sample app that shows how to collect data events with our SDK in common, real world scenarios.
To try out mParticle and start taking advantage of these new ways to implement event collection in iOS apps, sign up for a free trial with mParticle.
Some Final Legal Thoughts
As always, you should process the personal data of your end users responsibly and in accordance with applicable data protection laws, including any requirement to obtain the consent of (or provide notice to) such users in connection with your use of the mParticle platform. Certain health information may constitute “protected health information” under HIPAA, a special category of personal data (such as “personal data concerning health”) under GDPR and/or regulated as sensitive information under other applicable data protection laws. mParticle prohibits the use of the mParticle platform in connection with sensitive information. Please reach out to your legal counsel to determine whether any of the data discussed above falls within this category.