lib/plugin.rb in cocoapods-keys-1.4.0 vs lib/plugin.rb in cocoapods-keys-1.5.0

- old
+ new

@@ -23,12 +23,11 @@ # Get all the keys local_user_options = user_options || {} project = local_user_options.fetch('project') { CocoaPodsKeys::NameWhisperer.get_project_name } - keyring = KeyringLiberator.get_keyring_named(project) || - KeyringLiberator.get_keyring(Dir.getwd) || + keyring = KeyringLiberator.get_current_keyring(project, Dir.getwd) || Keyring.new(project, Dir.getwd, local_user_options['keys']) raise Pod::Informative, 'Could not load keyring' unless keyring # Create the h & m files in the same folder as the podspec @@ -39,9 +38,16 @@ File.write(interface_file, key_master.interface) File.write(implementation_file, key_master.implementation) # Add our template podspec add_keys_to_pods(keys_path.relative_path_from(installation_root), user_options) + + # Remove the shared scheme for this pod + Pod::HooksManager.register('cocoapods-keys', :post_install) do |context, user_options| + shared_scheme_path = "Pods/Pods.xcodeproj/xcshareddata/xcschemes/Keys.xcscheme" + FileUtils.rm(shared_scheme_path) if File.exist?(shared_scheme_path) + end + end def add_keys_to_pods(keys_path, options) keys_targets = options['target'] || options['targets']