0

I have URL coming from server and I have to open it in Safari on my iPhone but it always says "Safari Cannot Open URL, Invalid Address". Here is the URL http://click.linksynergy.com/fs-bin/stat?id=egb2DUM1TzE&offerid=146261&type=3&subid=0&tmpid=1826&RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Falbum%252Fdead-gone-feat.-justin-timberlake%252Fid291279841%253Fi%253D291279876%2526uo%253D4%2526partnerId%253D30

But I can successfully open this URL on Mac Browser. I understand this is the matter of Encoding but how can I decode it order to open it on my iPhone's Browser. Thanks-

Mike Abdullah
  • 14,933
  • 2
  • 50
  • 75
  • Take a look at the link below. It should be aplicable for your case... http://stackoverflow.com/questions/11965990/ios-remove-special-characters-from-url-string/11966389#11966389 – Ariel Aug 18 '12 at 14:30

2 Answers2

0

itunes affiliate links should work on both the mac and iOS. It could be that the link is not available in the store region that you have set on the iPhone. If you are controlling the server address then I would suggest using a shortened URL as explained in this link: http://david-smith.org/blog/2011/12/28/user-friendly-itunes-affiliate-links/

Nik Burns
  • 3,363
  • 2
  • 29
  • 37
0

It's not your affiliate link that is the issue, it is the link you are using to the album itself that is causing issues on the device. The link

http://itunes.apple.com/us/album/....

will work fine on desktop safari and will cause itunes to launch if they have it installed.
When you are on device, the http needs to be replaced with itms or else you will get the error you are seeing so

itms://itunes.apple.com/us/album....

is what you are looking for if you are viewing the link from a device. The itms link will also work from desktop safari, but won't work from IE or Firefox, etc. Something to note, an itms link will not work on the iPhone simulator.

Here is a link to a stackoverflow question that also deals with this issue.

Community
  • 1
  • 1
Walter
  • 5,867
  • 2
  • 30
  • 43