You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Storyboards should recognize when access token is set elsewhere #1404
When using storyboards to instantiate a map view, it isn't always desirable to set the access token there. We should do the legwork to check if the access token is set elsewhere (perhaps as a global) and present the pretty blue "everything is OK!" screen if it is actually working.
Not sure if designable code can look at environment variables, but it could be made to read a resource file that wouldn't be checked in. Lots of hoops to go through then.
But this isn't really specific to storyboards. Code works the same way; best to use a dedicated public token I suppose.
See also #1553: from within a build script, it’s easier to add the access token to the Info.plist (using plutil -insert) than to code or a storyboard (where you’d have to do some amount of parsing). But I think Treble demonstrates that the ignored access token file approach makes sense too.
#1553 (comment) provides a sample Run Script build phase. I think I’d be comfortable putting that script in a help topic on mapbox.com and linking to it from the installation guide, for developers hesitant to make even their public access tokens public.
Activity
friedbunny commentedon May 3, 2015
There is also the (edge?) case where developers may not be using Mapbox tiles and thus not require a Mapbox access token.
1ec5 commentedon May 13, 2015
See also #1553: from within a build script, it’s easier to add the access token to the Info.plist (using
plutil -insert) than to code or a storyboard (where you’d have to do some amount of parsing). But I think Treble demonstrates that the ignored access token file approach makes sense too.1ec5 commentedon May 14, 2015
#1553 (comment) provides a sample Run Script build phase. I think I’d be comfortable putting that script in a help topic on mapbox.com and linking to it from the installation guide, for developers hesitant to make even their public access tokens public.
friedbunny commentedon May 21, 2015
Action on this happening in #1613.