Search Unity

  1. Full schedule for #UniteBerlin is now available! Featuring talks on our roadmap, hands-on labs and much more! Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[Solved] Engine integrated Ads SDK broken on iOS in Unity 2018.1.0f2 - upgrade package

Discussion in 'Unity Ads' started by rasmus-unity, May 6, 2018.

  1. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,026
    Hi all,

    EDIT: Issue has been solved now, you need to update the package using Package Manager window in Unity. See post below

    As people has reported on forum, unfortunately the Ads SDK package included in 2018.1.0f2 does not work on iOS (Android is not affected). Workaround is to use the asset store package from https://assetstore.unity.com/packages/add-ons/services/unity-ads-66123 instead.

    The issue is related to the recently introduced Package Manager in Unity, see e.g. https://blogs.unity3d.com/2018/05/04/project-management-is-evolving-unity-package-manager-overview, and to keep the story short, our existing integration tests for Ads SDK doesn't work with the package manager package, so for 2018.1 we had to manually test and verify the integration. Manual testing revealed an issue related to asset store version of Ads SDK late in 2018.1, and when this got fixed, unfortunately introduced the above issue on iOS.

    We will soon ship an update for this, however in meantime use Ads SDK from asset store.

    Our apologies.

    Best regards,
    Rasmus
     
    Last edited: May 8, 2018
  2. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,026
    A new package manager package has been shipped now (version 2.0.8 - see below). How to fix in Unity 2018.1.0f2:

    Open the Package Manager window:
    upload_2018-5-8_16-5-39.png

    Update to 2.0.8:
    upload_2018-5-8_16-7-4.png

    Then you can get Ads on iOS again.

    /Rasmus

    Regarding version number, we currently operate with two different version numbers, Ads SDK itself and the package manager package version. These are decoupled by design, as package manager doesn't know what's inside a package, and Ads SDK versioning started before package manager was introduced. In Unity 2018.2 we will align the version numbers to avoid confusion
     
    technicat likes this.
  3. toughlucksmith

    toughlucksmith

    Joined:
    Oct 30, 2017
    Posts:
    2
    I upgraded from 2017.1.1f1 to 2018.1.0f2 to fix a bug in my game that is fixed in a newer version. Upgrading caused Ads to stop working on Android devices. Upgrading Ads to 2.0.8, for whatever reason, has now messed up Unity IAP. Visual Studio complains "The name 'IAPButton' does not exist in the current context". I can see the Unity IAP IAPButton.cs exists, but the #if UNITY_PURCHASING is returning false. Enabling/disabling IAP in Unity does not fix this.
     
  4. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,026
  5. toughlucksmith

    toughlucksmith

    Joined:
    Oct 30, 2017
    Posts:
    2
    Tried that and it didn't make any difference. I also tried a Reimport All and still getting this error.
     
  6. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,026
    You have disabled the built-in Ads extension in Services Window?

    upload_2018-5-16_20-44-53.png

    Also what does your ProjectSettings/UnityConnectSettings.asset file contain? In my case:

    UnityPurchasingSettings:
    m_Enabled: 1
    m_TestMode: 0

    /Rasmus
     
  7. Wylie-Modro

    Wylie-Modro

    Joined:
    Sep 2, 2016
    Posts:
    4
    I am also experiencing a related Android IAP issue. I am running 2018.1.0f2 and the Android IAP we’re working perfectly when downloaded from my Alpha on the Google Play Store. However iOS ads were not showing up on the iOS device, so I upgraded the Ads to 2.0.8 as advised. This fixed the iOS ads issue and both the iOS IAP and the Android Ads are working fine. However after uploading the new built to Alpha on Google Play and downloading that version on to the device my IAP buttons seem to just sign me in (as programmed) but never shows me the IAP popup.


    I uploaded an old build without the updated Ads package and the IAPs work fine on the device, so it’s probably not something to do with my Google Play setup. I was also using the same test account for both builds.

    I also don’t get any errors in the Unity Editor when testing IAP for Android, unlike @toughlucksmith.
     
  8. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,026
    Hi @Wylie-Modro,

    Is it correct that you have following configuration?

    - Unity 2018.1.0f2
    - Unity Ads SDK package 2.0.8 (downloaded using package manager in Unity)
    - IAP SDK 1.18 (can be seen in Plugins/Purchasing/Changelog)

    Then we can verify here.

    /Rasmus
     
  9. Wylie-Modro

    Wylie-Modro

    Joined:
    Sep 2, 2016
    Posts:
    4
    Hi @rasmus-unity,

    Yes that is my configuration:
    - Unity 2018.1.0f2
    - Unity Ads SDK package 2.0.8 (downloaded using package manager in Unity)
    - IAP SDK 1.18 (as seen in my Plugins/Purchasing/Changelog)
    - jdk1.8.0_144

    However also in the package manager I see "In App Purchasing" Version 2.0.1
     
    Last edited: May 23, 2018 at 5:26 AM
  10. Wylie-Modro

    Wylie-Modro

    Joined:
    Sep 2, 2016
    Posts:
    4
    After debugging with logcat it seems like the issue is with UnityEngine.VR.VRSettings. Strange as my game is a 2D mobile arcade game that has never seen any VR packages.

    Here is the logs from the device when I click the IAP button and it fails. 50 coffee is the currency.

    Code (CSharp):
    1. 05-22 20:51:19.592  9341  9353 I Unity   : UnityIAP: Promo is ready
    2. 05-22 20:51:19.592  9341  9353 I Unity   :
    3. 05-22 20:51:19.592  9341  9353 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    4. 05-22 20:51:19.592  9341  9353 I Unity   :
    5. 05-22 20:51:22.972  9341  9353 I Unity   : Not connected to google play services
    6. 05-22 20:51:22.972  9341  9353 I Unity   :
    7. 05-22 20:51:22.972  9341  9353 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    8. 05-22 20:51:22.972  9341  9353 I Unity   :
    9. 05-22 20:51:39.497  9341  9353 I Unity   : productId: 50_coffee_29.4.18
    10. 05-22 20:51:39.497  9341  9353 I Unity   :
    11. 05-22 20:51:39.497  9341  9353 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    12. 05-22 20:51:39.497  9341  9353 I Unity   :
    13. 05-22 20:51:39.502  9341  9353 W mono    : Missing method get_enabled in assembly /data/app/com.WylieModro.htSoCollege-1/base.apk/assets/bin/Data/Managed/Stores.dll, type UnityEngine.VR.VRSettings
    14. 05-22 20:51:39.502  9341  9353 W mono    : The class UnityEngine.VR.VRSettings could not be loaded, used in Stores
    15. 05-22 20:51:39.537  9341  9353 E Unity   : TypeLoadException: Could not load type 'UnityEngine.VR.VRSettings' from assembly 'Stores'.
    16. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.Purchasing.JSONStore.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) [0x00000] in <filename unknown>:0
    17. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product, System.String developerPayload) [0x00000] in <filename unknown>:0
    18. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product) [0x00000] in <filename unknown>:0
    19. 05-22 20:51:39.537  9341  9353 E Unity   :   at IAPManager.BuyProductID (System.String productId) [0x00000] in <filename unknown>:0
    20. 05-22 20:51:39.537  9341  9353 E Unity   :   at IAPManager.Buy50Coffee () [0x00000] in <filename unknown>:0
    21. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <filename unknown>:0
    22. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <filename unknown>:0
    23. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0
    24. 05-22 20:51:39.537  9341  9353 E Unity   :   at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems
    25. 05-22 20:51:40.347  9341  9341 V ActivityThread: updateVisibility : ActivityRecord{1a78b0a token=android.os.BinderProxy@d551753 {com.WylieModro.htSoCollege/com.unity3d.player.UnityPlayerActivity}} show : true
    26. 05-22 20:51:44.402  3729  3901 D StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{ced17d6 u0 d0 com.WylieModro.htSoCollege/com.unity3d.player.UnityPlayerActivity}
    27. 05-22 20:51:44.407  3729  3901 D StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{ced17d6 u0 d0 com.WylieModro.htSoCollege/com.unity3d.player.UnityPlayerActivity}
    28. 05-22 20:51:44.447  3729  3901 D StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{ced17d6 u0 d0 com.WylieModro.htSoCollege/com.unity3d.player.UnityPlayerActivity}
    29. 05-22 20:51:45.457  3729  3901 D StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{ced17d6 u0 d0 com.WylieModro.htSoCollege/com.unity3d.player.UnityPlayerActivity}
    30. 05-22 20:51:48.152  9341  9353 I Unity   : Google sign in: False
     
  11. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    72
    Is this solved in 2018.1.1f1? If update will solve it I will just do that.