A key value store for storing per-developer environment and application keys

Overview

Build Status

A key value store for enviroment and application keys.

Its good security practice to keep production keys out of developer hands. CocoaPods-keys makes it easy to have per-user config settings stored securely in the developer's keychain, and not in the application source. It is a plugin that once installed will run on every pod install or pod update.

Requirements

Requires CocoaPods 0.36+

Installation

$ gem install cocoapods-keys

How it works

Key names are stored in ~/.cocoapods/keys/ and key values in the OS X keychain. When you run pod install or pod update, an Objective-C class is created with scrambled versions of the keys, making it difficult to just dump the contents of the decrypted binary and extract the keys. At runtime, the keys are unscrambled for use in your app.

The generated Objective-C classes are stored in the Pods/CocoaPodsKeys directory, so if you're checking in your Pods folder, just add Pods/CocoaPodsKeys to your .gitignore file. CocoaPods-Keys supports integration in Swift or Objective-C projects.

Usage

Using the new Plugin API in CocoaPods we can automate a lot of the fiddly bits away. You define what keys you want inside your Podfile and Keys will detect what keys are not yet set. If you need to specify a different project name from the target name, use the key :target to specify it.

plugin 'cocoapods-keys', {
  :project => "Eidolon",
  :keys => [
    "ArtsyAPIClientSecret",
    "ArtsyAPIClientKey",
    "HockeyProductionSecret",
    "HockeyBetaSecret",
    "MixpanelProductionAPIClientKey",
    ...
  ]}

Please do not use dash in key names (Reason why here in this issue #197).

For example convert any key like this WRONGLY-DEFINED-KEY to CorrectlyDefinedKey.

Then running pod install will prompt for the keys not yet set and you can ensure everyone has the same setup.

Alternative Usage

You can save keys on a per-project basis by running the command:

$ bundle exec pod keys set KEY VALUE

You can list all known keys by running:

$ bundle exec pod keys

For example:

  $ cd MyApplication
  $ bundle exec pod keys set "NetworkAPIToken" "AH2ZMiraGQbyUd9GkNTNfWEdxlwXcmHciEOH"
  Saved NetworkAPIToken to MyApplication.

  $ bundle exec pod keys set "AnalyticsToken" "6TYKGVCn7sBSBFpwfSUCclzDoSBtEXw7"
  Saved AnalyticsToken to MyApplication.

  $ bundle exec pod keys
  Keys for MyApplication
   ├  NetworkAPIToken - AH2ZMiraGQbyUd9GkNTNfWEdxlwXcmHciEOH
   └  AnalyticsToken - 6TYKGVCn7sBSBFpwfSUCclzDoSBtEXw7

  GIFs - /Users/orta/dev/mac/GIFs
   └ redditAPIToken & mixpanelAPIToken

After the next pod install or pod update keys will add a new Keys pod to your Pods project, supporting both static libraries and frameworks. Note you have to include plugin 'cocoapods-keys' in the Podfile for Keys to register that it should work. This provides an API to your keys from Cocoa code. For example the application code above would look like:

#import "ORAppDelegate.h"
#import <Keys/MyApplicationKeys.h>
#import <ARAnalytics/ARAnalytics.h>

@implementation ORAppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    MyApplicationKeys *keys = [[MyApplicationKeys alloc] init];
    [ARAnalytics setupWithAnalytics:@{
        ARGoogleAnalyticsID : keys.analyticsToken;
    }];
}

@end

Some documentation is also available to use cocoapods-keys in Swift projects.

Other commands

CocoaPods-keys has 3 other commands:

  • bundle exec pod keys get [key] [optional project] Which will output the value of the key to STDOUT, useful for scripting.

  • bundle exec pod keys rm [key] [optional project] Will remove a key from a project.

    If Wildcards are included, it will remove the keys matching the pattern. E.g.: bundle exec pod keys rm "G*og*" will remove all the keys that begin with 'G', have 'og' in the middle and end with anything. To nuke all the keys, run either bundle exec pod keys rm "*" or bundle exec pod keys rm --all

  • bundle exec pod keys generate [optional project] Will generate the obfuscated Objective-C keys class (mainly used internally).

Continuous Integration

It's rarely a good idea to mess around with the keychain in your CI, so keys will look for an environment var with the same string before looking in the keychain. Also you could create a .env file in your project folder.

Maintainance State

CocoaPods Keys is effectively "done" software from Artsy's perspective. It has done everything we've needed for years. So, I wouldn't recommend making issues requesting new features, simply because we won't be building them ourselves. We'll definitely continue making sure it works etc though, we use it in production.

Security

Key security is difficult. Right now even the biggest apps get their keys leaked. This is neatly summed up by John Adams of the Twitter Security Team on Quora.

Putting this in the context of, "should you be storing keys in software", is more appropriate. Many companies do this. It's never a good idea.

When developers do that, other developers can use debuggers and string searching commands to extract those keys from the running application. There are numerous talks on how to do that, but leave that as an exercise to the reader to find those talks.

Many people believe that obfuscating these keys in code will help. It usually won't because you can just run a debugger and find the fully functional keys.

So in summary, the ideal way to store keys is to not store keys. In reality though most Apps embed keys, and this does that and adds some rudimentary obfuscation to the keys. A well motivated app cracker could probably extract this within a few minutes however.

Thanks

This was built with a lot of help from @segiddins, @ashfurrow and @marcelofabri.

Comments
  • Keys for multiple targets

    Keys for multiple targets

    I use API keys in files that are parts of different targets in my app. It's not totally clear how to do this, so I tried having the following in my Podfile:

    plugin 'cocoapods-keys', {
        :project => "Comickaze",
        :target => "AppTarget",
        :keys => [
            "CrashlyticsAPIKey",
            "PaddleAPIKey"
        ]
    }
    
    plugin 'cocoapods-keys', {
        :project => "Comickaze",
        :target => "XPCServiceTarget",
        :keys => [
            "AmazonS3SecretKey",
            "FogBugzToken"
        ]
    }
    

    This way, the last one wins, and my AppTarget doesn't get linked against the generated Keys project. Any ideas?

    opened by abbeycode 19
  • Updating to 1.0.2 requires inputting name of project

    Updating to 1.0.2 requires inputting name of project

    Hi,

    Using 1.0.1 I had no issue with running pod install or pod update. With 1.0.2, I get a Hello there, we found too many xcodeprojects. Please give a name for this project. multiple times during the update/install.

    cocoapod-keys

    Directory only contains one .xcodeproj as well as Pods.xcodeproj. Is this something on my end or is the search for projects going to deep and inadvertently picking up Pods.xcodeproj?

    opened by nanoxd 19
  • Cocoapods-keys doesn't work after upgrading to macOS Catalina

    Cocoapods-keys doesn't work after upgrading to macOS Catalina

    I realise using beta software means these sort of issues will come up and generally unsupported; however I am hoping someone can assist me? (maybe its something simple 👍 )

    My issue is almost identical to #143

    My output is as follows:

    ---------------------------------------------
    Error loading the plugin `cocoapods-keys-2.1.0`.
    
    SystemExit - ERROR: Can't find header dir for ruby. Exiting...
    /Users/robert/.gems/gems/RubyInline-3.12.4/lib/inline.rb:564:in `abort'
    /Users/robert/.gems/gems/RubyInline-3.12.4/lib/inline.rb:564:in `build'
    /Users/robert/.gems/gems/RubyInline-3.12.4/lib/inline.rb:856:in `inline'
    /Users/robert/.gems/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:17:in `<class:OSXKeychain>'
    /Users/robert/.gems/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:6:in `<top (required)>'
    /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /Users/robert/.gem/ruby/2.6.0/gems/cocoapods-keys-2.1.0/lib/keyring.rb:1:in `<top (required)>'
    /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /Users/robert/.gem/ruby/2.6.0/gems/cocoapods-keys-2.1.0/lib/cocoapods_plugin.rb:1:in `<top (required)>'
    /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:94:in `block in safe_activate_and_require'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:94:in `each'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:94:in `safe_activate_and_require'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:31:in `block in load_plugins'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in `map'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in `load_plugins'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:326:in `block in run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `each'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `run'
    /Users/robert/.gems/gems/cocoapods-1.7.2/lib/cocoapods/command.rb:52:in `run'
    /Users/robert/.gems/gems/cocoapods-1.7.2/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
    ---------------------------------------------
    
    [!] Your Podfile requires that the plugin `cocoapods-keys` be installed. Please install it and try installation again.
    

    I have tried:

    • gem install cocoapods-keys --user-install
    • Upgrading and reinstalling Ruby (On version 2.6.3)
    • Sudo gem install cocoapods-keys`

    However nothing seems to work.

    I would really appreciate it if someone can point me in the right direction!

    Thanks!

    opened by RJ-Clegg 18
  • Some thoughts around projects that have the same name.

    Some thoughts around projects that have the same name.

    I was keeping two copies of my project around so that I could verify bugs in a separate Xcode window than the one where I'm working on a new feature (obv a separate branch would do the same, but would require full recompiles, which takes 2-3 days when compiling Swift files).

    I added a key to the "main" project, and kept getting the error "CocoaPods-Keys has detected a keys mismatch for your setup." Looking into it, it was because get_keyring_named was returning the wrong Keyring.

    So here are two ideas: one, check the path. Brittle if the user renames their project folder. Two, emit a warning (error?) if two keyrings have the same name.

    Both of these dodge the issue of what to DO when two projects have the same name! In the actual keychain entries will be shared between the two projects, which is probably what is intended...

    So, I wonder, if yaml_path_for_path should be based on the project name, but that would be a breaking change. Ug.

    Thoughts?

    opened by colinta 16
  • Fails with Cocoapods 0.37.rc.1

    Fails with Cocoapods 0.37.rc.1

    Updating to the new release candidate of Cocoapods causes Keys to not find a Podfile in the project directory. This did not happen on 0.37.beta.1. Is this a change in Cocoapods that causes the incompatibility or something on my side?

    fparedes sh 2015-04-28 10-25-12

    Verbose output:

    Fetching External Sources:
    
    -> Pre-downloading: `Keys` from `https://github.com/ashfurrow/empty-podspec.git`
     > Git download
     > Git download
         $ /usr/local/bin/git clone https://github.com/ashfurrow/empty-podspec.git /var/folders/n7/kfjx0_c10h3f3tg2dfs16ywc0000gp/T/d20150428-13846-15ihwou --single-branch --depth 1
         Cloning into '/var/folders/n7/kfjx0_c10h3f3tg2dfs16ywc0000gp/T/d20150428-13846-15ihwou'...
     > Running prepare command
       $ /bin/bash -c ' 'set\ -e' 'pod\ keys\ generate\ \"\%\%PROJECT_NAME\%\%\"
       [!] No `Podfile' found in the project directory.
    [!] /bin/bash -c '
    'set\ -e'
    'pod\ keys\ generate\ \"\%\%PROJECT_NAME\%\%\"
    
    [!] No `Podfile' found in the project directory.
    
    
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/executable.rb:70:in `execute_command'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/executable.rb:27:in `block in executable'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:62:in `block (2 levels) in run_prepare_command'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:58:in `chdir'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:58:in `block in run_prepare_command'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:57:in `run_prepare_command'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:35:in `prepare!'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:191:in `copy_and_clean'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:115:in `block (2 levels) in uncached_pod'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:113:in `each'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:113:in `block in uncached_pod'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:168:in `call'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:168:in `in_tmpdir'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:101:in `uncached_pod'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:31:in `download_pod'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader.rb:34:in `download'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/external_sources/abstract_external_source.rb:101:in `block in pre_download'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:70:in `titled_section'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/external_sources/abstract_external_source.rb:99:in `pre_download'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:347:in `fetch_external_source'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:324:in `block (2 levels) in fetch_external_sources'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:323:in `each'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:323:in `block in fetch_external_sources'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:322:in `fetch_external_sources'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:57:in `analyze'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:190:in `analyze'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:112:in `block in resolve_dependencies'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:111:in `resolve_dependencies'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:91:in `install!'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-keys-1.1.0/lib/plugin.rb:49:in `install!'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/command/project.rb:155:in `run'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/command.rb:46:in `run'
    ~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/bin/pod:44:in `<top (required)>'
    ~/.rubies/ruby-2.2.1/bin/pod:23:in `load'
    ~/.rubies/ruby-2.2.1/bin/pod:23:in `<main>'
    
    opened by nanoxd 16
  • pod install fails when `cocoapods-keys` is install (new bug)

    pod install fails when `cocoapods-keys` is install (new bug)

    Command

    /Users/creegan/.rvm/gems/ruby-2.1.2/bin/pod install
    

    Report

    • What did you do? Ran pod install
    • What did you expect to happen? "Installation" of all pods and the initialization of the cocoapods-keys
    • What happened instead? pod install crashed after installing all the pods

    Stack

       CocoaPods : 0.36.0
            Ruby : ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
        RubyGems : 2.2.2
            Host : Mac OS X 10.10.3 (14D87h)
           Xcode : 6.1.1 (6A2008a)
             Git : git version 2.2.1
    Ruby lib dir : /Users/creegan/.rvm/rubies/ruby-2.1.2/lib
    Repositories : artsy - https://github.com/artsy/Specs.git @ 0ac451b4b5ad3b6251c77663014b51a0048dde7e
                   master - git://github.com/CocoaPods/Specs.git @ 6f4cd6159d34d7a04e9d3caa16c9ac02d37788bc
                   master-1 - https://github.com/CocoaPods/Specs.git @ b2e4f75408a042a029811a9e61dd512018f4a269
    

    Plugins

    cocoapods-browser : 0.1.5
    cocoapods-keys    : 1.0.1
    cocoapods-plugins : 0.4.1
    cocoapods-trunk   : 0.6.0
    cocoapods-try     : 0.4.3
    

    Podfile

    platform :ios, '7.1'
    
    source 'https://github.com/CocoaPods/Specs.git'
    
    # ignore all warnings from all pods
    inhibit_all_warnings!
    
    xcodeproj 'ProjectName'
    
    pod 'CocoaLumberjack', '~> 1.9.2'
    pod 'KZAsserts', '~> 1.0'
    pod 'ReactiveCocoa'
    pod 'ReactiveViewModel'
    pod 'MBProgressHUD'
    pod 'libextobjc'
    pod 'ECSlidingViewController', '~> 2.0.3'
    pod 'TSMessages', '~> 0.9.11'
    pod 'NSString-Email', '~> 0.0.3'
    pod 'TTTAttributedLabel'
    pod 'ETFormatter', '~> 1.0'
    pod 'ETAssert', '~> 1.0.1'
    pod 'ECSlidingViewController', '~> 2.0.3'
    pod 'MustOverride', '~> 1.1'
    
    target 'ProjectNameTests', :exclusive => true do
      pod 'Specta', '~> 0.2.1'
      pod 'Expecta+Snapshots', '~> 1.2.1'
    end
    
    plugin 'cocoapods-keys', {
        :project => "ProjectName",
        :keys => [
        "OAuthClientSecret",
        "OAuthClientId"
        ]
    }
    
    class ::Pod::Generator::Acknowledgements
      def header_text
        "ProjectName uses 'CocoaPods' to link with the following 3rd Party Libraries:"
      end
    end
    

    Error

    NoMethodError - undefined method `*' for nil:NilClass
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-keys-1.0.1/lib/key_master.rb:22:in `generate_data'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-keys-1.0.1/lib/key_master.rb:13:in `initialize'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-keys-1.0.1/lib/plugin.rb:8:in `new'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-keys-1.0.1/lib/plugin.rb:8:in `podspec_for_current_project'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-keys-1.0.1/lib/plugin.rb:66:in `from_string'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-core-0.36.0/lib/cocoapods-core/specification.rb:536:in `from_file'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/external_sources/abstract_external_source.rb:142:in `store_podspec'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/external_sources/abstract_external_source.rb:112:in `block in pre_download'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/user_interface.rb:70:in `titled_section'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/external_sources/abstract_external_source.rb:99:in `pre_download'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer/analyzer.rb:347:in `fetch_external_source'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer/analyzer.rb:324:in `block (2 levels) in fetch_external_sources'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer/analyzer.rb:323:in `each'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer/analyzer.rb:323:in `block in fetch_external_sources'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/user_interface.rb:49:in `section'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer/analyzer.rb:322:in `fetch_external_sources'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer/analyzer.rb:57:in `analyze'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer.rb:189:in `analyze'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer.rb:111:in `block in resolve_dependencies'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/user_interface.rb:49:in `section'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer.rb:110:in `resolve_dependencies'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/installer.rb:90:in `install!'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-keys-1.0.1/lib/plugin.rb:40:in `install!'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/command/project.rb:101:in `run'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/lib/cocoapods/command.rb:46:in `run'
    /Users/creegan/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.36.0/bin/pod:44:in `<top (required)>'
    /Users/creegan/.rvm/gems/ruby-2.1.2/bin/pod:23:in `load'
    /Users/creegan/.rvm/gems/ruby-2.1.2/bin/pod:23:in `<main>'
    /Users/creegan/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    /Users/creegan/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
    

    I do have the keys specified on my Podfile like this:

    plugin 'cocoapods-keys', {
        :project => "ProjectName",
        :keys => [
        "OAuthClientSecret",
        "OAuthClientId"
        ]
    }
    

    This was reported on #34 but ~~@orta~~@ashfurrow mentioned this is a new issue and it would be better to open a new issue; hence this one

    opened by esttorhe 15
  • pod install fails when cocoapods-keys is installed

    pod install fails when cocoapods-keys is installed

    Report

    • What did you do?
    • What did you expect to happen?
    • What happened instead?

    Stack

       CocoaPods : 0.35.0
            Ruby : ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
        RubyGems : 2.4.5
            Host : Mac OS X 10.10.2 (14C109)
           Xcode : 6.1.1 (6A2008a)
             Git : git version 2.2.1
    Ruby lib dir : /Users/davbeck/.rvm/rubies/ruby-2.1.0/lib
    Repositories : master - https://github.com/CocoaPods/Specs.git @ b1408f2799570977598f90cffaceb4025868408d
    

    Plugins

    cocoapods-keys    : 0.9.5
    cocoapods-plugins : 0.3.1
    cocoapods-trunk   : 0.4.1
    cocoapods-try     : 0.4.2
    

    Podfile

    source 'https://github.com/CocoaPods/Specs.git'
    
    target 'TheCityAdminAPI', :exclusive => true do
      pod "TheCityAdminAPI", :path => "../"
    end
    
    target 'Tests', :exclusive => true do
      pod "TheCityAdminAPI", :path => "../"
    
    
    end
    

    Error

    NoMethodError - undefined method `add_file_references' for nil:NilClass
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-keys-0.9.5/lib/installer.rb:40:in `block in install!'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-keys-0.9.5/lib/installer.rb:15:in `install!'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-keys-0.9.5/lib/plugin.rb:6:in `block in <module:CocoaPodsKeys>'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/hooks_manager.rb:56:in `call'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/hooks_manager.rb:56:in `block in run'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/hooks_manager.rb:55:in `each'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/hooks_manager.rb:55:in `run'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:326:in `run_plugins_post_install_hooks'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:318:in `perform_post_install_actions'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:94:in `install!'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/project.rb:101:in `run'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/bin/pod:23:in `load'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/bin/pod:23:in `<main>'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
    /Users/davbeck/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
    
    opened by davbeck 15
  • Missing project name Keys file

    Missing project name Keys file

    After doing pod install with this:

    plugin 'cocoapods-keys', {
      :project => "Stores Locator",
      :keys => [
        "ParseClientKey",
        "ParseApplicationID",
      ]
    }
    

    I was expecting:

    will add a new Objective-C class to your Pods xcworkspace.

    But this particular class is missing. I tried to mimic your Eidolon project (cc @ashfurrow ) structure (mine is in Swift as well), but the Keys class does not exist.

    opened by RuiAAPeres 15
  • NoMethodError - undefined method `*' for nil:NilClass Error during install

    NoMethodError - undefined method `*' for nil:NilClass Error during install

    I added cocoapods-keys to a project today, and had a slight issue with initial install.

    $ gem install cocoapods-keys
    $ vim Podfile
    $ pod install
    CocoaPods-Keys has detected a keys mismatch for your setup.
     What is the key for TraktAPIKey
     > ABCDEF123456789 
    
    Saved TraktAPIKey to TraktTopTen.
    

    All well and good, but then immediately after I got the following issue:


    Command

    /Users/pi/.gem/bin/pod install
    

    Report

    • What did you do? Ran pod install after adding cocoapods-keys to my Podfile.
    • What did you expect to happen? cocoapods-keys to request the key, and exit cleanly.
    • What happened instead? The following stack trace

    Stack

       CocoaPods : 0.38.2
            Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
        RubyGems : 2.0.14
            Host : Mac OS X 10.10.5 (14F27)
           Xcode : 7.0.1 (7A1001)
             Git : git version 2.3.8 (Apple Git-58)
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
    Repositories : master - https://github.com/CocoaPods/Specs.git @ fd384d791ce6472307a25da5a4499eef0b096eb8
    

    Plugins

    cocoapods-keys    : 1.5.2
    cocoapods-plugins : 0.4.2
    cocoapods-stats   : 0.5.3
    cocoapods-trunk   : 0.6.4
    cocoapods-try     : 0.4.5
    

    Podfile

    use_frameworks!
    link_with 'TraktTopTen', 'TraktTopTenTests'
    pod 'SwiftyJSON', '~> 2.3'
    pod 'Haneke', '~> 1.0.1'
    
    # Use cocoapods-keys to store the Trakt API key
    plugin 'cocoapods-keys', {
      :project => "TraktTopTen",
      :keys => [
        "TraktAPIKey"
      ]}
    

    Error

    NoMethodError - undefined method `*' for nil:NilClass
    /Users/pi/.gem/gems/cocoapods-keys-1.5.2/lib/key_master.rb:32:in `generate_data'
    /Users/pi/.gem/gems/cocoapods-keys-1.5.2/lib/key_master.rb:20:in `initialize'
    /Users/pi/.gem/gems/cocoapods-keys-1.5.2/lib/plugin.rb:34:in `new'
    /Users/pi/.gem/gems/cocoapods-keys-1.5.2/lib/plugin.rb:34:in `setup'
    /Users/pi/.gem/gems/cocoapods-keys-1.5.2/lib/plugin.rb:98:in `install!'
    /Users/pi/.gem/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
    /Users/pi/.gem/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in `run'
    /Users/pi/.gem/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
    /Users/pi/.gem/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
    /Users/pi/.gem/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
    /Users/pi/.gem/bin/pod:23:in `load'
    /Users/pi/.gem/bin/pod:23:in `<main>'
    

    After this, I ran pod install again, and it exited cleanly:

    $ pod install
    Updating local specs repositories
    
    CocoaPods 0.39.0.rc.1 is available.
    To update use: `sudo gem install cocoapods --pre`
    [!] This is a test version we'd love you to try.
    
    For more information see http://blog.cocoapods.org
    and the CHANGELOG for this version http://git.io/BaH8pQ.
    
    Analyzing dependencies
    Fetching podspec for `Keys` from `Pods/CocoaPodsKeys`
    Downloading dependencies
    Using Haneke (1.0.1)
    Installing Keys (1.0.0)
    Using SwiftyJSON (2.3.0)
    Generating Pods project
    Integrating client project
    Sending stats
    Sending stats
    
    opened by squarefrog 12
  • Library not loaded: @rpath/Keys.framework/Keys

    Library not loaded: @rpath/Keys.framework/Keys

    I import Keys into the swift code. It builds successfully after adding #import <Keys/ContribuinteKeys.h> on the Bridging-Header file. But when I run the app it says:

    dyld: Library not loaded: @rpath/Keys.framework/Keys
      Referenced from: /private/var/mobile/Containers/Bundle/Application/349D6252-2DE3-4B44-B12D-391121398133/Contribuinte.app/Contribuinte
      Reason: image not found
    

    Any clue?

    opened by ricardopereira 11
  • @orta => Move to pre-install hook

    @orta => Move to pre-install hook

    So obviously this is pretty bare right now, but it's kind of a proof-of-concept. Was excited to dig into this after a day of walking about Newcastle yesterday, but someone nerd-sniped me with TV Tropes. I'll be submitting little chunks of work as I get them.

    I've looked through the CocoaPods codebase (Rainforest is awesome) and am pretty sure that I want to inject my new, faked podspec in the Installer class' install! method, which I've monkey patched here (including a call to the original). This makes sense as a place for pre-install hooks.

    I'm still experiencing intermittent installation failures when I call through to the original method. This cafe's wifi is not great, so I'm unable to troubleshoot further (and momentarily getting on a ferry sans Internet). I think it's wise for me to figure out what that's all about before moving on with further monkeys' patches.

    Shooting into the Sun is a dirty dirty habit but I just can't help myself.

    opened by ashfurrow 10
  • Problem with XCode 14 and m1 mac.

    Problem with XCode 14 and m1 mac.

    I just had to set up a couple of new m1 build machines and I couldn't get this gem to run the ruby-inline c++ code when running pod install with XCode 14.

    I was able to work around this by downgrading to Xcode 13.

    Here was the error:

    bash-3.2$ make pods
    
    Getting pods
    
    bundle exec pod install --repo-update --verbose --deployment
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:83:18: warning: 'SecKeychainOpen' is deprecated: first deprecated in macOS 12.0 - Custom keychain management is no longer supported [-Wdeprecated-declarations]
            status = SecKeychainOpen("login.keychain",&keychain);
                     ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:287:10: note: 'SecKeychainOpen' has been explicitly marked deprecated here
    OSStatus SecKeychainOpen(const char *pathName, SecKeychainRef * __nonnull CF_RETURNS_RETAINED keychain)
             ^
    1 warning generated.
    Undefined symbols for architecture arm64:
      "_rb_cObject", referenced from:
          _Init_Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1 in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_const_get", referenced from:
          _Init_Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1 in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_define_method", referenced from:
          _Init_Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1 in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_eRuntimeError", referenced from:
          _get in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
          _set in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_intern2", referenced from:
          _Init_Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1 in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_raise", referenced from:
          _get in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
          _set in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_str_new", referenced from:
          _get in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_string_value_cstr", referenced from:
          _get in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
      "_rb_string_value_ptr", referenced from:
          _get in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
          _set in Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1-99b4fc.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    ---------------------------------------------
    Error loading plugin file `/Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-keys-2.2.1/lib/cocoapods_plugin.rb`.
    
    CompilationError - error executing "clang -fdeclspec -dynamic -bundle  -L/Users/edwardg/.rbenv/versions/3.0.2/lib  -Wl,-multiply_defined,suppress -fno-common -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe -L. -L/Users/edwardg/.rbenv/versions/3.0.2/lib  -fstack-protector-strong -I /Users/edwardg/.rbenv/versions/3.0.2/include/ruby-3.0.0 -I /Users/edwardg/.rbenv/versions/3.0.2/include/ruby-3.0.0/arm64-darwin21 -I /Users/edwardg/.rbenv/versions/3.0.2/include -L/Users/edwardg/.rbenv/versions/3.0.2/lib -o \"/Users/edwardg/.ruby_inline/ruby-3.0.0/Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1.bundle\" \"/Users/edwardg/.ruby_inline/ruby-3.0.0/Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1.c\" -lc -framework Security -framework CoreFoundation -framework CoreServices ": pid 23937 exit 1
    Renamed /Users/edwardg/.ruby_inline/ruby-3.0.0/Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1.c to /Users/edwardg/.ruby_inline/ruby-3.0.0/Inline_OSXKeychain_5b2f8d1cd1bde9c4ff3fea49f09cd5c1.c.bad
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/RubyInline-3.12.5/lib/inline.rb:621:in `build'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/RubyInline-3.12.5/lib/inline.rb:859:in `inline'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:17:in `<class:OSXKeychain>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:6:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-keys-2.2.1/lib/keyring.rb:1:in `require'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-keys-2.2.1/lib/keyring.rb:1:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-keys-2.2.1/lib/cocoapods_plugin.rb:1:in `require'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-keys-2.2.1/lib/cocoapods_plugin.rb:1:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:92:in `require'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:92:in `block in safe_require'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:90:in `each'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:90:in `safe_require'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:31:in `block in load_plugins'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:30:in `map'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command/plugin_manager.rb:30:in `load_plugins'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command.rb:326:in `block in run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command.rb:325:in `each'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command.rb:325:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/pod:23:in `load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/pod:23:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:58:in `load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:58:in `kernel_load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:23:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli.rb:486:in `exec'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli.rb:31:in `dispatch'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli.rb:25:in `start'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/exe/bundle:48:in `block in <top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/exe/bundle:36:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/bundle:23:in `load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/bundle:23:in `<main>'
    ---------------------------------------------
    
      Preparing
    [!] Your Podfile requires that the plugin `cocoapods-keys` be installed. Please install it and try installation again.
    
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:722:in `block in ensure_plugins_are_installed!'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:720:in `each'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:720:in `ensure_plugins_are_installed!'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:225:in `block in prepare'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in `message'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:222:in `prepare'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:160:in `install!'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/pod:23:in `load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/pod:23:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:58:in `load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:58:in `kernel_load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:23:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli.rb:486:in `exec'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli.rb:31:in `dispatch'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/cli.rb:25:in `start'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/exe/bundle:48:in `block in <top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/gems/bundler-2.3.22/exe/bundle:36:in `<top (required)>'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/bundle:23:in `load'
    /Users/edwardg/.rbenv/versions/3.0.2/gemsets/till/bin/bundle:23:in `<main>'
    
    [!] cocoapods-generate requires CocoaPods >= 1.5.0
    make: *** [pods] Error 1
    bash-3.2$ 
    

    I actually tried to force an x86_64 build to see if that would fix it with arch -x86_64 pod install but it still complained about not being able to find the exact same symbols. I wonder if the ruby framework in Xcode 14 changed.

    Wanted to also mention that I'm installing ruby with rbenv and that I did downgrade ruby from 3 to 2 although I'm not sure that the ruby downgrade was required.

    opened by clintmod 18
  • RuntimeError - Can't store password in Keychain

    RuntimeError - Can't store password in Keychain

    Adding keys suddenly stopped working for us in our Jenkins enviornment, throwing error RuntimeError - Can't store password in Keychain which was working before. When I either SSH or VNC into the MacOS host and run bundle exec pod keys set "KeyName" "0000-00000-00000" it works fine.

    Keychain is unlocked

    (Sorry I can't copy whole template do to Jenkins formatting)

    Command

    /Users/user/.rbenv/versions/3.1.2/bin/pod keys set KeyName 0000-00000-00000

    Report

    • What did you do? Jenkins ran pod keys set command
    • What did you expect to happen? Create key
    • What happened instead? RuntimeError - Can't store password in Keychain

    Stack

    CocoaPods : 1.11.3
     Ruby : ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]
    RubyGems : 3.3.7
    Host : macOS 12.3.1 (21E258)
    Xcode : 13.3.1 (13E500a)
    Git : git version 2.36.1
    trunk - CDN - [https://cdn.cocoapods.org/](https://cdn.cocoapods.org/%1B[0m)
    

    Plugins

    cocoapods-deintegrate              : 1.0.5
    cocoapods-keys                     : 2.2.1
    cocoapods-plugins                  : 1.0.0
    cocoapods-s3-download              : 0.0.3
    cocoapods-search                   : 1.0.1
    cocoapods-trunk                    : 1.6.0
    cocoapods-try                      : 1.2.0
    cocoapods-user-defined-build-types : 0.0.7
    slather                            : 2.7.2
    

    Error

    RuntimeError - Can't store password in Keychain
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:10:in `set'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/osx_keychain-1.0.2/lib/osx_keychain.rb:10:in `[]='
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-keys-2.2.1/lib/keyring.rb:34:in `save'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-keys-2.2.1/lib/pod/command/keys/set.rb:46:in `run'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    /Users/ec2-user/.rbenv/versions/3.1.2/bin/pod:25:in `load'
    /Users/ec2-user/.rbenv/versions/3.1.2/bin/pod:25:in `<top (required)>'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/cli/exec.rb:58:in `load'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/cli/exec.rb:58:in `kernel_load'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/cli/exec.rb:23:in `run'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/cli.rb:478:in `exec'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/cli.rb:31:in `dispatch'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/cli.rb:25:in `start'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/exe/bundle:49:in `block in <top (required)>'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
    /Users/ec2-user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/exe/bundle:37:in `<top (required)>'
    /Users/ec2-user/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
    /Users/ec2-user/.rbenv/versions/3.1.2/bin/bundle:25:in `<main>'
    
    opened by drogerschariot 0
  • Running `pod install` via shell script hangs on blank screen

    Running `pod install` via shell script hangs on blank screen

    Whenever I try to run pod install after setting up cocoapods-keys the script hangs on a blank screen until someone cancels the script and then manually runs pod install from the terminal.

    opened by clintmod 2
  • 1.0.1 is always installed instead of 2.2.1

    1.0.1 is always installed instead of 2.2.1

    I am developing an iOS app with a companion watchOS 7+ app. I noticed that version 1.0.1 of Keys is always installed after a pod install even though I have version 2.2.1 of the plugin installed.

    1.0.1 doesn't seem to work with watchOS (or at least watchOS 7), so this is a blocker for me. How do I ensure that version 2.2.1 of Keys is installed after I do a pod install and enter the keys that my app uses?

    opened by SumoSimo 10
  • Obsolete key's value in generated file

    Obsolete key's value in generated file

    I'm experiencing a very strange issue nobody else can reproduce...I wanted to change bunch of previously define values for existing keys. All changes were applied successfully however there is one value which is always taken from previous .env definition. No matter what I do it still takes previous value.

    Prerequisites

    1. Xcode 13.x (didn't work for Xcode 12.x either)
    2. CocoaPods v 1.11.x (didn't work for 1.10.x either)
    3. cocoapods-keys 2.1.0 or 2.2.1
    4. ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    5. macOS 11.x

    Podfile:

    plugin 'cocoapods-keys', {
        project: 'MyProject',
        target: 'MyTarget',
        keys: [
            'MY_KEY',
            'MY_SECOND_KEY'
        ]
    }
    

    .env file

    MY_KEY = value.1
    MY_SECOND_KEY = value.2
    

    Example

    Before change:

    # .env file
    MY_KEY = value.1
    MY_SECOND_KEY = value.2
    
    # .swift file
    print(Keys().mY_KEY) // prints "value.1" 
    print(Keys().mY_SECOND_KEY) // prints "value.2" 
    

    After change:

    # .env file
    MY_KEY = value.11
    MY_SECOND_KEY = value.22
    
    # pod install
    
    # .swift file
    print(Keys().mY_KEY) // still prints "value.1" 
    print(Keys().mY_SECOND_KEY) // prints correctly "value.22" 
    

    What I did:

    1. deintegrate pods: pod deintegrate
    2. removed all cocoapods keys occurrences in my keychain
    3. removed ~/.cocoapods/keys
    4. removed .env file and defined values via terminal prompts
    rm -rf "${HOME}/Library/Caches/CocoaPods"
    rm -rf "`pwd`/Pods/"
    pod update
    
    1. removed CocoaPods from Mac entirely
    2. removed all Xcode caches I found:
    killall Xcode
    xcrun -k
    xcodebuild -alltargets clean
    rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
    rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
    rm -rf ~/Library/Developer/Xcode/DerivedData/*
    rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
    

    If I remove this key from .env file and install pods then script prompts for giving a value. Calling bundle exec pod keys prints nothing. So far I use Keys.m file generated by a second developer. By "using" I mean I copy-paste content of his file to my file after every pod install what is not very efficient way of work.

    This issue drives me crazy. Can someone have other idea what to do?

    opened by PatrykKaczmarek 3
Owner
Orta Therox
I help people build dev ecosystems. Current: TypeScript. Contributed to: Shiki, Shiki Twoslash, Danger, CocoaPods, Jest, GraphQL, RxSwift & Svelte.
Orta Therox
RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

Kitura 122 Dec 16, 2022
A really simple key-value wrapper for keychain.

PlainKeychain A really simple key-value wrapper for keychain. Features ✅ Key-value pairs using kSecClassGenericPassword. ❌ Internet passwords (kSecCla

Benjamin Barnard 0 Nov 27, 2021
PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. PGPro is made in Switzerland.

PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. P

Luca Näf 250 Jan 4, 2023
A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys

Gumroad License Validator Overview A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys Requirem

Daniel Kašaj 13 Sep 2, 2022
Send key events to any running macOS application.

KeySender An extremely simple micro package that enables you to send key events to any running application. Install Add the following to your Package.

Jordan Baird 5 Jul 31, 2022
Swift RSA Key Loader

Swift RSA Key Loader Requirements iOS 9.0+ Installation See the subsections below for details about the different installation methods. Swift Package

Dmytrii Golovanov 1 Jun 13, 2022
Swift Key Derivation

KeyDerivation This package implements key derivation system based of 5 levels: m / purpose' / coin_type' / account' / role / index As described in CIP

Arnot 1 Mar 5, 2022
A wrapper to make it really easy to deal with iOS, macOS, watchOS and Linux Keychain and store your user's credentials securely.

A wrapper (written only in Swift) to make it really easy to deal with iOS, macOS, watchOS and Linux Keychain and store your user's credentials securely.

Ezequiel Aceto 2 Mar 29, 2022
Valet lets you securely store data in the iOS, tvOS, or macOS Keychain without knowing a thing about how the Keychain works.

Valet Valet lets you securely store data in the iOS, tvOS, watchOS, or macOS Keychain without knowing a thing about how the Keychain works. It’s easy.

Square 3.8k Jan 4, 2023
Framework for biometric authentication (via TouchID) in your application

Features Requirements Communication Installation Usage Intro Biometric authentication availability Feature enabled/disabled for biometric authenticati

Igor Vasilenko 29 Sep 16, 2022
Pass for iOS - an iOS client compatible with Pass command line application.

Pass is an iOS client compatible with ZX2C4's Pass command line application. It is a password manager using GPG for encryption and Git for version control.

Mingshen Sun 1.3k Dec 26, 2022
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more.

Virgil Core SDK Objective-C/Swift Introduction | SDK Features | Installation | Configure SDK | Usage Examples | Docs | Support Introduction Virgil Sec

Virgil Security, Inc. 27 Jul 26, 2022
Safe and easy to use crypto for iOS and macOS

Swift-Sodium Swift-Sodium provides a safe and easy to use interface to perform common cryptographic operations on macOS, iOS, tvOS and watchOS. It lev

Frank Denis 483 Jan 5, 2023
Native and encrypted password manager for iOS and macOS.

Open Sesame Native and encrypted password manager for iOS and macOS. What is it? OpenSesame is a free and powerful password manager that lets you mana

OpenSesame 432 Jan 7, 2023
Simple, secure password and data management for individuals and teams

Padloc Simple, secure password and data management for individuals and teams (formerly known as Padlock). This repo is split into multiple packages: P

Padloc 2.1k Jan 8, 2023
Cloak Swift - a tool and Tuist plugin to encrypt secrets and then pass them in an obfuscated form into applications

This is Cloak Swift - a tool and Tuist plugin to encrypt secrets and then pass them in an obfuscated form into applications.

Andrew Lord 3 Nov 9, 2022
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift

CryptoSwift Crypto related functions and helpers for Swift implemented in Swift. (#PureSwift) Note: The master branch follows the latest currently rel

Marcin Krzyzanowski 9.4k Jan 5, 2023
A framework for the JOSE standards JWS, JWE, and JWK written in Swift.

JOSESwift is a modular and extensible framework for the JOSE standards JWS, JWE, and JWK written in Swift. ?? Please note that this implementation of

Airside Mobile, Inc. 162 Dec 15, 2022
CCCryptor (AES encryption) wrappers for iOS and Mac in Swift. -- For ObjC, see RNCryptor/RNCryptor-objc

RNCryptor Cross-language AES Encryptor/Decryptor data format. The primary targets are Swift and Objective-C, but implementations are available in C, C

null 3.3k Dec 30, 2022