orta / cocoapods-keys

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

cocoapods-keys as a dependency in podspec #210

Open shivaiahmahesha opened 4 years ago

shivaiahmahesha commented 4 years ago

Hi all,

Im developing a private pod and which has static AuthKeys for API authentication inside my pod. For the security purposes i wanted to store these keys inside the keychain and wanted to use the feature of cocoapods-keys. I would be using .env file to have these keys and upon pod install these would be added to keychain, but now i wanted to know how can i use these keys inside my private pod.

Any help would be really appreciated. Thanks.

ashfurrow commented 3 years ago

.env file support was added here: https://github.com/orta/cocoapods-keys/pull/106 But this bypasses the keychain, so it doesn't sound like what you want. As for the private pod, it's probably doable but an easier solution would be for your pod to accept the keys as arguments/parameters, and then inject them in from the app. Otherwise, the pod would need to set up a dependency on the Keys pod, which gets tricky because that pod is only generated in a CocoaPods install hook. I hope that helps!

shivaiahmahesha commented 3 years ago

Got it. I guess accepting the keys a parameter to my private should be a secured way. Let me check on this in my pod.

Thanks a lot @ashfurrow