Keeping my WatchKit complications up to date when not running

删除回忆录丶 提交于 2019-12-04 13:45:47

Wow, I finally resolved the issue!

It seems that, even if I didn't see it in the log files (see my last comment), the init method of WCExtensionDelegate is well called when waking up the app.

So I just had to move the WCSession setting bloc into the init method :

- (id) init
{
    if (self = [super init]) {

        // Setup the WatchConnectivity session
        WCSession *session = [WCSession defaultSession];
        session.delegate = self;
        [session activateSession];
    }

    return self;
}

And for the while it works fine...

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