简体   繁体   中英

Custom cocoapods xcodeproj file

By default a CocoaPods installation makes Pods/Pods.xcodeproj. Is there a way I can set it to be called something else, like Pods/MyCustomPods.xcodeproj?

The scenario is that I have a workspace that contains multiple projects in multiple directories, and two of the projects there use CocoaPods. And not only would it then be confusing with two projects named Pods, but Xcode can't cope well with that and confuses the two projects.

Cheers

Nik

The approach with multiple Pods projects was incorrect. In this case, rather make a .xcorkspace and then point your Podfile at it

workspace 'MyCustom.xcworkspace'

then in each of your targets, point at the respective .xcodeproj:

target 'A' do
  xcodeproj 'A.xcodeproj'
  pod 'SamplePod'
end

target 'B' do
  xcodeproj 'B.xcodeproj'
  pod 'SamplePod'
  pod 'OtherPod'
end

This works really well :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM