[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] WKCompanionAppBundleIdentifier と WKAppBundleIdentifier を変更する
自作Apple Watch アプリのフォルダを丸ごとコピーして新しいアプリを作るときなどに、erro
-
-
[WatchKit] WatchSim 買ってみた
WatchSim Danny Keogan posted with iT
-
-
Xcode will continue when iPhone is finished. が表示されて Apple Watch でデバッグ実行できない
Apple Watch 開発をしていると、Xcode will continue when
-
-
Xcode 13.1 アップデート
Apple、統合開発環境「Xcode 13.1」をリリース:CodeZine(コードジン)
-
-
[Apple Watch] EverLearn 1.9.7 Release
初の Apple Watch 対応アプリ EverLearn 1.9.7 をリリースしました。間違え
-
-
Apple Watch 対応アプリようやくSubmit完了
ようやく Apple Watch 対応したアプリのSubmitが完了した。 とりあえずの対
-
-
Apple Watch用バッテリーロガーを公開しました
1年前に開発し、App StoreにSubmitしたものの Rejectされ続けていたアプリをその
-
-
Apple Special Event 2017
2017年は仕事で死んでいたので、Special Eventの記事を書けていなかった。記録
-
-
[iOS SDK] WatchKitでできることできないこと 2015年3月
Apple Watch発売日(2015年4月24日)までに自作アプリの WatchKit対応
-
-
[Apple Watch] 2017年の冬休みの宿題はwatchOSアプリ開発
自分はPebble初代のころからスマートウォッチはPebble派だったが、2016年の年末は Peb
- PREV
- Xcode 13ダウンロード
- NEXT
- iOS15にアップデート