bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
507 stars 262 forks source link

Bitcode issue with apple_xcframework #1455

Open piellarda opened 2 years ago

piellarda commented 2 years ago

Hello, I have been trying to use an XCFramework built from the apple_xcframework in a regular iOS Xcode project but unless I disable bitcode for the whole application the IPA generation fails. I have created a sample project here that reproduces the issue i'm facing.

Running the IPA generation through fastlane I get the following logs:

+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/gym_config20220427-66913-pesk7z.plist -archivePath '/Users/antoine/Library/Developer/Xcode/Archives/2022-04-27/MyTestApp 2022-04-27 10.51.40.xcarchive' -exportPath /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/gym_output20220427-66913-yqicyu
objc[68277]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x2097f1eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105dc84f8). One of the two will be used. Which one is undefined.
objc[68277]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x2097f1f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105dc8548). One of the two will be used. Which one is undefined.
objc[68277]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x2097f1f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105dc8598). One of the two will be used. Which one is undefined.
objc[68277]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x2097f1fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105dc85e8). One of the two will be used. Which one is undefined.
objc[68277]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x2097f1ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105dc8638). One of the two will be used. Which one is undefined.
objc[68277]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x2097f2040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105dc8688). One of the two will be used. Which one is undefined.
2022-04-27 10:51:43.763 xcodebuild[68277:7461392] 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-04-27 10:51:43.763 xcodebuild[68277:7461392] 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-04-27 10:51:43.874 xcodebuild[68277:7461392] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/MyTestApp_2022-04-27_10-51-43.874.xcdistributionlogs".
error: exportArchive: ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk -o /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-out/arm64/Payload/MyTestApp.app/MyTestApp --generate-dsym /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-out/arm64/Payload/MyTestApp.app/MyTestApp.dSYM --strip-swift-symbols /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp
Status: pid 68298 exit 1
Stdout:
    SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk
    SDK version: 15.4
    PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
    MachoInfo: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo', '-info', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp']
    -= Output =-
    Non-fat file: /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp is architecture: arm64
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump
    GetUUID: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump', '-u', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp']
    -= Output =-
    UUID: B49DB23F-243A-34F7-B0EF-21E914F7D2F9 (arm64) /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit
    ExtractXAR: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp', '-extract', '__LLVM', '__bundle', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/MyTestApp77v58gxv/MyTestApp.arm64.xar']
    -= Output =-
    Exited with 0

    Command took 0 seconds
    Bitcode bundle version: 1.0
    Setting platform to: iOS
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
    Swift: cd /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/tempezdavi9m
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc', '-frontend', '-emit-object', '-target', 'arm64-apple-ios15.2', '-Xllvm', '-aarch64-use-tbi', '-O', '-disable-llvm-optzns', '-module-name', 'MyTestApp', '1.bc', '-o', '1.o']
    -= Output =-
    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
    Exited with 0

    Command took 0 seconds
    Swift: cd /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/tempezdavi9m
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc', '-frontend', '-emit-object', '-target', 'arm64-apple-ios15.2', '-Xllvm', '-aarch64-use-tbi', '-O', '-disable-llvm-optzns', '-module-name', 'MyTestApp', '2.bc', '-o', '2.o']
    -= Output =-
    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    Search Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks
    MyLib not found in dylib search path

Stderr:

>
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:372:in `run'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2889:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3115:in `block in ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4038:in `<main>'

Error Domain=IDEFoundationErrorDomain Code=1 "ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk -o /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-out/arm64/Payload/MyTestApp.app/MyTestApp --generate-dsym /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-out/arm64/Payload/MyTestApp.app/MyTestApp.dSYM --strip-swift-symbols /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp
Status: pid 68298 exit 1
Stdout:
    SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk
    SDK version: 15.4
    PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
    MachoInfo: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo', '-info', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp']
    -= Output =-
    Non-fat file: /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp is architecture: arm64
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump
    GetUUID: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump', '-u', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp']
    -= Output =-
    UUID: B49DB23F-243A-34F7-B0EF-21E914F7D2F9 (arm64) /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit
    ExtractXAR: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp', '-extract', '__LLVM', '__bundle', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/MyTestApp77v58gxv/MyTestApp.arm64.xar']
    -= Output =-
    Exited with 0

    Command took 0 seconds
    Bitcode bundle version: 1.0
    Setting platform to: iOS
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
    Swift: cd /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/tempezdavi9m
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc', '-frontend', '-emit-object', '-target', 'arm64-apple-ios15.2', '-Xllvm', '-aarch64-use-tbi', '-O', '-disable-llvm-optzns', '-module-name', 'MyTestApp', '1.bc', '-o', '1.o']
    -= Output =-
    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
    Exited with 0

    Command took 0 seconds
    Swift: cd /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/tempezdavi9m
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc', '-frontend', '-emit-object', '-target', 'arm64-apple-ios15.2', '-Xllvm', '-aarch64-use-tbi', '-O', '-disable-llvm-optzns', '-module-name', 'MyTestApp', '2.bc', '-o', '2.o']
    -= Output =-
    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    Search Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks
    MyLib not found in dylib search path

Stderr:

>
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:372:in `run'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2889:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3115:in `block in ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4038:in `<main>'" UserInfo={NSLocalizedDescription=ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk -o /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-out/arm64/Payload/MyTestApp.app/MyTestApp --generate-dsym /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-out/arm64/Payload/MyTestApp.app/MyTestApp.dSYM --strip-swift-symbols /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp
Status: pid 68298 exit 1
Stdout:
    SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk
    SDK version: 15.4
    PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
    MachoInfo: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo', '-info', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp']
    -= Output =-
    Non-fat file: /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp is architecture: arm64
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump
    GetUUID: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump', '-u', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp']
    -= Output =-
    UUID: B49DB23F-243A-34F7-B0EF-21E914F7D2F9 (arm64) /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit
    ExtractXAR: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/ipatool20220427-68280-1h94t2h/thinned-in/arm64/Payload/MyTestApp.app/MyTestApp', '-extract', '__LLVM', '__bundle', '/var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/MyTestApp77v58gxv/MyTestApp.arm64.xar']
    -= Output =-
    Exited with 0

    Command took 0 seconds
    Bitcode bundle version: 1.0
    Setting platform to: iOS
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
    Swift: cd /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/tempezdavi9m
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc', '-frontend', '-emit-object', '-target', 'arm64-apple-ios15.2', '-Xllvm', '-aarch64-use-tbi', '-O', '-disable-llvm-optzns', '-module-name', 'MyTestApp', '1.bc', '-o', '1.o']
    -= Output =-
    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
    Exited with 0

    Command took 0 seconds
    Swift: cd /var/folders/lg/xfqc35j107g7l06bmvljptw40000gn/T/tempezdavi9m
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc', '-frontend', '-emit-object', '-target', 'arm64-apple-ios15.2', '-Xllvm', '-aarch64-use-tbi', '-O', '-disable-llvm-optzns', '-module-name', 'MyTestApp', '2.bc', '-o', '2.o']
    -= Output =-
    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
    Exited with 0

    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    Search Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks
    MyLib not found in dylib search path

Stderr:

>
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:372:in `run'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2889:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3115:in `block in ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4038:in `<main>'}

** EXPORT FAILED **
keith commented 2 years ago

It seems like something is up with your Xcode build:

    <unknown>:0: warning: using sysroot for 'MacOSX' but targeting 'iPhone'

once you resolve this warning I imagine you'll get more useful diagnostics.