This repository was archived by the owner on Feb 20, 2023. It is now read-only.
This repository was archived by the owner on Feb 20, 2023. It is now read-only.
RN 0.60 iOS 无法运行起来 #500
Closed
Description
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 142.18 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.3.1 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.10.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 21, 23, 26, 27, 28
Build Tools: 23.0.1, 26.0.1, 28.0.3
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
复现步骤
yarn add react-native-wechat
react-native link react-native-wechat
cd ios
pod install
这一步报错
Analyzing dependencies
Fetching podspec for `RCTWeChat` from `../node_modules/react-native-wechat`
[!] No podspec found for `RCTWeChat` in `../node_modules/react-native-wechat`
按照#498 (comment)
复制RCTWeChat.podspec
到 node_modules/react-native-wechat
目录下,再执行pod install
,pod安装成功
在xcode
中点击运行按钮,编译报错
ld: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Fra
meworks/XCTest.framework/XCTest' does not contain bitcode. You must rebuild it with bitcode
enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable
bitcode for this target. file
'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Fra
meworks/XCTest.framework/XCTest' for architecture arm64
Activity
KingAmo commentedon Aug 15, 2019
按照网上的提供的解决方案,在我的项目中的
Build Settings
中将Enable Bitcode
设置为NO
,再次运行,报错:KingAmo commentedon Aug 15, 2019
按照#499 的
PR
是能跑起来了,但是,JS报错:调用
WeChat.registerApp('appid');
报错:
[-]RN 0.60 无法运行起来[/-][+]RN 0.60 iOS 无法运行起来[/+]premillos commentedon Aug 16, 2019
看起来是xcode配置的问题
StevenMasini commentedon Aug 22, 2019
我发现了,那个
master
branch 已经修好了。他们写了一个新的.podspec
。在
package.json
里用那版本就没问题了。不知道为什么一年多还没发布新的 npm 版本。
wanghhh commentedon Sep 1, 2019
我也跟你报错一样,楼主解决了吗
wanghhh commentedon Sep 1, 2019
你解决了吗
jameshuimin commentedon Sep 3, 2019
同样的错误,怎么解决的
0xinhua commentedon Sep 3, 2019
@jameshuimin @wanghhh
cd /ios
pod install
jameshuimin commentedon Sep 4, 2019
确实有效
wanghhh commentedon Sep 25, 2019
这个方法目前有效
sunlei4076 commentedon Oct 28, 2019
当前版本的小程序分享可以使用了吗
我目前使用的是react-native-wechat-with-miniprogram-share,不支持0.60+
0xinhua commentedon Oct 28, 2019
@sunlei4076 Hi, 当前版本不支持小程序分享,下一个 major 版本会支持,目前该 pr 还在开发测试阶段。