バックグランドでもアプリを動かし続けるには?(iOS)

UIApplication.applicationDidEnterBackground  で beginBackgroundTaskWithExpirationHandler を呼び出すようにとの資料があったが

https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidEnterBackground:

beginBackgroundTaskWithExpirationHandler は”You should not use this method simply to keep your application running after it moves to the background.”と書いてあるので、これを使ってはいけない気がするが。。。では、どうしたらいいのだろう’?

しかし、とりあえず beginBackgroundTaskWithExpirationHandler を呼び出す方法を使ってみたところ、エミュレータではちゃんとバックグランドで動いたし、別に問題ないように見える。

コメントを残す

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください