ios - Meaning of each Cocoapods build target -
what purpose of each target in cocoapods workspace?
when created new cocoapods library via "pod lib create foo", expected 2 targets: 1 build library, , 1 build example.
but resulting xcworkspace has total of 4 targets:
- project foo
- target foo_tests
- project pods
- target pods-foo_tests
- target pods-foo_tests-foo
- target pods-foo_tests-foo-foo
what's meaning of these targets?
(i chose no demo application, view-based testing, or testing frameworks.)
there 2 project in workspace 1 yours , other cocoapods, , cocoapods adds new target each pod add in podfile. example, let's podfile :
platform :ios, '7.0' pod 'afnetworking', '~> 2.5.4' pod 'bpxluuidhandler'
you should see in pod project's target list :
but mean?
targets cocoapods manage each pod. example if choose afnwtworking target in pod project, must see :
but example how cocoapods know add "link binary libraries" frameworks above? well, please check afnetworking's podspec file :
s.public_header_files = 'afnetworking/*.h' s.source_files = 'afnetworking/afnetworking.h' s.subspec 'serialization' |ss| ss.source_files = 'afnetworking/afurl{request,response}serialization.{h,m}' ss.ios.frameworks = 'mobilecoreservices', 'coregraphics' ss.osx.frameworks = 'coreservices' end s.subspec 'security' |ss| ss.source_files = 'afnetworking/afsecuritypolicy.{h,m}' ss.frameworks = 'security' end s.subspec 'reachability' |ss| ss.source_files = 'afnetworking/afnetworkreachabilitymanager.{h,m}' ss.frameworks = 'systemconfiguration' end
as can see above lines "ss.ios.frameworks" describe going on there.
hope clear now.
Comments
Post a Comment