The target name is most likely the name of your project.
target 'bdmap_ios' do
Your 'node_modules' directory is probably in the root of your project,
but if not, adjust the :path accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
Add any other subspecs you want to use in your project
]
Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-baidumap-sdk', path: '../node_modules/react-native-baidumap-sdk/lib/ios'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
`
出错内容:
ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/DoubleConversion' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/Folly' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/React' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/glog' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/react-native-baidumap-sdk' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/yoga' ld: library not found for -lDoubleConversion clang: _error: linker command failed with exit code 1 (use -v to see invocation)_
"react": "16.5.0", "react-native": "0.57.2", "react-native-baidumap-sdk": "^0.6.0" xcode: 10.1 macOS: Mojave Podfile文件内容: ` platform :ios, '9.0'
The target name is most likely the name of your project.
target 'bdmap_ios' do
Your 'node_modules' directory is probably in the root of your project,
but if not, adjust the
:path
accordinglypod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', # Include this for RN >= 0.47 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # Needed for debugging 'RCTAnimation', # Needed for FlatList and animations running on native UI thread
Add any other subspecs you want to use in your project
]
Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-baidumap-sdk', path: '../node_modules/react-native-baidumap-sdk/lib/ios' end
post_install do |installer| installer.pods_project.targets.each do |target| if target.name == "React" target.remove_from_project end end end
`
出错内容:
ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/DoubleConversion' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/Folly' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/React' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/glog' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/react-native-baidumap-sdk' ld: warning: directory not found for option '-L/Users/kfyang/Library/Developer/Xcode/DerivedData/bdmap_ios-ezwxnadbpjulixbyngxwxbdbrali/Build/Products/Debug-iphonesimulator/yoga' ld: library not found for -lDoubleConversion clang: _error: linker command failed with exit code 1 (use -v to see invocation)_