admin管理员组文章数量:1122832
I’m developing an app where the iOS app (written in Flutter) communicates with a watchOS companion app. While the main app is built with Flutter, the communication between iOS and watchOS is implemented natively using WCSession, so the Flutter framework shouldn’t play a role in this issue. I structured the communication based on this article /@Toglefritz/building-a-watchos-companion-app-for-flutter-08f80ea8cb1b
The workflow is straightforward: the iOS app sends a message to the watch, and the watch starts performing tasks based on that message. For the majority of users, this works as expected. However, a small number of users are reporting issues where the message isn’t transmitted to the watch, seemingly because the WCSession is not reachable.
Here are some key details:
Setup:
- The iOS app ensures WCSession is activated, and messages are sent using sendMessage(_:replyHandler:errorHandler:).
- On the watchOS side, the app listens for incoming messages and processes them accordingly.
Problem:
- For most users, the communication works without any issues.
- For a subset of users, the watch app doesn’t receive the message, and the error handler on the iOS side indicates that the session isn’t reachable.
- The issue is inconsistent and difficult to reproduce in testing. I’ve been unable to replicate the problem on my devices.
Questions:
- Have you encountered similar issues with WCSession communication being unreliable or inconsistent?
- Are there any known edge cases or conditions that could cause the session to be unreachable for some users?
- Do you have any debugging tips or strategies for identifying the root cause of such issues?
Since the problem only occurs for a small subset of users and is not reproducible on my end, I’m at a loss for how to improve or debug this further. Any help or suggestions would be greatly appreciated!
Thanks in advance!
本文标签: iosWCSession not reachable for some usersStack Overflow
版权声明:本文标题:ios - WCSession not reachable for some users - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736282566a1926682.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论