├── .gitignore ├── Gemfile ├── LICENSE.txt ├── README.md ├── cocoapods-no-dev-schemes.gemspec └── lib ├── cocoapods-no-dev-schemes.rb └── cocoapods_plugin.rb /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | pkg 3 | .idea/ 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in cocoapods-no-dev-schemes.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Orta Therox 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CocoaPods No-Dev-Schemes 2 | 3 | Is it annoying that `pod install`ing with development pods changes your target? Well now they won't be created for you anymore. There are good reasons for [doing it](https://github.com/CocoaPods/CocoaPods/pull/3600), but not when working with an app. 4 | 5 | Use a Gemfile. [Here's a guide](http://guides.cocoapods.org/using/a-gemfile.html) 6 | 7 | Gemfile: 8 | ``` 9 | gem "cocoapods" 10 | gem "cocoapods-no-dev-schemes" 11 | ``` 12 | 13 | Podfile: 14 | ``` 15 | plugin "cocoapods-no-dev-schemes" 16 | [...] 17 | ``` 18 | -------------------------------------------------------------------------------- /cocoapods-no-dev-schemes.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'cocoapods-no-dev-schemes.rb' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = 'cocoapods-no-dev-schemes' 8 | spec.version = CocoapodsNoDevSchemes::VERSION 9 | spec.authors = ['Orta Therox'] 10 | spec.email = ['orta.therox@gmail.com'] 11 | spec.description = %q{Removes all the CocoaPods Shared Schemes from Developer Pods.} 12 | spec.summary = %q{Removes all the CocoaPods Shared Schemes from Developer Pods.} 13 | spec.homepage = 'https://github.com/orta/cocoapods-no-dev-schemes' 14 | spec.license = 'MIT' 15 | 16 | spec.files = `git ls-files`.split($/) 17 | spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } 18 | spec.require_paths = ['lib'] 19 | 20 | spec.add_development_dependency 'bundler', '~> 1.3' 21 | spec.add_development_dependency 'rake' 22 | end 23 | -------------------------------------------------------------------------------- /lib/cocoapods-no-dev-schemes.rb: -------------------------------------------------------------------------------- 1 | module CocoapodsNoDevSchemes 2 | VERSION = '1.0.0' 3 | end 4 | -------------------------------------------------------------------------------- /lib/cocoapods_plugin.rb: -------------------------------------------------------------------------------- 1 | Pod::HooksManager.register('cocoapods-no-dev-schemes', :post_install) do |context, user_options| 2 | require 'fileutils' 3 | 4 | # we want to undo - https://github.com/CocoaPods/CocoaPods/pull/3600 5 | # So we need to undo this function: 6 | # https://github.com/CocoaPods/Xcodeproj/blob/27aecbfd66e883d1df616355347246b30fec551d/lib/xcodeproj/scheme.rb#L224-L244 7 | 8 | shared_scheme_path = "#{context.sandbox_root}/Pods.xcodeproj/xcshareddata/" 9 | if Dir.exist?(shared_scheme_path) 10 | 11 | # But I've not needed to undo it yet. 12 | # Happy to take PRs on moving it back into the users scheme. 13 | 14 | FileUtils.rm_r(shared_scheme_path) 15 | end 16 | end 17 | --------------------------------------------------------------------------------