ios - Include pods in main target and not in WatchKit extension -


i added watchkit extension current project. project uses cocoapods 0.36.1 add frameworks, want exclude pods watchkit extension project.

the watchkit extension project doesn't need lot of frameworks use in normal target, can't cocoapods work correct after altering podfile.

i use use_frameworks! in podfile, after running pod install following messages:

[!] cocoapods did not set base configuration of project because project has custom config set. in order cocoapods integration work @ all, please either set base configurations of target `homehandler` `pods/target support files/pods-homehandler/pods-homehandler.debug.xcconfig` or include `pods/target support files/pods-homehandler/pods-homehandler.debug.xcconfig` in build configuration. [!] cocoapods did not set base configuration of project because project has custom config set. in order cocoapods integration work @ all, please either set base configurations of target `homehandler` `pods/target support files/pods-homehandler/pods-homehandler.release.xcconfig` or include `pods/target support files/pods-homehandler/pods-homehandler.release.xcconfig` in build configuration. [!] cocoapods did not set base configuration of project because project has custom config set. in order cocoapods integration work @ all, please either set base configurations of target `homehandler watchkit extension` `pods/target support files/pods-homehandler watchkit extension/pods-homehandler watchkit extension.debug.xcconfig` or include `pods/target support files/pods-homehandler watchkit extension/pods-homehandler watchkit extension.debug.xcconfig` in build configuration. [!] cocoapods did not set base configuration of project because project has custom config set. in order cocoapods integration work @ all, please either set base configurations of target `homehandler watchkit extension` `pods/target support files/pods-homehandler watchkit extension/pods-homehandler watchkit extension.release.xcconfig` or include `pods/target support files/pods-homehandler watchkit extension/pods-homehandler watchkit extension.release.xcconfig` in build configuration. 

i didn't change settings base configurations, 2 of 3 targets have right pods.debug or pods.release set. 1 without base configuration watchkit app.

my original podfile

platform :ios, '8.0' use_frameworks!  source 'https://github.com/artsy/specs.git' source 'https://github.com/cocoapods/specs.git'  pod 'afnetworking', :git => 'https://github.com/afnetworking/afnetworking.git' pod 'cocoalumberjack', '~> 2.0.0' pod 'magicalrecord', :git => "https://github.com/magicalpanda/magicalrecord.git" pod 'purelayout' pod 'uaprogressview' pod 'uickeychainstore' pod 'xlform', git: 'git@github.com:xmartlabs/xlform.git' pod 'classy', git: 'git@github.com:depl0y/classy.git' pod 'reveal-ios-sdk', :configurations => ['debug'] pod 'jbchartview', '~> 2.8.9' pod 'rfquiltlayout' pod 'humslider', '~> 1.0' pod 'swifteventbus', :git => 'https://github.com/cesarferreira/swifteventbus.git'  post_install |installer_representation|     installer_representation.project.targets.each |target|         if target.name == "pods-afnetworking"             target.build_configurations.each |config|                 config.build_settings['gcc_preprocessor_definitions'] = ['$(inherited)', 'af_app_extensions=1']             end         end         if target.name == "pods-purelayout"             target.build_configurations.each |config|                 config.build_settings['gcc_preprocessor_definitions'] = ['$(inherited)', 'purelayout_app_extensions=1']             end         end     end end 

my altered podfile

this want exclude pods watchkit project.

platform :ios, '8.0'  use_frameworks!  source 'https://github.com/artsy/specs.git' source 'https://github.com/cocoapods/specs.git'  link_with "homehandler", "homehandler watchkit extension"  pod 'afnetworking', :git => 'https://github.com/afnetworking/afnetworking.git' pod 'cocoalumberjack', '~> 2.0.0' pod 'magicalrecord', :git => "https://github.com/magicalpanda/magicalrecord.git"  pod 'uickeychainstore'  target :homehandler     pod 'xlform', git: 'git@github.com:xmartlabs/xlform.git'     pod 'uaprogressview'     pod 'classy', git: 'git@github.com:depl0y/classy.git'     pod 'reveal-ios-sdk', :configurations => ['debug']     pod 'jbchartview', '~> 2.8.9'     pod 'rfquiltlayout'     pod 'humslider', '~> 1.0'     pod 'swifteventbus', :git => 'https://github.com/depl0y/swifteventbus.git'     pod 'purelayout' end  post_install |installer_representation|     installer_representation.project.targets.each |target|         if target.name == "pods-afnetworking"             target.build_configurations.each |config|                 config.build_settings['gcc_preprocessor_definitions'] = ['$(inherited)', 'af_app_extensions=1']             end         end         if target.name == "pods-purelayout"             target.build_configurations.each |config|                 config.build_settings['gcc_preprocessor_definitions'] = ['$(inherited)', 'purelayout_app_extensions=1']             end         end     end end 

the warnings outputted cocoapods due 2 cocoapods targets trying linked single target in application (which isn't supported).

i.e, have explicit target homehandler and linking nameless target homehandler link_with "homehandler", "homehandler watchkit extension".

my suggestion revamp podfile following:

platform :ios, '8.0' use_frameworks!  source 'https://github.com/artsy/specs.git' source 'https://github.com/cocoapods/specs.git'  def shared_pods     pod 'afnetworking', :git => 'https://github.com/afnetworking/afnetworking.git'     pod 'cocoalumberjack', '~> 2.0.0'     pod 'magicalrecord', :git => "https://github.com/magicalpanda/magicalrecord.git"     pod 'uickeychainstore' end  target 'homehandler'     shared_pods     pod 'xlform', git: 'git@github.com:xmartlabs/xlform.git'     pod 'uaprogressview'     pod 'classy', git: 'git@github.com:depl0y/classy.git'     pod 'reveal-ios-sdk', :configurations => ['debug']     pod 'jbchartview', '~> 2.8.9'     pod 'rfquiltlayout'     pod 'humslider', '~> 1.0'     pod 'swifteventbus', :git => 'https://github.com/depl0y/swifteventbus.git'     pod 'purelayout' end  target 'homehandler watchkit extension'     shared_pods end 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -