Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force user to update the app programmatically in iOS

In my iOS app I have enabled force app update feature. It is like this.

If there is a critical bug fix. In the server we are setting the new release version. And in splash screen I am checking the current app version and if its lower than the service version, shows a message to update the app.

I have put 2 buttons "Update now", "Update later"

I have 2 questions

  1. If I click now. App should open my app in the appstore with the button UPDATE. Currently I use the link "http://appstore.com/mycompanynamepvtltd" This opens list of my company apps but it has the button OPEN, not the UPDATE even there is a new update for my app. whats the url to go for update page?

  2. If he click the button "Update Later" is it ok to close the app programmatically? Does this cause to reject my app in the appstore?

Please help me for these 2 questions

like image 475
user1960169 Avatar asked Aug 19 '17 05:08

user1960169


People also ask

Can I force an iPhone user to upgrade an application?

Open the App Store. Tap your profile icon at the top of the screen. Scroll to see pending updates and release notes. Tap Update next to an app to update only that app, or tap Update All.

Can I force an iPhone user to upgrade an application in Swift?

Even Apple and Microsoft don't force security updates. You can always opt out or restore an older version. If its a security or feature requirement, you can tell your users the update is necessary, or the app will not function. You can block their credentials until they update, but it will still be their choice.

How do I automatically update apps in iOS?

How to turn on or turn off automatic updates on your iPhone or iPad. Go to Settings. Tap App Store. Turn on or turn off App Updates.


3 Answers

Point 2 : You should only allow force update as an option if you don't want user to update later. Closing the app programmatically is not the right option.

Point 1 : You can use a good library available for this purpose.

Usage in Swift: Library

func applicationDidBecomeActive(application: UIApplication) {
    /* Perform daily (.daily) or weekly (.weekly) checks for new version of your app.
    Useful if user returns to your app from the background after extended period of time.
     Place in applicationDidBecomeActive(_:)*/

    Siren.shared.checkVersion(checkType: .daily)
}

Usage in Objective-C: Library

-(void)applicationDidBecomeActive:(UIApplication *)application {
    // Perform daily check for new version of your app
    [[Harpy sharedInstance] checkVersionDaily];
}

How it works : It used lookup api which returns app details like link including version and compares it.

For an example, look up Yelp Software application by iTunes ID by calling https://itunes.apple.com/lookup?id=284910350

For more info, please visit link

like image 133
Hooda Avatar answered Sep 17 '22 17:09

Hooda


Don't close the app programmatically. Apple can reject the app. Better approach will be do not allow user to use the app. Keep the update button. Either user will go to app store or close the app by himself.

According to Apple, your app should not terminate on its own. Since the user did not hit the Home button, any return to the Home screen gives the user the impression that your app crashed. This is confusing, non-standard behavior and should be avoided.

Please check this forum:

https://forums.developer.apple.com/thread/52767.

It is happening with lot of people. In my project I redirected the user to our website page of downloading app from app store. In that way if the user is not getting update button in app store, at least the user can use the website in safari for the time being.

like image 26
Amit Avatar answered Sep 19 '22 17:09

Amit


To specifically answer your question:

  1. Use this URL to directly open to your app in the app store: https://apps.apple.com/app/id########## where ########## is your app's 10 digit numeric ID. You can find that ID in App Store Connect under the App Information section. It's called "Apple ID".
  2. I actually have terminate functionality built into my app if it becomes so out of date that it can no longer act on the data it receives from the server (my app is an information app that requires connectivity to my web service). My app has not been rejected for having this functionality after a dozen updates over a couple years, although that function has never been invoked. I will be switching to a static message instead of terminating the app, just to be safe to avoid future updates from being rejected.

I have found that the review process is at least somewhat subjective, and different reviewers may focus on different things and reject over something that has previously been overlooked many times.

like image 36
Dan Avatar answered Sep 17 '22 17:09

Dan