|
I am working on an app that syncs data to my iPhone, iPad, and Mac. I've been running it in TestFlight for some time, but it seems that the data is not syncing consistently. I've been using a lot of great information from this thread - https://www.hackingwithswift.com/forums/swiftui/core-data-and-lifecycle-swiftui-app/2351/2404 - and for a while it seemed to be syncing fine. What is the most effective approach for debugging syncing issues? I believe I am ready to release my app into the wild, but if the syncing doesn't work consistently that's a big show stopper for me. |
|
I do have the following code in my @main
The goal here was to force background refresh to cloudkit whenever the app changes state. |
|
|
|
I had the cloudkit thing syncing fine on 4 devices for like a week. Got a new iPad Mini and all of the suddent, it quit working on any of them. I did nothing except change the info page and replace the code on TestFlight. installed on all devices from there (instead of building directly from xcode). Now none are working, and it's been a couple of days. Not sure if it was the info change, or adding a new build into testflight. I am ready to move to production, and would like to have this working. Anyone got any ideas. Not sure how to debug since no change other than adding a device. |
|
If you want to use TestFlight you have to deploy the scheme within CloudKit Control Center in your developer portal to production. Otherwise, it doesn't work. Learned it myself the hard way :) The same goes for changes in your data model and you wonder why syncing the new data fields doesn't work. You then have to deploy the changes to the scheme to production as well. |
TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and more!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.