アプリケーションが起動されていなくても通知を送信する Facebook などの iOS アプリケーションを目にします。
時間間隔ごとに実行されるタイマーを使用してタスクをスケジュールする必要があり、このタスク (同じアプリケーション内にある必要があります) は、NSUserNotification
いくつかの条件を満たす場合に配信する必要があります。
アプリケーションが実行されていない場合でも、このような通知をどのように設定できますか?
アプリケーションが起動されていなくても通知を送信する Facebook などの iOS アプリケーションを目にします。
時間間隔ごとに実行されるタイマーを使用してタスクをスケジュールする必要があり、このタスク (同じアプリケーション内にある必要があります) は、NSUserNotification
いくつかの条件を満たす場合に配信する必要があります。
アプリケーションが実行されていない場合でも、このような通知をどのように設定できますか?
起動されていないときに通知を送信する Facebook アプリやその他のアプリは、リモート通知メカニズムを使用してこれを行います。
これを使用するには、サーバーをセットアップし、プッシュ証明書を作成し、優先サーバーの APNS ライブラリを使用する必要があります。
詳細については、こちらをご覧ください: http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
Scheduled notifications can be done with local notifications, using UILocalNotification. However, like push notifications, local notifications cannot run code. They present a notification to the user, who may or may not choose to start your app in response.
If you want to run code in your app on a timed schedule, then your app has to run in the background. And Apple limits background apps to only a few specific purposes. If your app doesn't fall in one of those categories your app can't run in the background (see UIBackgroundModes key).
Significant location change monitoring can start you app when a location change has occurred but that is location based not time based and cannot be scheduled.
あなたが思うようにそれを行うことはできません。(Facebook のように) Apple Push Notification Service を使用する必要があります。