Timer based reminder in iPhone app - iphone

My app asks the user to fill in and save a form locally. I want him to be reminded 48 hrs after the app has been closed that he has a pending form.
Is push notification the only way out? Does it cost money to use a provisioning service?

iPhone OS 4 adds timer-based alerting for apps that aren't running. See here for a brief description. I'm guessing this means that push notifications are your only option prior to version 4.

Related

Does iPhone combine Push notification?

I observed in iPhone that,When an app receive too frequent notification and that app is in background,iPhone does not show banner for all notification,instead it shows banner with message " You have 6 new Connect notification." ( 6 is the push notification count and connect is the name of app.).Is this behaviour documented anywhere?
As for your question of where it is stored, it is probably stored in the cache of the phone (which is cleared every so often) so you're not being monitored and watched as far as I know of. If you wish to turn off these notifications you can do so in the settings. Hope I answered your question!

Content push for Newsstand in iOS 7.1 to change magazine cover suddenly not working in existing Newsstand App

We noticed that the silent content push messages that we are sending to update the magazine cover of our Newsstand App suddenly stopped working specifically in iOS 7.1.
I just did some testing sending the content push to the following devices:
iOS-5.1.1 -> push received -> magazine cover updated -> OK
iOS-7.0.6 -> push received -> magazine cover updated -> OK
iOS-7.1 -> push never received -> NOK
However, if I send a push alert message to these devices, all alert messages are correctly received and shown, so I am sure that I am using the correct device tokens.
And this issue is on an existing App live in the App store, never having this issue before and it seems to be specific to iOS 7.1.
This is the content push message we are sending:
$payload = '{
"aps" :
{
"content-available" : 1,
}
}';
Anybody else having the same problems specific in iOS 7.1?
Thx!
I am having that issue also on 7.1 in development. If connected to XCODE we see the method application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler invoked... ONCE we disconnect from Xcode... that method does NOT get called based on reviewing the console.
EDIT :: Today during testing against the sandbox environment with a iPhone on iOS7 7.1 (11D167) the content-available starting working ?? We are getting calls into didReceiveRemoteNotification fetchCompletionHandler: NOW, even when phone is NOT connected to XCode or anything. Even if the Phone is Locked and Application is in the background... which is what we needed and very important.
Really odd... but we did find that the Manual Do Not Disturb was ON.. on this test phone.. not sure how that got on and if that was issue. Make sure that is NOT ON.. otherwise you will not get any remoteNotification calls into your application. We may have gotten off track with the other postings that content-available was broken on ios7.1.
If anyone knows anything else about this, please share.
From https://support.magplus.com/entries/84992596-About-Lower-Issue-Download-Counts-Since-iOS-7:
About Lower Issue Download Counts Since iOS 7
With the release of iOS 7, Apple changed the way Newsstand Push Notifications work, and it is a significant departure from how Newsstand Push Notifications were delivered with iOS 5 and iOS 6. With iOS 7, Apple attempted to change the way these notifications worked, primarily optimizing the mechanism for apps that receive e-mail and Twitter updates and notifications multiple times within a 24-hour period. Part of the problem with iOS 7 is that it is not clearly differentiating Newsstand Push Notifications (which initiate a background download of content) from standard Push Notifications (which just deliver text).
A key change in iOS 7 is that if an app is killed manually by the end user, then the app simply does not receive Newsstand Push Notifications to automatically download new content in the background. Users manually kill an app by bringing up a screen of currently running apps and swiping one up to force it to quit. Apple views this scenario as one where the end user has made a conscious decision that they do not want the app running/performing background operations which consume battery life.
The two unique features of Newsstand Apps as promoted by Apple self in 2011, 2012 and 2013 (in WWDC video's about newsstand) were:
A - background download of new Magazines and
B - changing the cover when a new Magazine is available and showing a badge.
Unfortunately, in the real world situation, since iOS 7, Apple has killed both these features. Content push messages needed for these two features don't work if the user has killed the Newsstand App. Which in real world situation will almost always be the case.
Suppose you have a Magazine that appears monthly. How big is te chance that the user will have your Newsstand App running all the time in the background? I think almost none...
Before iOS 7, this user could be notified via a content push message resulting in a badge and a new cover visible in the Newsstand.
Since iOS7, these features are gone in real world situations.
Result: much lower magazine views and downloads.
Thanks Apple!

Event While deleting the app from iPhone [duplicate]

This question already has answers here:
How to catch application uninstalling on device and let server know about this (iOS/Android)
(2 answers)
Closed 9 years ago.
I wish to hit a web service, whenever a user deletes the app from his/her device. Its just to delete that user from Db. Can anybody here help me?? Thanks In Advance..
Generally speaking, what you are attempting is probably not advisable. Even if it were possible to know when a user has deleted the app, how would you handle the situation where the user then re-installed the application and launched it? You also do not know why the user has deleted the app (perhaps they only wish to do so temporarily to free up space on their device? Perhaps their device was stolen and they are re-installing into a new, or upgraded device?)
If you separate your concerns (client has/does not have mobile app, vs client has/does not have active account) you can manage all these scenarios in a much more robust way.
Using an in-app analytics package (like Google Analytics, Parse or Flurry to name just a few) will give you insight as to your user behavior, and perhaps based on this usage data you can trigger handlers. For example, if you see a user has not used your app in a certain period you can email them or send a push notification to remind them? Perhaps you could email them to notify them "You have not logged in in 60 days, if you do not use your account within the next 30 days it will be deleted. Click here to re-activate your account."
No, can't do. There is no defined notification when an application is deleted. If you must talk to a server, suspend inactive accounts after a predefined time limit.
One other thing you can try is check for the UIApplicationWillTerminateNotification notification. Save the state of your app on your servers when it's transitioning to the background and cross your fingers your user will not delete your app when it's not running. Because once your app closed, you don't have any control anymore. Thats the iOS behavior till iOS 6.
There is no way you could know whether the app is deleted from device or not because no delegate method fires when the app is deleted.
Hope it helps you.

xcode, running app on device cause red stamp to appear

I am not sure why, but every time I run this specific app on a iOS device a red stamp appear with the number 5. Can someone tell me why this is happening? This doesn't happened on the simulator.
This is used to communicate important information to the user of said app. This is set in your application by supplying an NSInteger to applicationIconBadgeNumber. For instance, Apple's App Store uses the overlay to inform a user that an update is available for X number of his/her app's. The Mail App uses it to inform the user that they have unread messages. Some applications add an applicationIconBadgeNumber to inform the user that they have received a Push Message.
Read more about it from Apple Developer Doc's
You can also turn this off for the application if you find it bothersome. Follow instructions in this Related Question.

how many days can a app live in background

I am actually doing some daily checks of the app assuming the app will be closed and opened daily. It works fine for 3.1 devices. My question is how many days can a app live in background on iPhone 4.0 OS.
If it lives for a long time what are the best ways to make daily schedules to contact my backend server ?
Backgrounding in iOS4 is more restrict than that. You can schedule 'task completion' but that can only run for 10 minutes. You could possibly do the 'location' background service but that would use quite a bit of power and I'm not sure if it would let you contact your server like you are talking about.
I suppose a more direct answer to your question is that it depends. When you are in the background, you need to be prepared to have you app closed at anytime. When the device runs low on memory, it will close any app that hasn't be run in a while.
Apple's Doc on Background Tasks
Why do you say it works fine for 3.1 devices? If you want the app to update when opened from the springboard like it does in 3.1 then you want to use applicationWillEnterForeground: in your app delegate to call the right code.
If you must update periodically in the background then you can use setKeepAliveTimeout:handler: and beginBackgroundTaskWithExpirationHandler, but I don't know what the app store reviewers will think about a non-VOIP app using using it.