title: Launching App Store from App in Swift
body: <p>I am creating an app, and I have a banner which promotes my other app. This is my code:</p>
  
  <pre><code>var barsButton : UIButton = UIButton(frame: CGRectMake((self.view.bounds.width / 2) - 51, self.view.bounds.height - 100, 102, 30))
  barsButton.setImage(UIImage(named: "Bars Icon 2.png"), forState: .Normal)
  barsButton.addTarget(self, action: "openBarsLink", forControlEvents: UIControlEvents.TouchUpInside)
  
  func openBarsLink() {
      var barsLink : String = "itms-apps:https://itunes.apple.com/app/bars/id706081574?mt=8"
      UIApplication.sharedApplication().openURL(NSURL.URLWithString(barsLink))
  }
  </code></pre>
  
  <p>However, when the user presses the button, it just takes them to the App Store, and not the specific page for my app. What am I doing wrong?</p>