Expo SDK 46 iOS build failed in fastlane step
Asked Answered
R

6

8

I am trying to build iOS app from expo managed project. The build fails At fastlane step.

In Expo SDK 44, 45 everything was okay. But when I upgrade to SDK 46, I am facing the issue.

Here is my 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
}

Here is fastlane error logs

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.

I've used 'eas build -p ios' command also used 'eas build -p ios --clear-cache'

didn't work.

Can anybody help please. Please please please!!!!

Ruffi answered 14/11, 2022 at 15:25 Comment(0)
F
2

The following has solved the issue for me:

// app.json
{
  ...
  ios: {
    "bitcode": false  
  }
}
Farrah answered 7/3, 2023 at 15:10 Comment(0)
A
3

I was also having similar issue in managed workflow and I was able to solve it by disabling the bitcode using custom plugin.

Github Issue Link

Create withNoBitcode plugin in plugins folder in root of project.

//./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;
    });
}

Add withNoBitcode plugin in app.config.js

{
    expo: {
        plugins: [
            "'./plugins/withNoBitcode'"
        ]
    }
}
Abbey answered 15/12, 2022 at 5:51 Comment(1)
plugins: [['./plugins/withNoBitcode']], worked for meSykes
F
2

The following has solved the issue for me:

// app.json
{
  ...
  ios: {
    "bitcode": false  
  }
}
Farrah answered 7/3, 2023 at 15:10 Comment(0)
A
1

Do you use any other target like Notification Service Extension? If you use, change Enable Bitcode value (Target(Extension Target)>Build Settings> Search 'Enable Bitcode')

If you do not use another target, change Enable Bitcode value for the main target

Or please check this document for change bitcode of expo managed projects

Anthologize answered 14/11, 2022 at 16:41 Comment(3)
I am using Expo managed project. I don't know about "Notification Service Extension" But yes i've added notification feature in this app. How can i enable or disable Bitcode in expo managed project? Can you help me on this please? @ahmet-sahinRuffi
Could you please share your app.json or app.config.js please? @HabiburRahmanAnthologize
I've managed to disable bitcode by putting a string value in app.json expo.ios.bitcode : "any build profile name" After changing this, production build was successful. Can you please update your answer, so that i can make it accepted answer. @ahmet-sahinRuffi
C
1

as we had no problem in local build, we change the xcode version from 13 to 14 on bitrise and it worked!

Chrysoberyl answered 17/11, 2022 at 8:55 Comment(2)
Can you tell me how to change xcode version ?? @Reza BabaeiRuffi
@HabiburRahman in bitrise? App - Workflows (workflow editor) - Stack & MachinesChrysoberyl
U
1

None of the solution worked, and in general, those are looking like some hacks.

I simply archived this bundle with Xcode, and it works.

That's yet another time, Expo shows how unstable it is...

Unvoice answered 13/6, 2023 at 17:18 Comment(1)
the whole react native ecosystem feels so brittleSerilda
L
0

Try to add { "expo": {..., "jsEngine": "hermes" } } in your app.json

Leary answered 1/11, 2023 at 6:58 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Dreary

© 2022 - 2025 — McMap. All rights reserved.