我使用react-仅在target3中使用,因为作为属于target1的框架,target1有一个target2副本。然后,如何将target3共享给target1 & target2。Podfile与The target 'target3' is declared twice for the project 'Target3/Target3.xcodeproj'.错误
target 'target1' do
use_frameworks!
target 'target3' do
use_frameworks!
react_native_path = 'node_modules/react-native/'
pod 'React', :path => react_native_path, :subspecs => [
'Core',
'BatchedBridge',
]
end
end
target 'target2' do
use_frameworks!
target 'target3' do
use_frameworks!
react_native_path = 'node_modules/react-native/'
pod 'React', :path => react_native_path, :subspecs => [
'Core',
'BatchedBridge',
]
end
end发布于 2017-08-17 07:40:41
太棒了!我在寻找另一个Cocoapods问题时无意中得到了灵感。
// with your own workspace
workspace 'myApp.xcworkspace'
// declare the project path you will add blew
project 'Project1.xcodeproj'
project 'Project2.xcodeproj'
// abstract_target with any target name as you like
abstract_target 'target' do
target 'Project1' do
use_frameworks!
project 'LessChat-iOS.xcodeproj'
pod 'Alamofire'
end
target 'Project2' do
use_frameworks!
project 'Project2.xcodeproj'
pod 'SwiftyJSON'
end
end以上,希望它能帮你=
更详细或相似的情况见:https://stackoverflow.com/a/43739900/5557953
谢谢@Johannes Fahrenkrug
https://stackoverflow.com/questions/45033317
复制相似问题