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

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. :)

Related

Communicating with other apps and getting data from them

On the click of a button in my app I want to launch the youtube app and check if a user is signed in and retrieve his youtube channel address and save it somewhere in my app. At first I though I could have the button open safari and take the user to the youtube sign in page and once he signs in ill copy the url of his homepage, but I dont think this possible and if it is there will be a lot of problems that I have to take into account.
Anyone got any ideas on how this could be done?
Since iOS uses app sandboxing you can't retrieve information from other apps, unless they explicitly call your app back.
You may use Youtube API to achieve what you want. The user would log in Youtube within your app, then you get the user's channel info.

Open App Store 'Featured' page (not a specific app) from a link.

I know that an app can be linked to directly from an URL so that when it is clicked on my phone, the AppStore app will open and guide me to the app in question but is it possible to link to the 'Featured' page (or better still the 'Redeem' page of AppStore from a link?
The scenario is I send a promo code for AppXYZ out in an email and the recipient can click that email link and be taken to (a) the AppStore app or (b) the AppStore app Redeem page passing the code through.
I know the link for something similar in iTunes but not AppStore. Can't seem to find any info other than links to specific apps (which I don't want).
iTunes: itmss://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/freeProductCodeWizard?code=THE_CODE
Thanks in advance.
If you want to redeem a code on the App Store it nevertheless always goes through the link you provided, but correctly spelled:
itms://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/freeProductCodeWizard?code=THE_CODE
It opens the iTunes app on iOS with the code filled in, the user still has to tap on redeem as it's still a transaction. If he does so, the app will automatically be downloaded (just tested it with the latest iOS version)
I tried to copy a couple of links from the desktop iTunes and checked, if they work on iOS, but the answer is no. E.g.:
https://itunes.apple.com/us/collection/editors-choice/id25204?fcId=531794418&mt=8
https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewRoom?fcId=1188885481&genreIdString=36&mediaTypeString=Mobile+Software+Applications
https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewRoom?fcId=554381198&genreIdString=36&mediaTypeString=Mobile+Software+Applications
(Also tried it with itms:// instead of https://)

Detect app url download location after iOS app install

I have a requirement where i publish the iTunes app link to download the app in the website.
say i have 3 websites A, B, C
After the app is downloaded from the link, based on the website from where it has redirected i need to show custom message or image .
Say if the user click on download app on website A, then after the app is opened it should show "you have downloaded from website A"
No you can't, simply because the user downloads the app from the App Store and not from the website.
I do not have much experience with website development but I think you can set something on website where if you click on AppStore link it triggers an event to database and stores website name and whenever App is opened for the first time you call a web-service that interacts with your database and tells you the website name. But I do not think Apple will be happy seeing something like that in an App.

iOS how can open app from url or redirect to app store to download the app

I'm tryin to implement sending email or message with url to be open in the app but in case the user doesn't have the app install the url should redirect to download the app in the app store. For example:
1.- user1 sends email to his family with the url to load information in the app
2.- the family doesn't have the app install on there iOS devices and when they click on the url loads the itunes store to download the app. When they download the app the click the url again and the information is load it.
any of you knows how can implement something like this?
I'll really appreciate your help
The email should contain a link to a webpage for the content if possible. Then, that webpage should be designed so content can be opened in the app (see this question).
Since it is difficult to detect if the app is installed from a webpage, the webpage can have a link to install the app if it is not installed.
You are going to have to launch the app using the already suggested method:
window.location = "myapp://myparam";
Then you are going to need to check if that page launches or not (whether your app starts up or not). If it does not then you can launch a search in the app store by this means:
window.location = "itms-apps://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=(your company/app name)"
Instead of doing this search you could also just provide the link directly in the app store to your app. I see the hardest part being checking whether or not your app launches from the original attempt to launch your app through window.href, I don't know how to accomplish that check.

Form to send iOS app via text message

Is there a service that allows me to put a form on my site that will send a link to my iOS app to a user?
User goes to my site
User inserts their cell phone number in a field
User receives a text message with the link to download my app
Does this make sense? Is there a better way? I've seen this before but can't remember where...
Currently do people really just take out their iPhones, open the app store, search for the app name to download it?
PS: Before posting I searched Google and this site but didn't find any answer.
Not quite what you're looking for, but probably a lot easier for you to do: You could create a QR-Code that contains a link to your app in the App Store. Then people can scan it with their phones (there are tons of popular apps that can do this), and when it opens the URL, the user will be redirected to the app store.
Just use the https://itunes.apple.com/us/app/[...] link from iTunesConnect for your app.

Resources