Note that there are some explanatory texts on larger screens.

plurals
  1. POOpening iTunes Store to specific song
    primarykey
    data
    text
    <p>Ok, I have seen similar questions here but none are actually answering the problem for me.</p> <p>I have a streaming audio app and the stream source returns to me the song title and artist name. I have an iTunes button in the app, and want to open the iTunes STORE (search) to that exact song, or at least close. I have tried the following:</p> <hr> <pre><code>NSString *baseString = @"itms://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?songTerm="; NSString *str1 = [self.songTitle2 stringByReplacingOccurrencesOfString:@" " withString:@"+"]; NSString *str2 = [self.artist2 stringByReplacingOccurrencesOfString:@" " withString:@"+"]; NSString *str = [NSString stringWithFormat:@"%@%@&amp;artistTerm=%@", baseString, str1, str2]; [[UIApplication sharedApplication] openURL: [NSURL URLWithString:str]]; </code></pre> <hr> <p>This call does indeed switch me to the iTunes STORE as expected, but then it pops up an error "Cannot connect to iTunes Store". I am obviously on-line as the song is actively streaming, and I am in the store. The search box in iTunes app only shows the song name and nothing else.</p> <p>Here is an example of a generated string: itms://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?artistTerm=Veruca+Salt&amp;artistTerm=Volcano+Girls </p> <p>I have tired taking the string it generates and pasting it into Safari, and it works OK on my Mac, opening to albums from the artist in the store. Why not on the phone? </p> <p>Also, it seems to ignore both items, as it does not take me to the song by that artist. Does this require also knowing the album name (which I do not have at this time.)</p> <p>Help would be appreciated. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload