谬误一

ReactNative报'event2/event-config.h' file not found解决方案

关上testApp.xcworkspace编译呈现'event2/event-config.h' file not found

查阅是因为Flipper-Folly版本导致的,将iOS文件下的 Podfile 文件做如下批改

use_flipper! 批改为 use_flipper!({ 'Flipper-Folly' => '2.3.0' })

改完后保留,将Podfile.lock文件删除,而后从新 pod install
installed实现后,返回下层目录执行 yarn ios (或react-native run-ios)就能够启动了
解决方案来自:
https://github.com/facebook/r...

谬误二

[!] Unable to find a specification for `Bugly (= 2.5.9)` You have either: * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile.

在podfile中增加

source 'https://github.com/CocoaPods/Specs.git'

谬误三

xcode12 pod集成友盟报错 "_OBJC_CLASS_$_UMSLEnvelopeBuild", referenced from

报错信息

Undefined symbols for architecture arm64:  "_OBJC_CLASS_$_UMSLEnvelopeBuild", referenced from:      objc-class-ref in UMShare(UMCommonStatisticsManager.o)ld: symbol(s) not found for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)

问题背景
公司要做第三方分享登陆,首先就想到友盟,于是按友盟官网的办法,在Podfile里写入

  pod 'UMCCommon' # 友盟根底库  pod 'UMCShare/UI' # 友盟分享UI  pod 'UMCShare/Social/WeChat' # 微信

后果发现报错,错误信息在下边。
通过种种搜寻无果。回去看文档的时候忽然发现友盟的库在2020.10.14更新了一版7.2.2版本。
UMSLEnvelopeBuild是根底库里的货色,抱着试一试的态度,我将根底库升高了一版,解决。在此记录一下分享给大家。猜想可能是没用xcode12做pod测试?

如何解决
将友盟根底库升高一版即可,我应用的是7.1.3版本,将Podfile里友盟的根底库指定成7.1.3即可

  pod 'UMCCommon', '~> 7.1.3' # 友盟根底库  pod 'UMCShare/UI' # 友盟分享UI  pod 'UMCShare/Social/WeChat' # 微信