[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 されることで落ちてしまうのだろうか。
関連記事
-
-
[WatchKit] WatchSim 買ってみた
WatchSim Danny Keogan posted with iT
-
-
Apple Special Event 2017
2017年は仕事で死んでいたので、Special Eventの記事を書けていなかった。記録
-
-
Xcode will continue when iPhone is finished. が表示されて Apple Watch でデバッグ実行できない
Apple Watch 開発をしていると、Xcode will continue when
-
-
[WatchKit] Apple WatchアプリをRejectされた話
Apple Watch はいつの間にか電池がかなり減っていることが多く、いつどのように減っているか知
-
-
[Apple Watch] watchOS2以降対応のWatchKit 開発本
Apple Watch の開発本はとても少ない。watchOS2以降向けとなると、さらに少ない。どれ
-
-
Apple Special Event 2015
https://www.gizmodo.jp/2015/09/applelive_event_ip
-
-
[Apple Watch] 2017年の冬休みの宿題はwatchOSアプリ開発
自分はPebble初代のころからスマートウォッチはPebble派だったが、2016年の年末は Peb
-
-
XcodeにiPhoneとwatchが表示されない
2019年はGWに10連休があるということで、今日は3日目。毎日少しずつ開発を進めている。
-
-
Apple Watch用バッテリーロガーを公開しました
1年前に開発し、App StoreにSubmitしたものの Rejectされ続けていたアプリをその
-
-
[WatchKit] WKCompanionAppBundleIdentifier と WKAppBundleIdentifier を変更する
自作Apple Watch アプリのフォルダを丸ごとコピーして新しいアプリを作るときなどに、erro
- PREV
- Xcode 13ダウンロード
- NEXT
- iOS15にアップデート