奇怪的是,我似乎无法让 Archive 在 XCode 中工作,但如果我不尝试 Archive 而只是构建发布版本,则构建会成功,并且不会出现重复符号的错误。该项目也可以在设备上正确构建。
我已经搜索了这个主题并尝试禁用可测试性,并将项目设置中的“无公共块”设置为“否”,但到目前为止没有运气。
该项目是一个基于 React Native 0.40 的项目,也安装了 CocoaPods。 PodFile是这个
# You Podfile should look similar to this file. React Native currently does not support use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
# Change 'AirMapsExplorer' to match the target in your Xcode project.
target 'StreetSmart' do
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'GoogleMaps' # <~~ remove this line if you do not want to support GoogleMaps on iOS
# when not using frameworks we can do this instead of including the source files in our project (1/4):
# pod 'react-native-maps', path: '../../'
# pod 'react-native-google-maps', path: '../../' # <~~ if you need GoogleMaps support on iOS
end
XCode版本是8.2.1,由于安装了pod,所以项目文件是通过.xcworkspace打开的。
非常感谢对此的任何帮助或见解,已经坚持了几个小时。