mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.33k forks source link

Automate access token setup when installing via CocoaPods #3160

Closed 1ec5 closed 5 years ago

1ec5 commented 8 years ago

To eliminate any friction that might arise from having to set an access token, the Mapbox iOS SDK should automate the recommended process for completely private access tokens.

  1. In the podspec’s prepare_command, run a script that opens the access token manager, prompts for an access token, and writes it to a file in the user’s home directory.
  2. In a Run Script build phase, read that file and put its contents into the application’s Info.plist. (Does CocoaPods support this?)

This approach will facilitate sharing Mapbox-powered code bases with others as open source projects, if desired, without compromising access token security.

/cc @incanus @lxbarth @friedbunny @bsudekum

1ec5 commented 8 years ago

CocoaPods purposely doesn’t provide a way to add a build phase to the application target (CocoaPods/CocoaPods#2326), but it might be possible to do it ourselves via the xcodeproj gem.

vongohren commented 7 years ago

Did you ever end up using the prepare_command? To get the runscript build phase up and running? Couldnt find in your PR which was merged @1ec5

1ec5 commented 7 years ago

We haven't landed any work related to this PR, which is why the issue is still open. One of the unresolved questions around this idea is that the first pod install would require user intervention. That could be a dealbreaker for any application that needs to run in an automated fashion, whether on Xcode Server or Bitrise.

vongohren commented 7 years ago

Yeah i just was led here by another issue talking about prepare_command and Runscripts, so thought you might had done something about it in the merged PR on this issue.

1ec5 commented 7 years ago

Ah, sorry, https://github.com/mapbox/mapbox-gl-native/pull/3183#issuecomment-166713154 merely referred to this idea as an alternative to displaying a checklist for the developer to follow in the IB designable that this framework vends.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.