Launching App Store from App in Swift

前端 未结 9 1022
情深已故
情深已故 2020-12-31 01:43

I am creating an app, and I have a banner which promotes my other app. This is my code:

var barsButton : UIButton = UIButton(frame: CGRectMake((self.view.bou         


        
9条回答
  •  醉酒成梦
    2020-12-31 02:14

    As openURL is deprecated from iOS 10 use below code:

    UIApplication.shared.open((URL(string: "itms://itunes.apple.com/app/" + appStoreAppID)!), options:[:], completionHandler: nil)
    

提交回复
热议问题