【问题标题】:Detox build with react-native is failing because of GoogleUserMessagingPlatform?由于 GoogleUserMessagingPlatform,使用 react-native 构建排毒失败?
【发布时间】:2021-02-21 13:22:25
【问题描述】:

我无法让曾经工作的 React-Native Detox 构建工作。错误似乎由此开始:

PhaseScriptExecution [CP]\ Copy\ XCFrameworks /my-project/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/GoogleUserMessagingPlatform.build/Script-75B045B5FA23A64D503F12601136A594.sh (in target 'GoogleUserMessagingPlatform' from project 'Pods')
    cd /my-project/ios/Pods
    /bin/sh -c /my-project/ios/build/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/GoogleUserMessagingPlatform.build/Script-75B045B5FA23A64D503F12601136A594.sh
warning: [CP] Unable to find matching .xcframework slice in '/my-project/ios/Pods/GoogleUserMessagingPlatform/Frameworks/Release/UserMessagingPlatform.xcframework UserMessagingPlatform framework ios-armv7_arm64_arm64e ios-i386_x86_64-simulator' for the current build architectures (arm64 x86_64).

然后在最后失败:

ld: warning: directory not found for option '-F/my-project/ios/build/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/UserMessagingPlatform'
ld: framework not found UserMessagingPlatform
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我了解最新的大多数东西 - RN 的 0.63.3、CocoaPods 1.10.0、XCode 12.1。

【问题讨论】:

    标签: react-native jestjs cocoapods react-native-ios detox


    【解决方案1】:

    对我来说,修改 .detoxrc.json 构建命令以包含

    EXCLUDED_ARCHS=arm64
    

    阿拉

    "build": "xcodebuild -workspace ios/MyProject.xcworkspace -scheme MyProject -configuration Release -sdk iphonesimulator -derivedDataPath ios/build EXCLUDED_ARCHS=arm64 DETOX=1",
    

    【讨论】:

    • 请注意这与排毒无关。 Detox 所做的只是调用您提供的构建命令。
    • 同意。我认为这只是因为在 IDE 中构建的 xcode 必须比 CLI 更“聪明”地了解正在发生的事情。
    猜你喜欢
    • 2021-01-23
    • 2017-12-28
    • 2020-03-16
    • 2023-01-31
    • 2018-01-07
    • 1970-01-01
    • 1970-01-01
    • 2021-02-12
    • 2018-03-08
    相关资源
    最近更新 更多