Q: How to setup Terra iOS Background delivery
AfraidWeasel1 month ago
Hi there, we are trying to use Terras background delivery with the iOS SDK to get user activities whilst the app is in the background. However in testing it seems that no events are being sent to our webhook. What is the setup needed to enable this
Chandruadmin1 month ago
Hey there
To ensure that your app supports background delivery, the following must be completed:
.xcodeproj
file in XCode, navigating to Signing & Capabilities
and pressing + Capability.xcodeproj
> Info
and create/edit the list Permitted background task scheduler identifiers
and add the element co.tryterra.data.post.request
Privacy - Health Share Usage Description
should be created with the value being a description of your use case (which must be > 2 words)AppDelegate
file:import UIKit import TerraiOS @main class AppDelegate: UIResponder, UIApplicationDelegate { func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { Terra.setUpBackgroundDelivery() return true } }
AfraidWeasel1 month ago
It seems to be working now, thank you for the help