Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

check for IAP 'OS Restriction Settings

Discussion in 'Unity IAP' started by IgorAherne, Mar 8, 2019.

  1. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    How can we determine if user has IAP restrictions set inside iOS or Android?

    I would like to show a warning message "please enable In-App-Purchases in your Device Restrictions Settings".

    I am using my class
    IAPManager : IStoreListener
    and things such
    as IStoreController::InitiatePurchase()


    Was looking for something like
    iOSRestrictions.IAP_isEnabled
    - does it exist?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I am not familiar with "Device Restriction Settings", is this something you've experienced in your testing?
     
  3. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    Thank you Jeff,

    For example, these settings in iPhone: https://support.apple.com/en-gb/HT204396
    They allow a parent to setup a 4-digit pin number and prevent the child from using IAP in any games on the phone. I would like to detect if this restriction is currently active
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it! I don't believe we have tested this feature, and we don't have a specific API to detect it. Have you been able to test? I suspect that IAP Initialization would succeed, but a Purchase would likely fail, perhaps with a specific failure reason that you could catch.
     
  5. MaciekOaky

    MaciekOaky

    Joined:
    Nov 10, 2016
    Posts:
    6
    Necropost, but if anyone searches for the IAP restriction features, they are available in Unity's IAP package.