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.

Storyboards should recognize when access token is set elsewhere #1404

Closed

Description

@friedbunny

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.

Per chat with @1ec5:

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.

Activity

  1. added
    iOS
    on May 2, 2015
  2. friedbunny commented on May 3, 2015

    @friedbunny
    ContributorAuthor

    There is also the (edge?) case where developers may not be using Mapbox tiles and thus not require a Mapbox access token.

  3. 1ec5 commented on May 13, 2015

    @1ec5
    Contributor

    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.

  4. 1ec5 commented on May 14, 2015

    @1ec5
    Contributor

    #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.

  5. friedbunny commented on May 21, 2015

    @friedbunny
    ContributorAuthor

    Action on this happening in #1613.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    iOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions