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

make clean shouldn't delete Xcode workspaces #2493

Closed
jfirebaugh opened this issue Oct 1, 2015 · 8 comments
Closed

make clean shouldn't delete Xcode workspaces #2493

jfirebaugh opened this issue Oct 1, 2015 · 8 comments
Assignees

Comments

@jfirebaugh
Copy link
Contributor

I fixed this at one point but it seems to have regressed. Having make clean delete Xcode workspaces is annoying because it means your schemes get blown away, which includes the MAPBOX_ACCESS_TOKEN environment variable.

@mikemorris
Copy link
Contributor

I think this was intentional because finding the hidden MAPBOX_ACCESS_TOKEN in Xcode was a pain for folks not familiar with it, but it was originally in distclean instead of clean.

@1ec5
Copy link
Contributor

1ec5 commented Feb 20, 2016

iosapp should prompt for an access token at launch if it's absent from the environment and user defaults, just like osxapp does.

@jfirebaugh jfirebaugh self-assigned this Feb 20, 2016
@1ec5
Copy link
Contributor

1ec5 commented Apr 14, 2016

Filed #4696 for prompting for an access token.

@1ec5
Copy link
Contributor

1ec5 commented Apr 18, 2016

As of #4641, ios.xcworkspace is checked in, so you can set the MAPBOX_ACCESS_TOKEN environment variable on a non-gyp-generated scheme (such as iosapp, ios-bench, CI, or a duplicate of a GYP-generated scheme), and that variable will persist even if you delete and regenerate platform.xcodeproj.

/cc @kkaefer @boundsj @friedbunny

@friedbunny
Copy link
Contributor

We’ll have to be careful to not check in access tokens:

diff --git a/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/iosapp.xcscheme b/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/iosapp.xcscheme
index 064add0..802daeb 100644
--- a/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/iosapp.xcscheme
+++ b/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/iosapp.xcscheme
@@ -61,6 +61,13 @@
             ReferencedContainer = "container:ios.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
+      <EnvironmentVariables>
+         <EnvironmentVariable
+            key = "MAPBOX_ACCESS_TOKEN"
+            value = “pk.dodododoodbobodbdobdodboiebdoobiedoobiedo.blahbalh"
+            isEnabled = "YES">
+         </EnvironmentVariable>
+      </EnvironmentVariables>
       <AdditionalOptions>
       </AdditionalOptions>
    </LaunchAction>

@jfirebaugh
Copy link
Contributor Author

We can probably change make clean back to a simple rm -rf build/* now.

@jfirebaugh
Copy link
Contributor Author

We’ll have to be careful to not check in access tokens:

Should we not mark the iosapp and osxapp schemes as shared, to avoid this? It looks like the only schemes that need to be shared are CI, dynamic, and static.

@jfirebaugh
Copy link
Contributor Author

#4737

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants