user9414135
user9414135

Reputation: 211

How to hide APPKey when using Github

I would like to share my code to Github in Public , but the APPKey needs to be private . How can I just hide APPKey in the file? iOS Programming , using Swift4 ,Xcode 9

Upvotes: 1

Views: 75

Answers (1)

user9478968
user9478968

Reputation:

Option 1

Generally people will save the key into a file named secret.key or something like that and add the file to .gitignore so that it is not saved in the git repository.

The program can then read the key from the file at run time.

Option 2

You can store the key in an environment variable that is read at runtime. Here is a blog post by Robin Malhotra describing how to do so with Xcode

Upvotes: 2

Related Questions