TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Best sync option for watchOS / SwiftUI?

Forums > watchOS

I have an app where ideally I have sync between web, mobile, and watchos.

Firestore (firebase) works well for sync between web and mobile. But I'm a bit stuck as to the best option for watchOS. WatchOS doesn't support firestore, but even if it does, I think many apple watches don't have internet support so I want an option based on watchconnectivity.

I use watchconnectivity to send the data, but just store it in @State. When I kill the watchOS app, the state goes away, even though I'd rather it persist.

What is the best option to persist it ? Is it CoreData, AppStore, or some other option? CoreData seems like the most reliable option, but also a lot of extra code to keep the watchOS coreData synced with the firestore app. Wanted to post here in case anyone has any insights.

I have some apps on my watch that seem to sync with their iOS companion apps without much problems, even if I turn off the iphone and kill the watchOS app, when I restart the watchOS app, the basic state persists. So these devs are doing something - is it just coredata? appstorage? or something else. Wanted to post here in case any good ideas.

4      

Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

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.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.