Why does the affiliate link not work?

Discussion in 'iOS Programming' started by richardcanada, Jun 20, 2016.

  1. richardcanada macrumors newbie


    Jun 20, 2016
    Hello everyone,

    Does anyone know what went wrong when I code the following button to link to the App Store?

    @IBAction func appStore(sender: AnyObject) {

    if let url = NSURL(string: "https://geo.itunes.apple.com/us/app/clash-royale/id1053012308?mt=8")

    { UIApplication.sharedApplication().openURL(url)



    That is an affiliate link from iTunes Link Maker. I connected it to a button on my app. Why the affiliate link can't open with this code? This block of code can open other general web links in the app. What should I change?

    Thank you,

  2. Mascots macrumors 68000


    Sep 5, 2009
    itms:// allows you to link directly to the App Store,, try that?

Share This Page