orta / cocoapods-keys

A key value store for storing per-developer environment and application keys
MIT License
1.55k stars 93 forks source link

Keys not being generated when using env file #212

Open ryoustra opened 3 years ago

ryoustra commented 3 years ago

I'm attempting to use this with a Swift project in Xcode, with both macOS and iOS targets.

Ideally, I'd have the keys in an env file, but that appears not to work. When the keys are not included in .env, pod install prompts for values, and generates the code correctly while inserting keys in the keychain. All good.

If I use the pod to remove the key (or simply add a new one), clear out derived data, build clean, but then add the key to the .env file, pod install will no longer prompt for a value (as expected) but the code is not generated correctly - i.e., no key names/values are added to the Keys class. Running pod keys confirms that none were generated.

Any reason to consider why this might not be working? It seems that I've isolated the issue cleanly enough, but if it's working for others, there's clearly something else at play.

orta commented 3 years ago

No idea

vanthanhtran245 commented 3 years ago

@ryoustra Try with run cmd rm -rf ~/.cocoapods/keys and pod install again

rogerluan commented 2 years ago

Thanks @vanthanhtran245 , that command was the solution for a problem I was facing 👍 here, keys I was populating in the Podfile weren't being generated in the .h file, only the keys that were present in that ~/.cocoapods/keys/….yaml cache was being generated in the .h file and I didn't understand why 😬