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

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?

Related

What URL to use for sharing app on Facebook, twitter,...?

I would like to include a button in my app "share this app'. And then I would popup the
standard UIActivityViewController. I would attach the URL to my app in the app store.
But what URL should I use? Are there any guidelines? I would like that it shows pretty on Facebook, twitter and stuff...
This is a duplicate, already answered this question see the link ..
But you need to have the app on the appstore already so yeah, or you need to be sure of your appname.
EDIT:
Use itms:// instead of http:// for it to open directly in the appstore and not redirect from the browser first
I looked at the post mentioned by Andre Filoppio. It does indeed mention a lot of different URL that could potentially be used. I have been testen them all, the only one that got my nice pretty Facebook mention was:
http://itunes.apple.com/app/idXXXXXXXX (where XXXXX is your app id)
The fancy ones like http://appstore.com/ProductNameWithoutSpacesAndStuff
all have the same problem: they have so many redirects, or open in itunes directly, that Facebook just displays this kind of message "connecting to Itunes store" instead of your app icon with something like "available on the app store"
(sorry guys I had a nice picture, but apparently I don't have enough reputation to post this to this answer)

how do you open a link to the itunes storefront for browsing the store

I would like to open a link to the iTunes Storefront so that a user can browse the store. In the iPhone Music app, you can click on the "Store" button and get redirected to the music store front. From there, a user can browse the store. I would like to be able to do the same thing, but I don't know the url.
I've tried the obvious link using the following code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.apple.com/"]];
but this gives an error stating that the address in invalid. Using phobos.apple.com doesn't give an error, but it doesn't bring anything up in the browser.
If this is possible, then I would preferably like to use an iTunes affiliate link so that I get credit for a purchased song. Is that possible?
Try https://itunes.apple.com/us/store
However, if you want to work with affiliate links you'll want to take this one step further and resolve the redirects associated with them behind the scenes, before sending the user on (or you get a "stutter step" where the user is sent into the safari app first). That's where you'll want to try something like what we've got on our site:
http://www.georiot.com/using-georiot/resources/itunes/linking-tools#linking-inside-ios

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.

launching an itune music link in app browser NOT the itunes app~

hi my app has links to an itunes music album
like this
http://itunes.apple.com/us/album/better-than-a-hallelujah/id366013643?i=366013659&ign-mpt=uo%3D4
when they click the link in my app, i want to open it in my app (i have a uiwebview), problem is that it launches the uiwebview in my app, but the page is blank, the address bar is also blank, i.e. it doesn't contain the address http://itunes.apple.com/us/album/better-than-a-hallelujah/id366013643?i=366013659&ign-mpt=uo%3D4
i think it is because it is trying to launch the itunes app in the simulator/device
but i don't care, i want the http://itunes.apple.com/us/album/better-than-a-hallelujah/id366013643?i=366013659&ign-mpt=uo%3D4 to load in the browser and display the content like you would in the desktop browser.
please help thanks
As I got from your question, you need to display the album data in your app. For doing that I suggest you two ways.
First solution is to use NSURLRequest with the url and download it's data and load the html in the webview. (you may change the User-Agent too if you wanted to get the desktop version of the page.
The second one is using iTunes API to get album data from iTunes Store as JSON and then display the data in your custom view.
You can get more information on iTunes Store API here
Hope it helps. :)

redirect iphone app to apple store

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.

Resources