3 ms·
> We can currently build for nearly all SwiftUI targets: MacOS, iPhone, iPad, Apple Vision Pro, AppleTV. Watch is the odd duck out because it lacks on-device ne
by AnonC 1y ago
> We can currently build for nearly all SwiftUI targets: MacOS, iPhone, iPad, Apple Vision Pro, AppleTV. Watch is the odd duck out because it lacks on-device networking that we require for this library.
Could you please elaborate on the statement about Apple Watch? Apple Watch can connect to WiFi directly with Bluetooth off on its paired iPhone. Specific variants also support cellular networks directly without depending on the paired iPhone. So is it something more nuanced than the networking part that’s missing in Apple Watch?
- eob 1y agoThird party apps can’t use the network though. Iirc there’s an async message queue with eventual delivery that each app gets, which it can use to send messages back and forth with a paired phone app.
- sethaurus 1y agoThat was once the case, but no longer. Third-party WatchOS apps can work without a phone present, up to being installed directly from the watch's app store. They can definitely do independent networking, but there are still some restrictions, eg they can't do it when backgrounded, and websockets are pretty locked down (only for audio-streaming as per Apple policy). I reckon the lack of general-purpose websockets is probably the issue for a system based on Phoenix LiveView.
- carson-katri 1y agowatchOS does not support the BSD sockets API [1], so we would need to build a separate backend in Swift using the Network framework. [1] https://developer.apple.com/documentation/technotes/tn3135-low-level-networking-on-watchos https://developer.apple.com/documentation/technotes/tn3135-l...