Add event tracking using the Split iOS SDK with user consent.
- Note: This sample code project is associated with WWDC21 session 10009: Build a workout app for Apple Watch. The code was enhanced by Split to demonstrate event tracking and user consent.
Before you run the sample code project in Xcode:
- Open the sample with the latest version of Xcode.
- Select the top-level project.
- For the three targets, select the correct team in the Signing & Capabilities pane (next to Team) to let Xcode automatically manage your provisioning profile.
- Make a note of the Bundle Identifier of the WatchKit App target.
- Open the
Info.plist
file of the WatchKit Extension target, and change the value of theNSExtension
>NSExtensionAttributes
>WKAppBundleIdentifier
key to the bundle ID you noted in the previous step. - Make a clean build and run the sample app on your device.