16 / 16
Dec 2020

Was just wondering if anyone have built a watch app with Realm and if so, how you handle transferring data between the watch app and iOS app? Is there a good way to do this using Realm?

I know that the realm cloud sync doesn’t work since it requires a web socket connection. So I guess I need to transfer the data to the iOS app using the watch connectivity framework. Anyone found a good way to do this?

22 days later
3 months later

The only info I can find regarding this is a few years old and there was no way to do it then, has anyone got any recent info on this?

Btw, is there a way to access the legacy Realm forum? It held info which would still be useful now.

I haven’t seen any info either. The articles on the Realm site are from 2015.

I found a couple of issues on github:

From what I can see, sync doesn’t work as it relies on websockets. But my understanding is that it should be possible to build apps without sync. I hope improving watch support is something that is on the roadmap. Many of my competitors have watch apps already :confused:

Thanks @Ian_Ward ! Yes, I assume that this is the way to go, but it does rule out standalone apps on the watch. Hmm shouldn’t it be possible to post data to atlas using the new graphql apis and achieve sync that way instead?

Yeah that should be possible but I think the watch has a non-standard networking stack so I’m not sure if all networking libraries will integrate, this is part of the reason we don’t have realm sync out of the box on watchOS.

I know one reason that has been stated before is that WatchOS didn’t support websockets, but that doesn’t seem to be the case anymore:

Personally I’d love to see sync for WatchOS. A lot of my competitors already have watch support, but judging by AppStore reviews they all struggle with sync. If MongoDB Realm would solve this it would be a game changer

One issue that was discussed some years ago was that the size limit for swift apps for watchOS made it impossible to add the Realm frameworks(Realm on the Apple Watch with a Swift project is not feasible · Issue #5203 · realm/realm-swift · GitHub), although at the time the limit was 50 mb, and I think last year it was 85 mb so maybe this is no longer an issue.

But using Realm without sync is not an option.

I’m in the same situation as you where every comparable app in the same category has a watchOS version so I would hope that it’s on the roadmap.

The addition of URLSessionWebSocketTask on watchOS 6.2 seems to provide the needed WebSocket functionality in terms of transport. Not sure if there are any auth limitations.

@Ian_Ward Is there any plan to move to URLSessionWebSocketTask and a flow that will sync from the watch?

We’ve paused production on our watch counterpart until we can sync. Thanks.

5 months later

Closed on Dec 1, 2020

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.