我仅在 target3 中使用 react-native 作为属于 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