Search Unity

Input.location.isEnabledByUser is not false when disabling location for a specific app on iOS

Discussion in 'iOS and tvOS' started by Deleted User, Sep 9, 2015.

  1. Deleted User

    Deleted User

    Guest

    Input.location.isEnabledByUser does not seem to behave correctly on iOS.
    It is false when location is disabled entirely on the device. But it is true when the location is only disabled for a specific app.
    Is this a bug, or is there an other way to check for app specific location rights?
     
  2. _Paulius

    _Paulius

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    173
    Last edited: Sep 10, 2015
  3. czadam_inde

    czadam_inde

    Joined:
    Nov 20, 2017
    Posts:
    1
    The issue says it is by design. Can you elaborate that, because I don't understand how is it not a bug?
     
    artoonie likes this.
  4. MrYellow

    MrYellow

    Joined:
    Sep 4, 2015
    Posts:
    2
    I finally figured it out and also why they say it's by design, although that is a lazy excuse. isEnabledByUser tells you whether the IOS device itself has location services enabled or disabled, but nothing about the settings for your application itself. For that you would need a IOS plugin that checks the authorization status using this: https://developer.apple.com/documen...ger/3563952-authorizationstatus?language=objc.