简体   繁体   中英

Using the existing glance screen of WatchOS 2 as snapshot of the watch app for WatchOS 3

I have an Apple WatchOS2 app which I need to upgrade it to WatchOS 3. As there is no glance screen on WatchOS 3 anymore I'm not sure how to use the current glance screen to create automatic snapshot by calling scheduleSnapshotRefresh method in WKSnapshotRefreshBackgroundTask. Can I migrate the whole project from WatchOS 2 target to a WatchOS 3 target and apply changes to make it compatible with WatchOS 3?

Try: https://developer.apple.com/library/prerelease/content/samplecode/WatchBackgroundRefresh/Introduction/Intro.html

This updates the view on awake.

You can also try updating the snap shot view when you receive a refresh task (WKSnapshotRefreshBackgroundTask).

https://developer.apple.com/reference/watchkit/wksnapshotrefreshbackgroundtask

Greg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM