nicklockwood / iRate

[DEPRECATED]
http://charcoaldesign.co.uk/source/cocoa#irate
Other
4.1k stars 734 forks source link

iOS 11 problem with opening app page in the App Store #302

Open janbjelicic-sunhill opened 7 years ago

janbjelicic-sunhill commented 7 years ago

Hi guys,

when using this code: [[iRate sharedInstance] openRatingsPageInAppStore];

The app opens the app store but the message stands "Verbindung zum App Store nicht möglich" (I think the english translation is Can't connect to App Store)

The app already exists on the app store, and this code worked for the previous iOS versions.

P.S. I assume this is expected since Apple changed the whole App Store in iOS 11.

nicklockwood commented 7 years ago

Is this using the latest version of iRate? The URL changed recently.

janbjelicic-sunhill commented 7 years ago

I tried it an hour ago, updated to the version 1.12.1 via Cocoapods

EddyLB commented 7 years ago

I use version 1.12.1 via Cocoapods and confirm. I get the message 'Cannot Connect to App Store' in the App Store app when calling [[iRate sharedInstance] openRatingsPageInAppStore];

bvirlet commented 6 years ago

The URL seems not to work anymore with the action=write-review parameter (I can reproduce the issue in Safari). Eg the App Store doesn't support opening (scrolling) to the new "Ratings & Reviews" section.

vtourraine commented 6 years ago

I confirm this is an issue. Even using the https-based URL (e.g. https://itunes.apple.com/app/blabla/idXXXXXX?action=write-review) fails to load.

The documentation is still suggesting to use action=write-review, so I think it’s Radar time.

In the meantime, apps should not open the “write review” URL on iOS 11, just the basic App Store link.

hixfield commented 6 years ago

I confirm I have the same issue on the iOS 11 GM seed. How can we fix this?

zapjonny commented 6 years ago

Will this repo be fixed soon?

How can we fix this in the meantime?

zapjonny commented 6 years ago

Update:

First, sorry my bad, I had locked iRate below version 12 in my podfile.

Fixing that, I think I know what was going on. I probably locked iRate below 12 in order to avoid the iOS 10.3+ way of opening the in-app rate alert (I don't remember the reason for this, but hey).

In my app I had two cases where I used iRate.

  1. When you do an in-app action enough times, the alert "wanna rate?" popped up.
  2. In the options menu, I had an extra option "rate now" which directed the user to the app store review page, so the user could rate easily at any time.

Now, the iRate.sharedInstance().openRatingsPageInAppStore() is still broken for iOS 11.0 users. However iRate.sharedInstance().promptIfNetworkAvailable() will work, if we accept the 10.3 in our app. I guess that should be the proper way since iOS 10.3 anyway and we just have to live with it.

So at this point, I assume that for me, 1 should work if I use the latest iRate, and 2 will work if use iRate.sharedInstance().promptIfNetworkAvailable() instead of iRate.sharedInstance().openRatingsPageInAppStore() which won't work on iOS 11.0.

zapjonny commented 6 years ago

Okay, I guess even that's not the end of the story. I thought twice and thrice and I guess case 2 above is a no-go since iOS 11.0 (or probably also since 10.3, in a way).

First, it doesn't make sense to prompt the user in the same way in 2 as I do in 1, I'd want to open the review page below 10.3 and open the in-app SKStoreReviewController from 10.3 and up. However with the current iRate there is no way to do that, unless possibly if we fix it so we can call [self promptForRating: NO];.

But the discussion doesn't end there because on iOS 10.3+ that would ultimately call https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview which, as is stated in the docs, might or might not open the review UI. Which is in terms with how Apple wants the review experience to work...

I guess I will have to advocate to my director to remove case 2 and only use case 1 above - rate upon some rare user interaction.

Also in the long run I guess Apple is specifically wanting to shoot down iRate and similar libraries that show review popups.

neave commented 6 years ago

A workaround is to include a two-letter country code and app name in the URL, such as this:

https://itunes.apple.com/us/app/twitter/id333903271?mt=8&action=write-review or itms-apps://itunes.apple.com/us/app/twitter/id333903271?mt=8&action=write-review

The full URL for your app can be obtained from https://linkmaker.itunes.apple.com/

This successfully opens the "write a review" interface in the iOS 11 App Store. This workaround is not ideal however as changing the app title would also change its URL, thus breaking the workaround. Hopefully Apple will fix this soon for the shorter URL.

See rdar://34498138

dpa99c commented 6 years ago

The country code and app name must be present in the URL but are ignored - only the ID needs to change. Also mt=8 is not required. I.e. this works:

itms-apps://itunes.apple.com/xy/app/foo/id{your_app_id}?acti‌​on=write-review

Tested on iOS 11.0 (15A372).

zapjonny commented 6 years ago

^ That one really works... so for a fast fix, I guess I could go with it if iRate was updated with this. Will iRate be updated or will I have to fork this? 🙄

bvirlet commented 6 years ago

Maybe you can fork, and offer a pull request 😉

nicklockwood commented 6 years ago

@zapjonny you can override the URL without forking iRate by adding this to your setup code:

 [iRate sharedInstance].ratingsURL = ...
zapjonny commented 6 years ago

@nicklockwood Good one! It works ✌️ I’ll use this and go back to iRate below 12 for minimum code changes.

tirrorex commented 6 years ago

Can confirm workaround to be working, thanks

EddyLB commented 6 years ago

Confirmed. Thanks

spookyhouse commented 6 years ago

Thanks @neave. This works!

alper commented 6 years ago

OK. And this also works on iOS 10 I just tested.

mstolin commented 6 years ago

@dpa99c I fixed this issue for my app (im not using iRate) with using an url like tms-apps://itunes.apple.com/app/twitter/id333903271?mt=8&action=write-review. I didnt add a language code but mt=8 is still necessary. Without mt=8 the App Store app will show the Can't connect to App Store error message. I tested on iPhone 5s iOS 11.0.