EAS iOS build fails with Fastlane error: "error extracting version from module interface"

  • Managed Workflow
  • eas-cli version is 0.60.0

Goal: embed third-party native library as npm package to a managed Expo project.
What I have: the library provided by vendor as a .xcframework for iOS (Swift) and .aab file for Android.
What I did:

  • generated a template for custom React Native library using npx create-react-native-library command.
  • added .aab and .xcframework files to appropriate folders.
  • provided implementation in Java and Swift for both platforms.
  • built library locally.
  • prior to publish my RN package to a private GH repo I tested library in example app which was generated by create-react-native-library, to ensure that everything works right.
  • example app works as expected.
  • published RN package to a repo and installed it into my Expo project.
  • STUCK ON THIS STEP: I try to build custom dev client using eas build command. And the build fails.
❌  (/Users/expo/workingdir/build/app/node_modules/@bridgemoney/react-native-sardine/ios/ReactNativeSardine.swift:2:8)

  1 | import Foundation
> 2 | import MobileIntelligence
    |        ^ error extracting version from module interface
  3 | 
  4 | @objc(ReactNativeSardine)
  5 | class ReactNativeSardine: RCTEventEmitter {

❌  (/Users/expo/Library/Developer/Xcode/DerivedData/BridgeGo-cyholdfvmztnmecppglqrfgqcshq/Build/Intermediates.noindex/ArchiveIntermediates/BridgeGo/BuildProductsPath/Debug-iphoneos/XCFrameworkIntermediates/bridgemoney-react-native-sardine/MobileIntelligence.framework/Modules/MobileIntelligence.swiftmodule/arm64-apple-ios.swiftinterface:1:1)

> 1 | // swift-interface-format-version: 1.0
    | ^ error extracting version from module interface
  2 | // swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
  3 | // swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name MobileIntelligence
  4 | import AdSupport
▸ The following build commands failed:
▸ 	CompileSwift normal arm64 /Users/expo/workingdir/build/app/node_modules/@bridgemoney/react-native-sardine/ios/ReactNativeSardine.swift (in target 'bridgemoney-react-native-sardine' from project 'Pods')
▸ 	EmitSwiftModule normal arm64 (in target 'bridgemoney-react-native-sardine' from project 'Pods')
▸ 	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'bridgemoney-react-native-sardine' from project 'Pods')
▸ (3 failures)

Do anyone know what does this mean and how to fix this?

More context:

  • I use latest image for iOS in eas.json file with XCode 13.4 and Swift 5.6.1
  • example RN app compiles and works as expected with my custom library. On my local Mac I use XCode 13.4.1 and Swift 5.6.1 as well.