Insert “Download on iTunes” button in app

前端 未结 1 746
庸人自扰
庸人自扰 2021-01-23 22:11

My app shows the title of a certain song and I would like to insert a \"Download on iTunes\" button that open iTunes on my iPhone pointing to my song. I\'ve retrieved the correc

相关标签:
1条回答
  • 2021-01-23 22:51

    Finally this worked for me:

    - (IBAction)buyAlbum:(id)sender
    {
        NSString* url = @"itms://itunes.apple.com/it/album/love-life-lamore-e-la-vita/id298792107?uo=4";
    
        [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url ]];
    }
    

    yassa

    0 讨论(0)
提交回复
热议问题