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

iosapp should prompt for an access token #4696

Closed
1ec5 opened this issue Apr 14, 2016 · 0 comments · Fixed by #4728
Closed

iosapp should prompt for an access token #4696

1ec5 opened this issue Apr 14, 2016 · 0 comments · Fixed by #4728
Labels
feature iOS Mapbox Maps SDK for iOS

Comments

@1ec5
Copy link
Contributor

1ec5 commented Apr 14, 2016

iosapp currently requires that you set a MAPBOX_ACCESS_TOKEN the first time you launch after a clean build; after that point, the access token is persisted as a user default. People (myself included) always forget to set this environment variable.

When iosapp is unable to find an access token in user defaults, it should prompt for one. This is what osxapp does, and it's a lot more convenient than what we have now.

If there's a need to automate setting the access token outside of checked-in files, we should add a Run Script build phase that reads the contents of ~/.mapbox and inserts the access token into the Info.plist in the build product (which is not checked in). Alternatively, you could add a command line argument in the scheme editor (right above the UI for setting environment variables) to the effect of -MBXMapboxAccessToken sk.feedcafedeadbeefbadebede. (You can already do this for any user default.)

/cc @kkaefer @friedbunny

@1ec5 1ec5 added feature iOS Mapbox Maps SDK for iOS labels Apr 14, 2016
1ec5 added a commit that referenced this issue Apr 18, 2016
If no access token is found in user defaults at launch, iosapp prompts the user for an access token. Renamed the user defaults key for the access token to conform to Cocoa naming conventions.

Fixes #4696.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant