Open mkismy opened 5 years ago
Anyone figure out a solution to this? I just encountered it today.
cocoapods-core (1.8.0) cocoapods-keys (2.1.0)
This appears to be a duplicate of #67. However, I'm still not clear on how to resolve this issue.
Update: I figured out how to resolve this issue. :)
This error occurs when there are keys in the project that do not have values set for them (e.g. they were removed from the keychain directly, instead of via pod keys rm MyKey
).
To fix this, run bundle exec pod keys
to output a list of all keys in the project:
$ bundle exec pod keys
Keys for MyProject
├ DevelopmentAPIKey - my_development_api_key
├ StagingAPIKey -
└ ProductionAPIKey - my_production_api_key
Then, set (bundle exec pod set StagingAPIKey supersecretkeyvalue
) or remove (bundle exec pod rm StagingAPIKey
) any keys in the list that do not have a value set.
Maybe it would be good to remove null keys from a project automatically during pod install
? Or, maybe the error message could list out the orphaned/null keys?
I'm a big +1 to the idea of listing orphaned keys during pod install
. A nice little warning would be great!
Hey, it's so strange (maybe I did not read all documentation) that when I use;
plugin 'cocoapods-keys', {
:keys => [
"client-dev-key",
"client-pilot-key",
"client-prod-key",
]}
It throws same error so I delete all keys as @dtrenz said before in this thread then changed it to
plugin 'cocoapods-keys', {
:keys => [
"ClientDevKey",
"ClientPilotKey",
"ClientProdKey",
]}
It worked for me and parsed well. This is the first time that I got this error and it appears because of indentation I guess.
@dtrenz Your solution works great 😄 Thanks!
@eliakorkmaz These key names are used to generate Objective-C properties, and a dash is not a valid character for those. Definitely a good idea for a warning here.
When removing keys from the Podfile, a runtimeerror has occured.
Command
Report
Stack
Plugins
Podfile
Error