redirect iphone app to apple store - ios

I have an iphone app, and when there are upgrades available, I want to prompt the user to upgrade, and if they click upgrade, I want to redirect them to the apple store. How is this done?
Thanks

Apple documents the process here: http://developer.apple.com/library/ios/#qa/qa2008/qa1629.html
The basics boils down to using an NSURL to open an iTunes link:
NSString *iTunesLink = #"http://itunes.apple.com/us/app/warehouse51/id364201184?mt=8";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
However, I don't believe there is a way to direct to the upgrade tab.
Note: phobos links are generally outdated, so ignore that your link won't look like the example in Apple's doc. It will generally look like the one in my updated example here.

Just open the appropriate iTunes URL for your application. Users will have to go to the update tab on their own, though.

You'll either want to use a Push notification, or have your app check somewhere online (that you can update) so when an update is available you can present an alert. Then, upon an OK from the user, simply send 'em to your app in the store using the itunes URL.

Related

How to use url scheme for application not installed in device

I have an application in store, which allow to display a list of items in a first view, details of an item in the second view.
I use the url schemes to access to the details of an item from an external source (Facebook for exemple)
My question: if the application was not installed in the device, is there any way that allow to download the application and open it at the right item (using url scheme)
Thank in advance
For iOS>9
if ([[UIApplication sharedApplication] openURL:SchemaURL] == false)
{
[[UIApplication sharedApplication] openURL:iTunesAppURL];
}
What you're describing is called Deferred Deep Linking (Deep Linking refers to using a link to open your app directly to a specific piece of content, and Deferred means that it works even if the app isn't installed first).
Unfortunately there's no native way to accomplish this on either iOS or Android. URL schemes don't work, because they always fail with an error if the app isn't installed. Apple's newer Universal Links in iOS 9+ get closer in that they at least don't trigger an error if the app isn't installed, but you'd still have to handle redirecting the user from your website to the App Store. You can't pass context through to the app after install with Universal Links, so you wouldn't be able to send the user to the correct item, and they actually aren't supported in a lot of places.
To make this work, you need a remote server to close the loop. You can build this yourself, but you really shouldn't for a lot of reasons, not the least of which being you have more important things to do. A free service like Branch.io (full disclosure: they're so awesome I work with them) or Firebase Dynamic Links can handle all of this for you.
First Query that URLScheme and know about the status of the application whether it is installed or not. If it is not installed give him/her a popup to install that application from app store. You can navigate user to app store link when clicks OK from alert.

how to add one or more apps in single app

I have a situation,
where more than two separate iOS apps together to form a single app. The apps have entirely separate to each other and concept is money based program. Is there any way press a button and one project would run. And the press another and another project would run.
In App Purchase will help for this question, like this
Notification center label http://imagizer.imageshack.us/v2/800x600q90/12/v4v4.png
Second, How to update that single app when more than one app was incorported and how to show notification on top of the app. Is there is any tutorial for this question.
Please help me, I saw one or two solution but i didn't get any idea for this question.
It is easy. Just use an open url scheme and give the link to the other iOS application that you wish to open from within your application.
Refer to "Communicating with Other Apps" in the following developer documentation:
https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html
NSURL *myURL = [NSURL URLWithString:#"itunesLinkToOtherProject"];
[[UIApplication sharedApplication] openURL:myURL];
To come back to your app from the other application, use a similar custom URL scheme for your app within the other application. Thus you will be able to go from your app to the other app and vice versa.

How to implement opening AppStore page before the app is on the market?

I found the following code sniplet here:
NSURL *url = [NSURL URLWithString:#"itms-apps://itunes.com/apps/???"];
[[UIApplication sharedApplication] openURL:url];
Now assume app would know if there is a new version available at the market (using own server) how to implement redirecting2/displaying correct appStore page if my app isn't at the market yet. I need to know the link before I will upload it to apple. How to know what the url it will be?
Assuming you already have your Developer Account, you can start the app submission process. Fill out all the details, etc, but just don't upload your binary.
Once you've gotten to the very end, and it's ready for you to upload a binary, iTunes Connect will actually give you your iTunes URL. You should be able to copy and paste that into your app before building it, and uploading your final binary.
Alternatively, you could always use a URL on one of your own servers and just do a redirect to the iTunes URL. This way you can update that outside of the app. This is actually what I used to do before Apple made the URL available ahead of time.
You have to create an app record on iTunes Connect. Just fill in some
dummy data to start with. Once you have the app record there will be
an Apple ID for it, something like 123456789.
'
If you are using Appirater then this is the number you need to fill in
in the header, otherwise the link (copied out of appirater) is
itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID
where APP_ID is the number you got from iTunes Connect.

No Twitter accounts yet on iOS Device

If a user does not have a Twitter account installed on their device is there a good way to prompt them to install one and take them to the Settings panel to do so? I know before iOS 5.1 there was a URL to take them to the settings screen, but I think that no longer works. It seems pretty sloppy to tell them they do not have an account and just leave 'em hanging.
openURL has not been deprecated. At least not according to the API documentation.
Just use a UIAlertView to ask whether the user would like to add an account. If they say yes, call the following line:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=TWITTER"]];

How do I launch the iTunes Store app from my application?

How do I launch the iTunes Store app from my application? I want to take the user to a podcast page.
Create a UIWebView, and put the link in so that when they press the button/link, it sends then to the URL for the web page. You'd think it'd open up in the webView, but usually iTunes automatically opens the iTunes app or the app store.
Need you learn how to use a webView? There are plenty of tutorials out there that can help. You can simply Google a tutorial, or search YouTube. Or, you can also post another question if you reach a problem.
Hope this is what you're looking for, your question was slightly confusing. If it isn't, I'd suggest revising your question slightly to specify.
Go here to get the URL for your podcast in iTunes.
Replace "http://" with "itms://" in the URL you got in step 1.
Put this code where you want to open your podcast:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"<URL FROM STEP #2>"]];
Couldn't you just find the link of the podcast in iTunes and then encorporate the link in your application?

Resources