【发布时间】:2019-08-14 06:12:00
【问题描述】:
我们最近升级了 ReactNative App 中的所有库,我们正在使用 RN v0.59.8 和 XCode v 10.3 (10G8),一切正常,我们能够通过开发构建和运行应用程序证书,甚至是带有 Adhoc 配置文件的分发证书。
但是,当我们尝试提交到应用商店时,存档后,该应用始终列在“其他项目”下,而不是“iOS 应用”下。存档的类型总是显示为通用 Xcode 存档,这是错误的。
当我们检查为什么验证和上传到应用商店按钮被禁用时,我们发现apple technical document
根据文档中给出的建议,我们遵循以下步骤:
- 对于构建设置下的所有静态库,请跳过安装否
- 将所有头文件从 Headers 构建阶段移动到 Copy files 构建阶段
第二步有点繁琐,因为我们必须手动为所有静态库做。
这样做之后,我们开始收到大量编译错误,例如 NativeModule.h 中 MethodDescriptor 的重定义
此类错误有 600 多个。 请帮我解决这个问题
这是我的 Pod 文件
# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
#use_frameworks!
target 'SociallyGood' do
# this is very important to have!
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'ART',
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'DevSupport'
]
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# pod 'GoogleMaps' # <~~ remove this line if you do not want to support GoogleMaps on iOS
# Pods for SociallyGood
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path # If you need GoogleMaps support on iOS
# pod 'GoogleAppMeasurement', '5.4'
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'RNShare', :path => '../node_modules/react-native-share'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'GoogleSignIn', '~> 4.4.0'
# pod 'GoogleUtilities', '~> 1.3'
# pod 'GoogleAuthUtilities'
# pod 'GoogleAppUtilities'
pod 'FacebookSDK'
pod 'FBSDKCoreKit', '~> 4.40.0'
pod 'FBSDKLoginKit', '~> 4.40.0'
pod 'FBSDKShareKit', '~> 4.40.0'
# Required by RNFirebase
pod 'Firebase/Core', '~> 5.20.2'
pod 'Firebase/Auth', '~> 5.20.2'
# very important to have, unless you removed React dependencies for Libraries
# and you rely on Cocoapods to manage it
# pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'
pod 'BugsnagReactNative', :path => '../node_modules/bugsnag-react-native'
# pod 'react-native-maps', :path => '../node_modules/react-native-maps'
# pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'RNScreens', :path => '../node_modules/react-native-screens'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
end
【问题讨论】:
-
只是一个问题。您是否已将 Xcode 更新到最新版本?
-
@Shripada 是的。更新了...我有 XCode v 10.3
-
你能用你的 podfile 更新问题吗?
-
@GokulKulkarni 更新了我的问题中的 pod 文件详细信息
-
react-native-vector-icons 的版本是多少?它必须大于 4
标签: ios react-native