Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice

IAP on iOS but not on Android! (Getting "Offers in-app purchases on Google Play)

Discussion in 'Unity IAP' started by iterbit, Feb 13, 2018.

  1. iterbit

    iterbit

    Joined:
    Apr 25, 2016
    Posts:
    6
    I have a project which includes working Unity IAP. I've already published a game for iOS and Android (Google Play).

    On Google Play I'm not using IAP features from Unity IAP, but the Google Play still thinks I do.

    [​IMG]

    Probably this is because Unity automatically includes "Billing" permission to the AndroidManifest.XML and clearly I don't want that.

    If I disable IAP Services I'm getting errors on the project if I want to build for Android. Also I've tried to export to the Android Studio and remove "Billing" permission from the manifest there, but for some reason, I can't find the permission from the project folder of the app (maybe it resides in some of the libraries?).

    Anyway, this should be an easy fix, because, I don't want IAP functionality on the Google Play.

    How to deal with this problem at this point? Any help will be greatly appreciated!
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    983
    Can you elaborate a bit more? You first mention "project which includes working Unity IAP. I've already published a game for iOS and Android" then you say "On Google Play I'm not using IAP". Do you have an Unity IAP enabled version on Google, and you want to update it so that it is not? You should not receive errors in the project if you choose to disable IAP, can you post the errors that you are receiving?
     
  3. iterbit

    iterbit

    Joined:
    Apr 25, 2016
    Posts:
    6
    "You first mention "project which includes working Unity IAP"

    That's correct, but this only applies to the iOS version of the game.

    "On Google Play I'm not using IAP"

    That's also correct. I did not setup IAP on the Android side.

    "Do you have an Unity IAP enabled version on Google"

    Yes. I've published a game with IAP enabled (IAP Services ON in the Unity Editor). After the game went live I saw that "offer in app purchases" mark on my app product page.

    "You should not receive errors in the project if you choose to disable IAP"

    These are from the Unity Demo project but the same applies to my project. They only show up if:

    - Unity IAP Service is disabled (and IAP scripts are in the project)
    - At this point building to any mobile platform

    [​IMG]


    So again:
    - I want to have Unity IAP for the iOS games
    - Don't want IAP in my Android games (different business approach)

    Same project only building to different platforms.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    983
    Yes, you would want to remove those scripts from your game if you disable IAP support, or surrounding those errors with an #ifdef directive. Understood that this may mean having two separate projects. We are working to improve this behavior.
     
  5. iterbit

    iterbit

    Joined:
    Apr 25, 2016
    Posts:
    6
    "or surrounding those errors with an #ifdef directive"

    Already did. On Android, I still get permission "using billing services". The only thing that solves this is to remove the complete UnityPurchasing package from the project, but this is not what I want to do everytime I want to compile for Android.

    I need a simpler solution.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    983
    Understood. In that case, you would need two separate projects currently.