iTunes links go to iTunes store (don't open in UIWebView...)


Am I missing something? Are you able to get the iTunes HTML to show in the UIWebViewController? It redirects to the iTunes store on an actual device but does nothing on the simulator. Is there a way to tell apps to ignore redirects to links to the itunes store?

In a browser this: … 47726?uo=2

redirects to this: … mpt=uo%3D2

Related discussions are here: … -apple-com … a1629.html



If you use the online json viewer to view the structure of the itunes json: … it=10/json

you will see there are two elements under link (entry -> link), the first one is the actual song link … 98387?uo=2

the second one is the 10-20sec preview of the song: … .aac.p.m4a

I think the book simply asks you to link to the sample clip (.m4a), not the first one:

if ([links count] > 1) {
     NSDictionary *sampleDict = [[links objectAtIndex:1] objectForKey:@"attributes"];
     // The href of an attribute object is the URL for the sample audio file
     [b][self setLink:[sampleDict objectForKey:@"href"]]; [/b]

OT: what the heck is Gangnam Style?