Home > Software design >  SwiftUI CloudKit syncing issue in TestFlight Only
SwiftUI CloudKit syncing issue in TestFlight Only

Time:11-15

I have a SwiftUI app that I have distributed to my testers. I have deployed my development schema to production cleanly and I have also tested with com.apple.developer.icloud-container-environment in entitlements set to "Production". However what I am finding is that when I compile and run the app via Xcode, all is well. My test devices and simulators are sharing the data as I'd expect, in both the development and production private and public databases.

However, when I package it up, I've tried manual and automatic signing, and release it through TestFlight and load it into the same physical devices that previously worked via Xcode, no syncing occurs, it just seems to write to local store.

Then when I connect to Xcode and rerun the app, overwriting the TestFlight version (i.e. I'm not deleting the local store, just the app) the records I created with the TestFlight version will now make their way to the Production database.

I am guessing that I have goofed somewhere along the line with certificates, but I have recreated new provisioning profiles and new certificates - I admit I find this part confusing, I'm quite new to this - but to no avail. I've read through the documentation and searched the web, but I'm not getting any leads. Any suggestions on what I am doing wrong would be gratefully received.

Thanks

CodePudding user response:

Found my problem - and it's real newb howler. I had created entitlements under debug and not under release. I leave this here so that others need not share my shame should other newbies follow in my footsteps.

  • Related