Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link to Update page for our app

Tags:

We prompt users to upgrade their app if they're running an outdated version. When users tap our update button, I use openURL with an address like itms://itunes.apple.com/us/app/our-app-title/id12345?mt=8 to load the App Store app to the listing for our app.

With that method, however, the resulting screen has a button labeled "Open" not "Update." If users open the App Store app first, then navigate to our app's listing (or go to the update tab), the button is labeled "Update."

Can I pass the current version as a querystring parameter in the openURL call or is there another way to make sure the Update button is shown? I cannot find current documentation on how to do so. (Everything I find is a few years old and refers to the discontinued phobos tool.)

like image 976
skypanther Avatar asked Sep 08 '15 14:09

skypanther


People also ask

How do I make apps update automatically?

Tap Manage apps & device.Tap Manage, then find the app you want to update automatically. To open the app's "Details" page, tap the app. Turn on Enable auto update.

How do I set my iPhone to auto update apps?

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.


1 Answers

I would recommend you to try SKStoreProductViewController class. iTunes item identifier can be found in https://itunesconnect.apple.com -> My Apps -> Apple ID.

swift:

func openStoreProductWithiTunesItemIdentifier(identifier: String) {     let storeViewController = SKStoreProductViewController()     storeViewController.delegate = self      let parameters = [ SKStoreProductParameterITunesItemIdentifier : identifier]     storeViewController.loadProductWithParameters(parameters) { [weak self] (loaded, error) -> Void in         if loaded {             // Parent class of self is UIViewContorller             self?.presentViewController(storeViewController, animated: true, completion: nil)         }     } }  func productViewControllerDidFinish(viewController: SKStoreProductViewController) {     viewController.dismissViewControllerAnimated(true, completion: nil) } // Usage openStoreProductWithiTunesItemIdentifier("2321354") 

objective-c:

- (void)openStoreProductViewControllerWithITunesItemIdentifier:(NSInteger)iTunesItemIdentifier {     SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init];      storeViewController.delegate = self;      NSNumber *identifier = [NSNumber numberWithInteger:iTunesItemIdentifier];      NSDictionary *parameters = @{ SKStoreProductParameterITunesItemIdentifier:identifier };     UIViewController *viewController = [self topViewController];     [storeViewController loadProductWithParameters:parameters                                    completionBlock:^(BOOL result, NSError *error) {                                        if (!result) {                                            NSLog(@"SKStoreProductViewController: %@", error);                                        }                                    }];     [viewController presentViewController:storeViewController animated:YES completion:nil];     [storeViewController release]; } 
like image 144
Ramis Avatar answered Sep 26 '22 07:09

Ramis