Expo SDK 46 iOS 构建在快速通道步骤中失败

问题描述 投票:0回答:6

我正在尝试从 expo 托管项目构建 iOS 应用程序。构建在 fastlane 步骤失败。

在 Expo SDK 44、45 中一切正常。但是当我升级到 SDK 46 时,我遇到了这个问题。

这是我的package.json

  {
  "name": "App123",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@openspacelabs/react-native-zoomable-view": "^2.0.4",
    "@react-native-community/datetimepicker": "6.2.0",
    "@react-native-community/netinfo": "9.3.0",
    "@react-native-community/slider": "4.2.3",
    "@react-native-google-signin/google-signin": "^8.0.0",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.0",
    "@react-navigation/stack": "^6.3.2",
    "@stripe/stripe-react-native": "0.13.1",
    "apisauce": "^2.1.6",
    "expo": "~46.0.13",
    "expo-apple-authentication": "^4.3.0",
    "expo-auth-session": "^3.7.1",
    "expo-constants": "^13.2.4",
    "expo-dev-client": "~1.3.1",
    "expo-document-picker": "^10.3.0",
    "expo-firebase-recaptcha": "^2.3.0",
    "expo-font": "^10.2.1",
    "expo-image-picker": "^13.3.1",
    "expo-linear-gradient": "^11.4.0",
    "expo-linking": "^3.2.2",
    "expo-localization": "^13.1.0",
    "expo-location": "^14.3.0",
    "expo-notifications": "^0.16.1",
    "expo-secure-store": "^11.3.0",
    "expo-splash-screen": "^0.16.2",
    "expo-status-bar": "^1.4.0",
    "expo-tracking-transparency": "^2.3.1",
    "expo-updates": "^0.14.6",
    "firebase": "9.9.2",
    "formik": "^2.2.9",
    "html-entities": "^2.3.3",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.1.3",
    "mime": "^3.0.0",
    "moment": "^2.29.4",
    "qs": "^6.11.0",
    "react": "18.0.0",
    "react-native": "0.69.6",
    "react-native-credit-card-input": "^0.4.1",
    "react-native-credit-card-input-view": "^0.0.7",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-fbsdk-next": "^11.0.0",
    "react-native-geocoding": "^0.5.0",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-google-mobile-ads": "^8.2.0",
    "react-native-maps": "0.31.1",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-progress": "^5.0.0",
    "react-native-razorpay": "^2.2.9",
    "react-native-read-more-text": "^1.1.2",
    "react-native-reanimated": "~2.9.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-svg": "12.3.0",
    "react-native-webview": "11.23.0",
    "react-native-youtube-iframe": "^2.2.2",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

这是 fastlane 错误日志

Executing App123 » Start Packager on http://localhost:8081
› Compiling App123 » ExpoModulesProvider.swift
› Compiling App123 » noop-file.swift
› Compiling App123 » main.m
› Compiling App123 » App123.c
› Linking   App123 » App123

❌  ld: '/Users/expo/Library/Developer/Xcode/DerivedData/App123-djegplhkioltttdpxhkjholomhle/Build/Intermediates.noindex/ArchiveIntermediates/App123/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/FBAEMKit/FBAEMKit.framework/FBAEMKit' 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 '/Users/expo/Library/Developer/Xcode/DerivedData/App123-djegplhkioltttdpxhkjholomhle/Build/Intermediates.noindex/ArchiveIntermediates/App123/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/FBAEMKit/FBAEMKit.framework/FBAEMKit' for architecture arm64


❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)

▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸   Ld /Users/expo/Library/Developer/Xcode/DerivedData/App123-djegplhkioltttdpxhkjholomhle/Build/Intermediates.noindex/ArchiveIntermediates/App123/InstallationBuildProductsLocation/Applications/App123.app/App123 normal (in target 'App123' from project 'App123')
▸ (1 failure)
2022-11-10 03:21:16.259 xcodebuild[4548:14785] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-11-10 03:21:16.259 xcodebuild[4548:14785] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-11-10 03:21:16.334 xcodebuild[4548:14785] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2022-11-10 03:21:16.334 xcodebuild[4548:14785] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2022-11-10 03:21:16.334 xcodebuild[4548:14785] XType: unable to make a connection to the font daemon!
2022-11-10 03:21:16.334 xcodebuild[4548:14785] XType: XTFontStaticRegistry is enabled as fontd is not available.
** ARCHIVE FAILED **
The following build commands failed:
    Ld /Users/expo/Library/Developer/Xcode/DerivedData/App123-djegplhkioltttdpxhkjholomhle/Build/Intermediates.noindex/ArchiveIntermediates/App123/InstallationBuildProductsLocation/Applications/App123.app/App123 normal (in target 'App123' from project 'App123')
(1 failure)
Exit status: 65
+-------------+-------------------------+
|           Build environment           |
+-------------+-------------------------+
| xcode_path  | /Applications/Xcode.app |
| gym_version | 2.206.1                 |
| sdk         | iPhoneOS15.5.sdk        |
+-------------+-------------------------+
Looks like fastlane ran into a build/archive error with your project
It's hard to tell what's causing the error, so we wrote some guides on how
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
Before submitting an issue on GitHub, please follow the guide above and make
sure your project is set up correctly.
fastlane uses `xcodebuild` commands to generate your binary, you can see the
the full commands printed out in yellow in the above log.
Make sure to inspect the output above, as usually you'll find more error information there
[stderr] [!] Error building the application - see the log above
Error: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.

我使用了“eas build -p ios”命令也使用了“eas build -p ios --clear-cache”

没用。

任何人都可以帮忙吗?拜托拜托拜托!!!!!

ios reactjs react-native expo fastlane
6个回答
3
投票

我在

managed
工作流程中也遇到了类似的问题,我可以通过使用自定义插件禁用位码来解决它。

Github问题链接

在项目根目录的
withNoBitcode
文件夹中创建
plugins
插件。

//./plugins/withNoBitcode.js
const { withXcodeProject } = require('@expo/config-plugins');


module.exports = function withNoBitcode(config) {
    return withXcodeProject(config, async (config) => {

        const xcodeProject = config.modResults;
        xcodeProject.addBuildProperty('ENABLE_BITCODE', 'NO');

        return config;
    });
}

withNoBitcode
 中添加 
app.config.js

插件
{
    expo: {
        plugins: [
            "'./plugins/withNoBitcode'"
        ]
    }
}

1
投票

由于我们在本地构建中没有遇到问题,因此我们在 Bitrise 上将 xcode 版本从 13 更改为 14,并且成功了!


1
投票

您是否使用任何其他目标,例如

Notification Service Extension
?如果使用,请更改
Enable Bitcode
值(目标(扩展目标)>构建设置>搜索“启用位码”)

如果您不使用其他目标,请更改主目标的

Enable Bitcode

或者请检查此文档以获取世博会管理项目的更改位码


1
投票

以下内容为我解决了这个问题:

// app.json
{
  ...
  ios: {
    "bitcode": false  
  }
}

1
投票

所有解决方案都不起作用,总的来说,这些看起来像是一些黑客行为。

我只是用

Xcode
存档了这个捆绑包,它就可以工作了。

又是一次,

Expo
可见它是多么不稳定......


0
投票

尝试在 app.json 中添加 { "expo": {..., "jsEngine": "hermes" } }

© www.soinside.com 2019 - 2024. All rights reserved.