Search Unity

Easy Mobile - Many-in-one package for mobile games

Discussion in 'Assets and Asset Store' started by pt5011, Jan 28, 2017.

  1. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Answered in email, but I think it's worth repeating here: please use a stable version of Unity, since beta versions like 2018.1.0b9 may cause incompatibilities. For example EM works perfectly fine with Unity versions from 5.3.5 up to 2017.3.1. We won't solve incompatibilities with beta versions, because it's likely there will be some changes here and there until they're officially released.
    Thanks.
     
  2. AlexGorcea

    AlexGorcea

    Joined:
    Aug 20, 2013
    Posts:
    22
    I'm getting a "Uploading to Giphy has failed with error 401 Unauthorized", even though both the API key and the username are correct.
     
  3. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi, Giphy are in the process of updating their upload API, that’s why the current uploading method is not working as stably as expected.
    FYI:
    https://github.com/Giphy/GiphyAPI/issues/146
    https://github.com/Giphy/GiphyAPI/issues/143
    They do claim that the updating will complete soon.
    Please try this workaround: update the upload URL (Assets/EasyMobile/Scripts/GIF/Giphy/Giphy.cs) like this:
    OLD PATH >> public const string GIPHY_UPLOAD_PATH = "https://upload.giphy.com/v1/gifs";
    NEW PATH >> public const string GIPHY_UPLOAD_PATH = " https://upload.giphy.com/v1/upload “;

    We already incorporated this fix to the latest version of Easy Mobile (now Easy Mobile Pro) 1.2.0, so you can either apply the fix manually or update your EM to that version.
    Thanks.
     
  4. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I have bought this great and well done asset, and it is easy to use and with full 204 pages PDF, and I am happy that choosed this one over the others available, at this one seem the best for me, and is surely kept updated and alive and the last one was a few days ago, so is very good.

    But I have beginners and silly question maybe:

    What API or line of code is needed to put the button for activating the Game Center in the UI of the game?

    Sorry that I have not found it on the instruction, or maybe I missed it

    Thanks very much

    Best wishes
     
  5. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,

    Thank you so much for choosing Easy Mobile!

    You can bring up Game Center UI either by showing the leaderboards or achievements UI, using the GameServices.ShowLeaderboardUI or GameServices.ShowAchievementsUI.
    Please see chapter Game Services > Scripting in our user guide for more information.
     
    SpaceRay likes this.
  6. 7fan

    7fan

    Joined:
    Mar 7, 2014
    Posts:
    7
    Hello. I bought Easy mobile to implement Unity ADS and In App. But... Ok, I have an Art Background so far, I managed to link IAP Buttons in my app to detect that I'm buying a product (Consumable etc.... I have a fake window store popup which pop when I click press on the buy button in my app... But nothing seems working when testing on my app... on device. Idem, It seems that Easymobile is not detecting that Unity ADS are activated but, they are and working.
     
  7. Shinzironine

    Shinzironine

    Joined:
    Nov 30, 2013
    Posts:
    32
    Hi, I just updated EM to the latest version, but for some reason can't see the Google Services login overlay during the game. While debugging I see that the app authenticates successfully:
    [Play Games Plugin DLL] 03/26/18 20:24:45 +05:00 DEBUG: Auth finished. Proceeding.
    I also see that it all starts with silent authentication:
    Building GPG services, implicitly attempts silent auth
    Is this a problem of not seeing an overlay, or what could it be? Thanks.

    P.S. Because I've also updated my Unity version, the reason of no-overlay could be god knows what, but I did see before the updates.

    Update: for some reason the overlay appears sometimes, it seems like on first launch after some time has passed. Should I also logout the user somewhere when the game closes?
    Achievements also appear regardless of the initial overlay.
     
    Last edited: Mar 27, 2018
  8. BurSari92

    BurSari92

    Joined:
    Sep 4, 2015
    Posts:
    3
    Hi,
    I wanted to test the lite version out, before buying pro, but it won´t work for me... I followed the instructions, but can´t find nor create the neccessary EasyMobile prefab/instance..
    Under Window>EasyMobile isn´t any Settings option, too..
    I have imported the package many times with all it´s content enabled and tried on new projects - without success...

    Could you please fix this issue, so i can test it before buying? Thanks in advice!
     
  9. ZzappSizzler

    ZzappSizzler

    Joined:
    Jan 15, 2017
    Posts:
    33
    I have spent FOUR days trying to fix a "This purchase has already been bought. It will be restored for free" problem with Unity IAP on iOS. I sure have learned a lot about IAP and tried many fixes in my scripts, but nothing worked. I discovered that on iOS Unity throws a NullReferenceException when it starts and receives the unfinished transaction. I was told by Unity that shouldn't be a problem, but IAP would not work, it would be stuck in the endless "This purchase has already been bought" loop. I tried new Sandbox testers, but, very soon, the problem would reappear. I uninstalled and reinstalled both Unity IAP 1.17 and 1.18 several times, but nothing worked.

    Finally, I installed Easy Mobile Pro. It is so much simpler to implement, why on earth Unity IAP has to be so hard to get under the hood I don't know. Anyway, after a couple of hours changing my scripts, guess what? IAP on iOS is working! The plugin sits on top of Unity IAP, so why it works where the Unity Purchaser script didn't, I don't know. It sure simplifies putting IAP in my game and IAP is now working, that I do know. And you can access the scripts, no dlls.
     
    Last edited: Apr 5, 2018
    pt5011 likes this.
  10. Azman138

    Azman138

    Joined:
    Jul 8, 2017
    Posts:
    15
    how to fix it ??



    Assets/_CrossyBridge/Scripts/Services/PremiumFeatures/ScoreReporter.cs(29,32): error CS0117: `EasyMobile.GameServiceManager' does not contain a definition for `UserAuthenticated'
     
  11. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    After enabling Unity IAP, have you imported its package?
    Regarding Unity Ads not detected, try this:
    - Disable Unity Ads in Services window. Unlink your game from the cloud project.
    - Exit Unity.
    - Open the project folder.
    - Remove the Library folder.
    - Remove UnityConnectSettings.asset and UnityAdsSettings.asset in Project Settings folder.
    - Open Unity. Link the cloud project. Enable Unity Ads.

    Hope this helps. For faster support please send us an email to support@sglibgames.com. Thanks.
     
  12. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    Normally you wouldn't want to logout the user on your own. Instead, you should provide them a SignOut button so they can sign out as they wish.
    Thanks.
     
    Shinzironine likes this.
  13. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Thank you so much :D
     
  14. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    To use the Lite version you don't need the EasyMobile prefab.
    As noted in the first page of our user guide, for Lite version you only need to refer to two chapters:
    - Native APIs > Native UI
    - Sharing
    and safely ignore other chapters.
    Thanks.
     
  15. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    Please update to the latest version of Crossy Bridge to fix this.
    Thanks.
     
  16. ZzappSizzler

    ZzappSizzler

    Joined:
    Jan 15, 2017
    Posts:
    33
    EasyMobile Pro has fixed all of my problems with Unity IAP and iOS. However, I have just switched platform to Android and this error appears:

    Assets/Scripts/Appstore.cs(76,60): error CS0117: `EasyMobile.InAppPurchasing' does not contain a definition for `GetProductLocalizedData'

    The code is unchanged from iOS (I've highlighted the offending line):

    if (InAppPurchasing.IsInitialized())
    {
    IAPProduct[] products = EM_Settings.InAppPurchasing.Products;
    int i = 0;
    foreach (IAPProduct prod in products)
    {
    // Get product localized data.
    ProductMetadata data = InAppPurchasing.GetProductLocalizedData(prod.Name);
    if (data != null)
    {
    prices[ i ] = data.localizedPriceString;
    }
    i++;
    }
    Debug.Log("Purchasing Initialised & Prices obtained" + InAppPurchasing.IsInitialized());
    Debug.Log("Purchasing Initialised " + InAppPurchasing.IsInitialized());
    gotPrices = true;
    }
    else
    {
    InAppPurchasing.InitializePurchasing();
    }
     
    Last edited: Apr 12, 2018
  17. ZzappSizzler

    ZzappSizzler

    Joined:
    Jan 15, 2017
    Posts:
    33
    EM_UIAP became false when switching to Android. Turning Easy Mobile IAP off, and then on again, fixed this problem. Seems like a bug to me.
     
    Last edited: Apr 12, 2018
  18. ZzappSizzler

    ZzappSizzler

    Joined:
    Jan 15, 2017
    Posts:
    33
    Unity ads work fine in iOS without implementing easymobile. Using Android I get
    AndroidJavaException: java.lang.ClassNotFoundException: com.sglib.easymobile.androidnative.AppUtil

    Is this telling me that if I use EasyMobile then I MUST use the EasyMobile Advertising?
     
  19. ZzappSizzler

    ZzappSizzler

    Joined:
    Jan 15, 2017
    Posts:
    33
    I changed platform back to iOS. This error has reappeared:
    Assets/Scripts/Appstore.cs(76,60): error CS0117: `EasyMobile.InAppPurchasing' does not contain a definition for `GetProductLocalizedData'

    I go to Window -> EasyMobile to check settings, EasyMobile has disappeared!! I reimport EasyMobile, no change. Change platform back and forth, no change. Remove EasyMobile, close Unity, restart, re-import EasyMobile from the Appstore, it's still not there.

    Does anyone even read these posts!!?? I am now completely stuck!!
     
  20. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    pt5011 likes this.
  21. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    @ZzappSizzler We answered your email. Sorry for the inconvenience! Somehow the forum doesn't send me alert when there's a new reply to the thread. I have all options enabled in the Alert Preferences. Anyone have a solution? I'm kind of inexperienced with this forum thing :D

    I'll try to answer your questions here once again in case it may help a future user.

    As noted in chapter In-App Purchase > Scripting > Advanced Scripting chapter in our user guide, InAppPurchasing.GetProductLocalizedData(prod.Name); should be wrapped in #if EM_UIAP - #endif directives. In this case EM_UIAP was defined on the active platform (iOS), but when we switched to Android it's not defined and caused a compile error in the console. That prevented editor scripts from running (editor scripts are compiled after player scripts) and therefore the symbol never got defined. Toggling Easy Mobile IAP forced a particular editor script to run and define the necessary symbols, thus solved the problem.

    No. We never force developers to use all APIs provided by Easy Mobile. In fact we make it easy to disable our modules simply by toggling the switches.

    The error was because some required native files were somehow removed/missing. That can be fixed by running Assets > Play Services Resolver > Android Resolver > Force Resolve to import the required libraries back.

    Not sure why EM_UIAP got undefined on iOS in this case. But it's the same thing: GetProductLocalizedData should be wrapped with #if EM_UIAP. Also similar issue as above: the compile errors in player scripts prevented editor scripts from running. Menu stuff like Window > Easy Mobile is drawn by editor scripts, that's why it disappeared. Once the errors are fixed it will appear again. Actually, you might notice that the menu from other 3rd party plugins also disappeared because they're also editor scripts.

    Again, I'm sorry for the problems and thank you for understanding.

    A friendly note to everybody: we're much more active on the email support@sglibgames.com, so for issues that are rather specific to your project you may want to contact us there for a quicker response. Thank you all for choosing Easy Mobile!
     
    Atrixx likes this.
  22. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    stevenatunity likes this.
  23. mushdevstudio

    mushdevstudio

    Joined:
    May 9, 2014
    Posts:
    37
    Hello - thanks for making Easy Mobile - it is a must have.
    I am not sure if you can help but I recently updated my android phone to version 8.0 and now the in game image sharing does not work. I am running the latest version of Easy Mobile Pro 1.21 and it worked fine on android version 7. Do you think this may have something to do with it? https://inthecheesefactory.com/blog...o-file-with-fileprovider-on-android-nougat/en
     
  24. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    I answered your email. The native library at Assets/Plugins/Android/com.sglib.easymobile.easy-mobile-1.0.3 was missing in your project, causing the issue.
    The solution: go to menu Assets > Play Services Resolver > Android Resolver > Force Resolve, the native file should be added automatically to the aforementioned folder.
    Thanks.
     
  25. phraxjams

    phraxjams

    Joined:
    Apr 19, 2017
    Posts:
    13
    Hi,
    Im facing issues while trying to run chartboost android ad
    I added play services in your plugin integrated empty project - runs fine
    Then i downloaded/added chartboost unity plugin and having MultipleDex issues at 'Merge ReleaseAssets' state while building for Android
    Also emailed you, please advice
     

    Attached Files:

  26. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi, your email was answered.

    Here's the solution if someone faces this issue in future:

    The Chartboost SDK version in used was 7.1.0. And somehow in this version Charboost took a strange move and include a copy of android-support-v4.jar with in their package (instead of using the Play Services Resolver to resolve dependencies automatically). This causes lots of conflicts with virtually all other plugins, since support-v4 is a very common dependency for Android plugins. In short, if you already have a com.android.support-v4 in your Assets/Plugins/Android folder then importing Chartboost will create build errors.

    The solution is simply remove the Assets/Plugins/Android/ChartboostSDK/libs/android-support-v4.jar added by Chartboost. That said, we encourage you to use Chartboost SDK 7.0.1 instead, which we find much more stable and doesn't have the said issue (at least until Chartboost releases a more stable version).
     
  27. phraxjams

    phraxjams

    Joined:
    Apr 19, 2017
    Posts:
    13
    Using Chartboost SDK 7.0.1 didn't fix it either. I have followed all the instructions 100 times. Unzipping new project everytime and going through all the steps. Apk is generating but i am not receiving any test chartboost ads on android device.
    Please note, Playservices and this new Chartboost 7.0.1 still doesnt merge together
    Do we need to have playservices to receive test ads?
    Very frustrating, if we have to fix all these config issues ourselves whats the point of buying this?
    Send me a unity project with all the sdks/plugins added 'successfully' so that i only download and use it which i EXPECT
     
  28. phraxjams

    phraxjams

    Joined:
    Apr 19, 2017
    Posts:
    13
    If anybody else facing the same issue please add chartboost prefab in your main scene aswell. Only then the Ads will show up. The author never guided about that which resulted in wasting my 3 days.
    The author keep on insisting he is getting chartboost ads on his side successfully whereas it is impossible to receive ads without having chartboost prefab in your main scene. Not happy
     

    Attached Files:

  29. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    This is all the steps to install Chartboost. Hope it helps :) https://answers.chartboost.com/en-us/child_article/unity
     
    pt5011 likes this.
  30. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    The Chartboost object is created automatically by our script. There's no need to add the prefab that's why we didn't mention in the guide. If you check our ChartboostClientImpl script you should see we call Chartboost.Create() when initializing the client.
    Well, I said Chartboost worked on my side because that's the truth. Many people already successfully integrated it as well.
    I know you'd love to complain about everything. Just make sure the problems actually stem from our plugin.
    The fact that Chartboost and playservices "doesnt merge" is because Chartboost prefers to copy their dependencies into Plugins/Android manually, instead of using the standard method that everyone else (GooglePlayGames, GoogleMobileAds, OneSignal, etc. and Easy Mobile too) use, which is using the Play Services Resolver to manage the dependencies automatically. This causes all sorts of conflicts with other 3rd party plugin. AND THIS WILL HAPPEN WHETHER YOU USE EASY MOBILE OR NOT. Some people do not understand what's going on and blame the plugin for everything. EM is just a tool after all, it won't solve all your problems automatically. You still need basic knowledge to troubleshoot issues as a developer.
     
    Last edited: Apr 26, 2018
    stevenatunity likes this.
  31. DirtyFred

    DirtyFred

    Joined:
    May 17, 2014
    Posts:
    29
    Hi there, i have started using EasyMobile plugin, but the share functionality does not work. Here is the error i get when i try to share:

    05-13 09:26:04.246 32223-32242/? E/Unity: AndroidJavaException: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.BLU.demogame/files/1.png exposed beyond app through ClipData.Item.getUri()
    android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.BLU.demogame/files/1.png exposed beyond app through ClipData.Item.getUri()
    at android.os.StrictMode.onFileUriExposed(StrictMode.java:1960)
    at android.net.Uri.checkFileUriExposed(Uri.java:2356)
    at android.content.ClipData.prepareToLeaveProcess(ClipData.java:942)
    at android.content.Intent.prepareToLeaveProcess(Intent.java:9850)
    at android.content.Intent.prepareToLeaveProcess(Intent.java:9856)
    at android.content.Intent.prepareToLeaveProcess(Intent.java:9835)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1610)
    at android.app.Activity.startActivityForResult(Activity.java:4487)
    at android.app.Activity.startActivityForResult(Activity.java:4445)
    at android.app.Activity.startActivity(Activity.java:4806)
    at android.app.Activity.sta
     
  32. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    This issue was fixed several versions ago. Please update to the latest version.
    Thanks.
     
  33. Legacycz

    Legacycz

    Joined:
    Mar 25, 2015
    Posts:
    6
    Hey, amazing asset. It made my life much easier. I've got the Pro version. The only thing I'm missing here is the native gallery export for gifs. Do you plan to implement it in the near future?

    Also, is there a way to directly read a gif from file? By directly I mean that it doesn't wait for the gif to completely load into the memory, but starts playing (at least laggy) immediately.

    Thanks and keep up the good work ;).
     
    Last edited: May 20, 2018
    pt5011 likes this.
  34. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi, thank you so much for choosing EM!

    Native gallery API should be available in a couple months ;)

    About reading GIF from file directly: we do plan to extend our GIF API after finishing with the native APIs (gallery, camera, etc.), being able to load GIF from file sounds like a useful feature. I took a note :)

    Thanks again.
     
    Legacycz likes this.
  35. noahx

    noahx

    Joined:
    Nov 22, 2010
    Posts:
    77
    Hi,
    I implemented the In-App purchases, including reading the localized information from the Store (Google Play) and I was able to initiate the purchase (successful purchases and declined purchases), all this in an Alpha Release to be able to test it all together.
    Everything seemed fine and I even received the receipts by email from Google Play of the test purchases but, once I added the events to catch when a purchase was successful or failed, the game restarts at that point. As soon as I receive the confirmation of the purchase from Google Play, once it closes, the game restarts.
    I'm using the events exactly as they are in the documentation (pretty much a copy paste with the minor changes to reflect my products/constants).
    If I test it in the Editor, it doesn't crash and it behaves as expected, but there's no communication with the Google Play store to process anything.
    Where do you recommend to attach that script that handles the events? For some reason I couldn't place all the stuff in one script. I had to place the buy item and get localized data in one script attached to the store(game object) and another script that has the events to listen to the successful or failed purchases, attached to a game object (that is only a background) and gets enabled once the user clicks "buy item".
    So at this point, there's this background waiting for the result and the little white square from Google Play in the front. Besides the restart of course, it is not nice that it doesn't crash/restarts in the Editor and it is not throwing any errors or anything.

    Any ideas?

    Thanks
     
  36. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    @noahx
    Hi, first of all thanks for choosing Easy Mobile.

    It would be helpful to create a development build and observe the device logcat when the restart occurs.

    You setup seems fine, having one script for purchasing and getting localized data and another script for event handling. Just make sure the "background" object that is waiting for events is still alive and enabled when the events actually fire.

    I recommend you to test with the built-in demo app. It's a simple but well tested app that you can use as a test bench for your configuration. For more information about it check out chapter "Getting Started" in the user guide. Just don't forget to add the EasyMobile prefab to the DemoHome scene. Let me know if IAP function as expected with the demo app.
     
  37. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hi,

    I implemented the In-App purchases, including reading the localized information from the Store (Google Play) and I was able to initiate the purchase etc... works very well :)

    My problem:
    I'v created 3 subscriptions products. 1 month, 3 months, 6 months.

    How I know when suscription is renewed by store ? because I need to call my server to update suscription of user on site...

    Thanks,
     
  38. noahx

    noahx

    Joined:
    Nov 22, 2010
    Posts:
    77
    Hi,
    Apparently having two scripts was no fun for it. I added everything to one script and it worked fine. Most likely it was something one my side.

    I have another question, how can I handle "Promo Codes"? Are there any methods/events related to that?

    Thanks.
     
    pt5011 likes this.
  39. subaktiapps

    subaktiapps

    Joined:
    Feb 8, 2016
    Posts:
    31
    please include facebook audience netword
     
  40. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Glad the problem was solve :)

    What particular "promo codes" do you mean (any related articles, etc.)? I don't think we have any methods/events for that now.
     
  41. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Hi,
    Thanks for choosing EM!

    Regarding your question:

    (*Disclaimer: the below information was obtained from researching, I'm admittedly no expert on this particular matter. And as you know, our InAppPurchasing API is actually a wrapper of UnityIAP, so this is more about how to achieve the task with UnityIAP but via the API provided by EM)

    First of all if yours are auto-renewing subscriptions then UnityIAP should invoke the ProcessPurchase upon the subscription renewal. And that means the InAppPurchasing.PurchaseCompleted event in EM's API will be raised. Isn't that what you experienced?

    https://forum.unity.com/threads/solved-iap-getting-renew-receipts-from-subscriptions.398274/
    https://forum.unity.com/threads/sol...et-called-multiple-times.506574/#post-3305456

    Subscription support (used to be) a 'blindspot' of UnityIAP, but thankfully they've improved it just recently with the introduction of the SubscriptionManager class. This class provides useful information about the subscription status of a product via methods like isSubscribed, isExpired, getExpireDate, etc.

    Here's their example on using the class (I just copied it from the above link as is):

    Code (CSharp):
    1. #if SUBSCRIPTION_MANAGER
    2.        Dictionary<string, string> dict = m_AppleExtensions.GetIntroductoryPriceDictionary();
    3. #endif
    Code (CSharp):
    1. foreach (Product item in controller.products.all)
    2. {
    3. #if SUBSCRIPTION_MANAGER
    4.    // this is the usage of SubscriptionManager class
    5.    if (item.receipt != null) {
    6.        if (item.definition.type == ProductType.Subscription) {
    7.           string intro_json = (dict == null || !dict.ContainsKey(item.definition.storeSpecificId)) ? null :  dict[item.definition.storeSpecificId];
    8.            SubscriptionManager p = new SubscriptionManager(item, intro_json);
    9.            SubscriptionInfo info = p.getSubscriptionInfo();
    10.            Debug.Log(info.getProductId());
    11.            Debug.Log(info.getPurchaseDate());
    12.            Debug.Log(info.getExpireDate());
    13.            Debug.Log(info.isSubscribed());
    14.            Debug.Log(info.isExpired());
    15.            Debug.Log(info.isCancelled());
    16.            Debug.Log(info.isFreeTrial());
    17.            Debug.Log(info.isAutoRenewing());
    18.            Debug.Log(info.getRemainingTime());
    19.            Debug.Log(info.isIntroductoryPricePeriod());
    20.            Debug.Log(info.getIntroductoryPrice());
    21.            Debug.Log(info.getIntroductoryPricePeriod());
    22.            Debug.Log(info.getIntroductoryPricePeriodCycles());
    23.        } else {
    24.            Debug.Log("the product is not a subscription product");
    25.        }
    26.    } else {
    27.        Debug.Log("the product should have a valid receipt");
    28.    }
    29. #endif
    30. }
    Note that:

    - this should be done after UnityIAP has been initialized (you can subscribe to EM's InAppPurchasing.InitializeSucceeded event or check with InAppPurchasing.IsInitialized() method)

    - the 'm_AppleExtensions' can be accessed in EM API via InAppPurchasing.StoreExtensionProvider.GetExtension<IAppleExtensions>()

    - the 'controller' in the foreach statement is equivalent to InAppPurchasing.StoreController.

    We will probably try to figure out a way to update our InAppPurchasing API to make it a bit more convenient to access the SubscriptionManager from EM. In the mean time, the above code should suffice.

    Hope this helps.
     
    Endi24 and ibps13 like this.
  42. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    Facebook Audience Network and Firebase messaging will be added soon!
     
  43. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    @pt5011

    Thank you ! work fine,
    If you update and provide simple example to integrate subscription in EM is top nock !!

    Best,
     
    pt5011 likes this.
  44. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hi,

    Trying to use utility rating, no luck

    I'v published my app for test user only, when open app and clic to open rating, I have this error: "Could not display the rating request popup because it was disabled, or one or more display constraints are not satisfied."

    I don't know why request popup is disable...

    Thx
     
  45. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
    @ibps13
    As stated in the message, there can be two reasons why the popup is disabled:
    1. It was disabled by the user by clicking the "Don't Ask Again" button
    2. At least one display constraint was not satisfied (delay after installation, cool down time, etc.)

    If you clicked "don't ask again" the popup will never display again even if all constraints are satisfied, which is the expected behavior. For testing, simply uninstall and reinstall the app to show it again.

    You can ignore all constraints while testing by ticking the "Ignore constraints in development builds" option in the Utilities settings tab. Note that it is only effective in development builds ("Development Build" option in Build Settings window is checked), to avoid unexpected behavior of the popup (e.g. it keeps showing every time) in case you forget to untick the option when creating production builds.

    Hope this clarifies it.

    EDIT: also, you shouldn't use a button to open the rating popup as advised here https://developer.apple.com/ios/human-interface-guidelines/system-capabilities/ratings-and-reviews/
     
    Last edited: May 28, 2018
  46. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    @pt5011

    Thanks for reply,
    1. It was disabled by the user by clicking the "Don't Ask Again" button
    I'm only the user for now :) and don't clic to this
    2. At least one display constraint was not satisfied (delay after installation, cool down time, etc.)
    It's first install and I'v deleted and reinstall many times

    You can ignore all constraints while testing by ticking the "Ignore constraints in development builds" option in the Utilities settings tab
    Ok

    also, you shouldn't use a button to open the rating popup as advised here
    Ok good to know... just keep button for test, thanks

    I build for Android, and test app on playstore with selected user (me for now) only.
    Code used is very simple:

    Code (CSharp):
    1. if (StoreReview.CanRequestRating())
    2.             StoreReview.RequestRating();
    3.         else
    4.         {
    5.             go_messageServer.SetActive(true);
    6.             color_messageServer.color = color[0];
    7.             txt_messageServer.text = "Erreur: notation désactivé !";
    8.         }
    I need to check this: "ticking the "Ignore constraints in development builds" option in the Utilities settings tab. Note that it is only effective in development builds" and back to you if not work too

    EDIT: this not work because I build for store

    Thanks
     
    Last edited: May 28, 2018
  47. noahx

    noahx

    Joined:
    Nov 22, 2010
    Posts:
    77
  48. pt5011

    pt5011

    Joined:
    Aug 7, 2015
    Posts:
    405
  49. noahx

    noahx

    Joined:
    Nov 22, 2010
    Posts:
    77
    Oh ok.
     
  50. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    @pt5011
    Hi, any clue for my problem ?
    Thanks