Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Location Services prompt disappears too soon #1930

Closed

Description

@1ec5

A fresh install of iosapp on iOS 9 displays a Location Services prompt for “Always” permissions, but this prompt disappears after a second without any user intervention. Then if you hit the user location tracking button, a “When in Use” prompt appears, so iosapp has no access to background location updates. If at some point you revoke iosapp’s “When in Use” permission, pressing the user location tracking button does nothing.

Unclear how this affects #1909.

/cc @incanus @friedbunny

Activity

  1. added
    iOS
    on Jul 24, 2015
  2. added this to the milestone on Jul 24, 2015
  3. changed the title [-]iOS 9: Location Services prompt disappears too soon[/-] [+]Location Services prompt disappears too soon[/+] on Jul 24, 2015
  4. 1ec5 commented on Jul 24, 2015

    @1ec5
    ContributorAuthor

    Also reproduces on iOS 8.4.

  5. friedbunny commented on Jul 24, 2015

    @friedbunny
    Contributor

    #1909 either appears to be unaffected (or fixes this problem). Pushing the location button in the demo app brings up the permission dialog as expected using both WhenInUse and Always.

  6. friedbunny commented on Jul 24, 2015

    @friedbunny
    Contributor

    If at some point you revoke iosapp’s “When in Use” permission, pressing the user location tracking button does nothing.

    This is something we've left up to developers to handle in the didFailToLocateUserWithError: delegate method, for now. Should probably move in-house.

  7. friedbunny commented on Sep 4, 2015

    @friedbunny
    Contributor

    This may have been fixed by #1909, but I'm going to confirm that before closing this.

  8. friedbunny commented on Sep 4, 2015

    @friedbunny
    Contributor

    Nope, not fixed.

  9. friedbunny commented on Sep 4, 2015

    @friedbunny
    Contributor

    The problem here is that the demo app is trying to restoreState: on the first run, which is clobbering the .showsUserLocation = YES permissions dialog.

    It's generally good practice to delay asking for permissions or only do so when the user really needs/wants those permissions. As the permissions dialog blocks our map from loading, I'm going to set .showsUserLocation = YES some point later, after the map has loaded.

  10. friedbunny commented on Sep 4, 2015

    @friedbunny
    Contributor

    mapViewDidFinishLoadingMap: would be a good place to do this, except it's not hooked up — #2263.

  11. incanus commented on Sep 4, 2015

    @incanus
    Contributor

    I'm not generally into timers, but in the interest of simplicity, maybe just set showsUserLocation = YES a second after viewDidAppear:?

  12. added a commit that references this issue on Sep 4, 2015
    584c36f
  13. added a commit that references this issue on Nov 6, 2015
    d8390ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugiOS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions