Opening the Apple TV App Store

前端 未结 7 1128
南旧
南旧 2020-12-13 22:06

Trying to build a tvOS app and one of the use cases I have is to be able to link off and open another app in the Apple TV App Store directly on a button click. Can someone p

7条回答
  •  情深已故
    2020-12-13 22:34

    This is the solution for Swift 4: Replace XXXXXXXwith your app id. With this solution its possible to create an appstore link for a not yet released app because only the app id (known from appstore connect) is needed.

    guard let tvOSAppStoreUrl = URL(string: "com.apple.TVAppStore://itunes.apple.com/app/idXXXXXXX?mt=8") else {
      return
    }
    
    UIApplication.shared.open(url, options: [:], completionHandler: nil)
    

提交回复
热议问题