Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

iOS' native Review API plugin

Discussion in 'iOS and tvOS' started by _Adriaan, Jun 21, 2017.

  1. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Edit:
    Hey folks - Unity now has this built into the engine, so no need to use my plugin :)

    See here: https://docs.unity3d.com/ScriptReference/iOS.Device.RequestStoreReview.html

    Original post:
    Hey everyone!

    I just wrote this super simple plugin and wanted to share it with anyone in need of it!

    This simple plugin attached to this post requests iOS' new native Review API window. Make sure to read the reference docs on Apple's site for the rules on how to use it.

    iOSReviewHiddenFolks.png

    To use it, just call iOSReviewRequest.Request(); when you want it to pop up.
     

    Attached Files:

    Last edited: May 29, 2018
  2. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    It's dead simple ;) I bet this plugin will actually teach you how to make your own yourself later!
     
  3. Bruder

    Bruder

    Joined:
    Aug 9, 2014
    Posts:
    56
    Thanks @_Adriaan ! Small question: Do i always use it or i have to detect that the iOS version is > 10.3?
     
  4. tridentcanadainc

    tridentcanadainc

    Joined:
    Mar 8, 2017
    Posts:
    10
    Does it display correctly on a landscape screen?
     
  5. Deleted User

    Deleted User

    Guest

    I just tried it in landscape. Looks fine.
     

    Attached Files:

  6. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Sorry for the late reply everyone! Here's some clarifications:

    - if the version of iOS is below 10.3, the call will simply not do anything... that's how iOS handles things like this.
    - this plugin simply calls the native iOS review popup, so portrait or lanscape shouldn't matter: iOS will handle it.
     
    Deleted User likes this.
  7. charlesJRG

    charlesJRG

    Joined:
    Jul 18, 2016
    Posts:
    16
    Thanks Adriaan,

    Also hidden folks is utterly wonderful :)
     
    _Adriaan likes this.
  8. mehradmbs

    mehradmbs

    Joined:
    Sep 7, 2013
    Posts:
    11
    Thanks For your plugin,
    I want to know that the user tap on submit button or not, how can i figure it out with your plugin?!
     
  9. Deleted User

    Deleted User

    Guest

    If you read the link to the Apple reference provided above, it appears there’s no way to know whether the user has hit submit or cancel or even if the dialog came up.
     
    _Adriaan likes this.
  10. mehradmbs

    mehradmbs

    Joined:
    Sep 7, 2013
    Posts:
    11
    Thank you @technicat
     
    Deleted User likes this.
  11. Rodlaiz

    Rodlaiz

    Joined:
    Jul 30, 2013
    Posts:
    38
    Hello, I have a question, the Submit button appears unavailable (grey) for me. Any idea why is that?
    Thank you for the plugin
     
  12. Deleted User

    Deleted User

    Guest

  13. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    semangix, Deleted User and andymads like this.
  14. Lajo

    Lajo

    Joined:
    Dec 23, 2016
    Posts:
    24
    With the Unity plugin do you still have to write code in Xcode or is it as simple as insertingiOSReviewRequest.Request() into your C# code
     
  15. thexdd

    thexdd

    Joined:
    Mar 20, 2013
    Posts:
    19
    Does android have anything like that?
     
  16. inkredibl

    inkredibl

    Unity Technologies

    Joined:
    Nov 11, 2015
    Posts:
    21
    @thexdd I'm afraid this feature is iOS specific and Android does not have anything like that at the moment. There's deep-linking to the Play Store but that's about it.
     
  17. umair_hassan1991

    umair_hassan1991

    Joined:
    Jun 27, 2018
    Posts:
    18
    how can we find if user has actually rated?
    Any callbacks for this one?
     
  18. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    The App Store API does not give any callbacks or feedback.
     
  19. Wecica

    Wecica

    Joined:
    Jul 20, 2016
    Posts:
    27
    I use Unity's API to request the review. But there is no text display for my game. Is this will be automatically changed when in the real app environment, or I need to do something to write the description?
     

    Attached Files:

  20. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Apple's popup first only gives the option of rating the game, and once you have, you'll get the option to also write a review. This is default iOS behaviour for that popup.
     
    Deleted User likes this.
  21. gjo1128

    gjo1128

    Joined:
    Apr 22, 2015
    Posts:
    4

    I tried your plugin a while ago when you first posted it, and it worked great. But now for some reason it is no longer working. I never touched it after I got it working, so could it be outdated with the latest Unity or iOS? So I went to the Unity URL you posted, but I have no idea how to use "Device.RequestStoreReview" and make it work. Is there a tutorial somewhere, or could you easily describe what I need to do to get a ratings box working in my app? Sorry, but I struggle a bit with programming. Thank you! :)
     
  22. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    The script where you call 'Device.RequestStoreReview();' will need a 'using UnityEngine.iOS;' at the top of the script. It should really be as simple as that!
     
    ngoson107 and tonyrobots like this.
  23. gjo1128

    gjo1128

    Joined:
    Apr 22, 2015
    Posts:
    4
    Thank you so much! It worked and it was very easy to do. I had it fixed in under a minute. I never would have known to add 'using UnityEngine.iOS;' to the script. It would be nice if Unity's website gave more information to make it easier for those who are still learning. Thanks again for helping and for responding so quickly! :)
     
  24. keeves_test14

    keeves_test14

    Joined:
    Dec 5, 2016
    Posts:
    13
    Hello @_Adriaan, Could you please help me? I download this plugin but could not understand how this plugin will redirect to my app store link? Please help me.
     
  25. keeves_test14

    keeves_test14

    Joined:
    Dec 5, 2016
    Posts:
    13
    My app is live in the store. but still submit option is not enabled. Could you please help me @_Adriaan?
     
  26. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Did you check whether the submit option is enabled on other devices with non-developer accounts? I would assume that you are trying to submit a review to your own game, which isn't possible on iOS.
     
  27. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Also: don't use my plugin. Use the thing Unity implemented. It's right at the top of my original post.
     
    ngoson107 likes this.
  28. keeves_test14

    keeves_test14

    Joined:
    Dec 5, 2016
    Posts:
    13
    I'm not getting you. Please share a detailed steps to work it. I am using non developer account
     
  29. keeves_test14

    keeves_test14

    Joined:
    Dec 5, 2016
    Posts:
    13
    I used "Device.RequestStoreReview". but still the submit button is disabled. I can't submit it to the store
    .Please help or suggest a solution @_Adriaan
     
  30. keeves_test14

    keeves_test14

    Joined:
    Dec 5, 2016
    Posts:
    13
    Please help me once @_Adriaan .I want to change the message when the pop up is showing. Could you please guide me how to change?
     

    Attached Files:

  31. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    @keeves_test14 I cannot help you. You are misunderstanding what Apple's Review API can do. Read the documentation here: https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview

    If the popup shows in your development build, the submit button will work for other users. You can't change the text of the popup, as it is an Apple API call you're making. The call doesn't return anything and you can't give any parameters. It's just a single function call. Everything else is handled by Apple's API and Unity.
     
  32. DimaHubenkoGamepoint

    DimaHubenkoGamepoint

    Joined:
    May 16, 2018
    Posts:
    20
    Is there any chance to remove this scrolling when text doesn't fit? Maybe increase popup size? This mostly appears on landscape, 2 lines don't fit... Screenshot at Jul 23 12-24-25.png
     
    Last edited: Jul 23, 2020
  33. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Unity just calls a single iOS function. The looks and workings of the popup are entirely up to Apple, so if you want to complain about this scrolling, you should send them a bug report / suggestion ;)
     
  34. Funtyx

    Funtyx

    Joined:
    May 3, 2017
    Posts:
    35
    I have the following problem in iOS 13.7 on Iphone and Ipad. When you press the Rate button, nothing happens. Everything works in iOS 14.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine.Android;
    4. using UnityEngine;
    5. #if UNITY_IOS
    6. using UnityEngine.iOS;
    7. #elif UNITY_ANDROID
    8. using Google.Play.Review;
    9. #endif
    10.  
    11. public class RateAndReview : MonoBehaviour
    12. {
    13. #if UNITY_ANDROID
    14.     private ReviewManager _reviewManager;
    15.     private PlayReviewInfo _playReviewInfo;
    16. #endif
    17.  
    18.     public void RateReview()
    19.     {
    20. #if UNITY_IOS
    21.         Device.RequestStoreReview();
    22. #elif UNITY_ANDROID
    23.         _reviewManager = new ReviewManager();
    24.         StartCoroutine(ReviewCoroutine());
    25. #endif
    26.     }
    27.  
    28. #if UNITY_ANDROID
    29.     private IEnumerator ReviewCoroutine()
    30.     {
    31.         var requestFlowOperation = _reviewManager.RequestReviewFlow();
    32.         yield return requestFlowOperation;
    33.         if (requestFlowOperation.Error != ReviewErrorCode.NoError)
    34.         {
    35.             Application.OpenURL("https://play.google.com/store/apps/details?id=om.app_name");
    36.             yield break;
    37.         }
    38.         _playReviewInfo = requestFlowOperation.GetResult();
    39.  
    40.         var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);
    41.         yield return launchFlowOperation;
    42.         _playReviewInfo = null;
    43.         if (launchFlowOperation.Error != ReviewErrorCode.NoError)
    44.         {
    45.             Application.OpenURL("https://play.google.com/store/apps/details?id=com.app_name");
    46.             yield break;
    47.         }
    48.     }
    49. #endif
    50. }
     
  35. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    viesc123 likes this.
  36. Ali1018

    Ali1018

    Joined:
    Jan 1, 2018
    Posts:
    1
    How it is going to get link or app store account where game is uploaded for rating it i have testing it in test project it is working fine but how it will rate on app store because we are not providing link anywhere pls help
     
  37. TarkinStudios

    TarkinStudios

    Joined:
    Jul 31, 2014
    Posts:
    3
    Application.OpenURL("https://apps.apple.com/app/[TU_APP_ID]?action=write-review");|