Maurice
Maurice

Reputation: 792

IOS Local Push Notification

I am making a connection to a JSON file using AFNETWORKING. I want to send the user a Local Push Notification when an object in the json changed. For example:

{ "result": 
    [
        {"status":"TRUE"}
    ]
}

changed to

{ "result": 
    [
        {"status":"FALSE"}
    ]
}

Is it possible to check if the object has changed when the application is in the background? Or do i need to use Push Notification from a server (APN).

Upvotes: 0

Views: 479

Answers (2)

Saroj
Saroj

Reputation: 656

With the introduction of iOS7, you can use background fetch as here. But, using this will consume battery and also it is not certain that your app will get the chance to invoke the background fetch.

considering this, Push notification is the best option to go with.

Upvotes: 1

manujmv
manujmv

Reputation: 6445

No You cant check if the object has changed when the application is in background. You can do this by using Push Notification. Here is a tutorial for push notification

http://www.raywenderlich.com/32960

Upvotes: 1

Related Questions