Terra IOS background delivery is not syncing
AllProposedCatfish25 months ago
Hi there. I was able to successfully implement Terra's background delivery for iOS in swift: I added the line Terra.setUpBackgroundDelivery() to the AppDelegate file as indicated on the API reference. It seems that background delivery only fires when the app is open. Tested on iOS version 17.3 and TerraiOS version 1.6. How can I troubleshoot this issue??
Alexadmin25 months ago
Hey there
Have you completed the following steps:
- Add the Background Modes capability and enable Background Processing and Background fetch. This can be done by opening your
.xcodeprojfile in XCode, navigating toSigning & Capabilitiesand pressing + Capability - Add the HealthKit capability and enable Background delivery
- Add the terra Background task identifier: navigate to your
.xcodeproj>Infoand create/edit the listPermitted background task scheduler identifiersand add the elementco.tryterra.data.post.request - In the same tab, the key
Privacy - Health Share Usage Descriptionshould be created with the value being a description of your use case (which must be > 2 words)
ProposedCatfish25 months ago
Hey, thanks for the response, but all those steps have been completed. I also updated the background modes capability to have background fetch enabled but still nothing. What else can I do. Just to provide more detail, the setup works until the app is closed on my phone - even after several hours no events come through.
Alexadmin25 months ago
On your mobile device, have you enabled background app refresh. This can be done by navigating to Settings > General > Background App refresh and ensuring Background App refresh is on and scrolling to your app to check that it is enabled for you. Also, background sync is disabled when the user's device is on Low power mode
ProposedCatfish25 months ago
Hey again. That seems to have fixed it. Background app refresh was not enabled for my app. Is there any way to get around the low power mode issue?
Alexadmin25 months ago
Unfortunately, the Low power mode restriction is enforced by iOS and affects all apps that require background refresh