laurie
laurie

Reputation: 1015

itms or itms-apps links no longer open AppStore?

I used to have a UIButton that would load an URL in the form of itms://example.com this when pressed would load the relevant item within the AppStore application on iOS (rather than in the browser).

However that is no longer working for me. If I switch the URL to https:// then the relevant page opens in the browser but if I use itms or itms-apps then it does nothing. Any ideas why or if there’s a new way of doing this?

The use case is to refer people from one app to download another from the AppStore.

Upvotes: 0

Views: 2037

Answers (1)

Casey
Casey

Reputation: 6701

Using the http link should open directly into App Store app via universal links.

// open Google Earth in the app store
UIApplication.shared.open(URL(string: "http://itunes.apple.com/us/app/google-earth/id293622097?mt=8")!, options: [:], completionHandler: nil)

If you wish to keep the experience inside of your app, then use SKStoreProductViewController as pointed out by rmaddy

Upvotes: 1

Related Questions