Apple Watch - only getting data if app on phone is active

自闭症网瘾萝莉.ら 提交于 2019-11-27 21:43:07

If your openParentApplication:reply: method only works when the host iOS app is active, I can pretty much guarantee that your iOS app is being killed in the background before it has a chance to reply.

The solution is to have the app respond to the request as quickly as possible, then complete your normal task. There's a note about this in the developer forums: https://devforums.apple.com/thread/264473?tstart=0

I've also written a blog post detailing the methods I used before the note was added in the forums: http://www.fiveminutewatchkit.com/blog/2015/3/11/one-weird-trick-to-fix-openparentapplicationreply

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!