[watchOS] handleBackgroundTasks
公開日:
:
Apple Watch
https://developer.apple.com/documentation/watchkit/wkextensiondelegate/1650877-handlebackgroundtasks
https://developer.apple.com/documentation/watchkit/wksnapshotrefreshbackgroundtask?language=objc
watchOSのhandleBackgroundTasks で WKSnapshotRefreshBackgroundTask を拾って setTaskCompletedWithDefaultStateRestored しないと watchOSアプリが落ちることがわかった。
If you do not call setTaskCompletedWithDefaultStateRestored:estimatedSnapshotExpiration:userInfo:
on the task, the system uses all available time, wasting battery power. The system then suspends the extension as soon as the allotted time has expired.
とあるので、落ちるとは書かれていないが、suspend されることで落ちてしまうのだろうか。
関連記事
-
[iOS SDK] WatchKitでできることできないこと 2015年3月
Apple Watch発売日(2015年4月24日)までに自作アプリの WatchKit対応
-
1年たったのでRejectされていたApple Watch アプリを再度提出してみる
約一年前に作成したApple Watchアプリは当時何度審査に提出してもRejectされていたが、
-
[Apple Watch] 2017年の冬休みの宿題はwatchOSアプリ開発
自分はPebble初代のころからスマートウォッチはPebble派だったが、2016年の年末は Peb
-
[WatchKit] WatchSim 買ってみた
WatchSim Danny Keogan posted with iT
-
Apple Special Event September 2018
今年も新型iPhoneを発表するアップルのスペシャルイベントが2018年9月13日2時AM(12日1
-
XcodeにiPhoneとwatchが表示されない
2019年はGWに10連休があるということで、今日は3日目。毎日少しずつ開発を進めている。
-
[WatchKit] WKCompanionAppBundleIdentifier と WKAppBundleIdentifier を変更する
自作Apple Watch アプリのフォルダを丸ごとコピーして新しいアプリを作るときなどに、erro
-
Xcode will continue when iPhone is finished. が表示されて Apple Watch でデバッグ実行できない
Apple Watch 開発をしていると、Xcode will continue when
-
[WatchKit] Apple WatchアプリをRejectされた話
Apple Watch はいつの間にか電池がかなり減っていることが多く、いつどのように減っているか知
- PREV
- Xcode 13ダウンロード
- NEXT
- iOS15にアップデート