Quick framework crash XCTest library not loaded for arch x86_64 - ios

What did you do?
Installed Quick framework using pod
pod 'Quick'
What did you expect to happen?
Run the Demo app without crashes
What actually happened instead?
App crashes on startup:
dyld[11272]: Library not loaded: #rpath/XCTest.framework/XCTest
Referenced from: /Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/QuickDemo
Reason: tried: '/Users/aimoresc/Library/Developer/Xcode/DerivedData/QuickDemo-hjyhkpgeditvlnbkokgocjlflslb/Build/Products/Debug-iphonesimulator/XCTest.framework/XCTest' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/XCTest.framework/XCTest' (fat file, but missing compatible architecture (have 'armv7,armv7s,arm64,arm64e', need 'x86_64')), '/usr/lib/swift/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/XCTest.framework/XCTest' (fat file, but missing compatible architecture (have 'armv7,armv7s,arm64,arm64e', need 'x86_64')), '/usr/lib/swift/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/XCTest.framework/XCTest' (no such file)
Library not loaded: #rpath/XCTest.framework/XCTest
Referenced from: /Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/QuickDemo
Reason: tried: '/Users/aimoresc/Library/Developer/Xcode/DerivedData/QuickDemo-hjyhkpgeditvlnbkokgocjlflslb/Build/Products/Debug-iphonesimulator/XCTest.framework/XCTest' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/XCTest.framework/XCTest' (fat file, but missing compatible architecture (have 'armv7,armv7s,arm64,arm64e', need 'x86_64')), '/usr/lib/swift/XCTest.framework/XCTest' (no such file), '/Users/aimoresc/Library/Developer/CoreSimulator/Devices/8930165E-1256-413E-AE71-B81B78C23799/data/Containers/Bundle/Application/2D3BCC75-C97C-4F02-96C2-426D3E894DD6/QuickDemo.app/Frameworks/XCTest.framework/XCTest
Environment
List the software versions you're using:
Quick: 5.0
Xcode Version: Version 13.2.1 (13C100)
Swift Version: 5
CocoaPods: 1.11.2

The XCTest framework is only available/loadable from test bundles, and it looks like I was trying to link/use Quick from your app target? changing the .podfile so that you only link Quick with your test target(s).
For example:
target 'QuickDemo' do
# List of pods for the app target
end
target 'QuickDemoTests' do
pod 'Quick'
end

Related

Unable to run apple swift-format

Unable to run apple swift-format, as it fails with the following error
brew install swift-format
swift-format
dyld[20113]: Library not loaded: #rpath/lib_InternalSwiftSyntaxParser.dylib
Referenced from: /usr/local/Cellar/swift-format/0.50600.1/bin/swift-format
Reason: tried: '/usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/local/Cellar/swift-format/0.50600.1/bin/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/local/Cellar/swift-format/0.50600.1/bin/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/local/lib/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/lib/lib_InternalSwiftSyntaxParser.dylib' (no such file)
Abort trap: 6

dyld[608]: Library not loaded: libssl.1.1.dylib reason: tried:'/usr/lib/system/introspection/libssl.1.1.dylib' (no such file)

I am using XCode to build an ios app which depends on the openssl. I have built the openssl static lib(libssl.a, libcrypto.a, etc.) by the official makefile configuration.
When I use the ios64-sim-cross in the configuration and run app on the simulator, everything is fine.
However, when I use the ios64-cross and run app on my iPhone(ios 15), I get this error:
Referenced from: /private/var/containers/Bundle/Application/683BABCE-8B92-412B-A3F4-E4F19E9ED990/MyApp.app/MyApp
Reason: tried: '/usr/lib/system/introspection/libssl.1.1.dylib' (no such file), '/some-dir-on-my-macbook/openssl-1.1.1o-build/arm64/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)
Library not loaded: /some-dir-on-my-macbook/openssl-1.1.1o-build/arm64/lib/libssl.1.1.dylib
Referenced from: /private/var/containers/Bundle/Application/683BABCE-8B92-412B-A3F4-E4F19E9ED990/MyApp.app/MyApp
Reason: tried: '/usr/lib/system/introspection/libssl.1.1.dylib' (no such file), '/some-dir-on-my-macbook/openssl-1.1.1o-build/arm64/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)
I am also confused that the path /some-dir-on-my-macbook/openssl-1.1.1o-build/arm64/lib/libssl.1.1.dylib does exist but the error message shows that it does not.
I have also tried this: find out the libssl.1.1.dylib file in the openssl-build-output directory (/some-dir-on-my-macbook/openssl-1.1.1o-build/arm64/lib/), and dragged it into my XCode project. It still show same error message when I build&run the app on my iPhone.
Why it does not locate the libssl.1.1.dylib from which I embed into the app binary?

fatal error: 'WikitudeSDK/WikitudeSDK.h' file not found

I have created an app with wikitude v9.10 and Flutter, once I build the iOS app I get below error.
In file included from /Users/app/plugin_9.10/ios/Classes/ArchitectWidget.m:9:
/Users/app/plugin_9.10/ios/Classes/ArchitectWidget.h:12:9: fatal error: 'WikitudeSDK/WikitudeSDK.h' file not found
#import <WikitudeSDK/WikitudeSDK.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
warning: /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3CM2ENP77I0GB/Accelerate-KJIHTHQ2QTZV.pcm: No such file or directory
note: while processing /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3CM2ENP77I0GB/Accelerate-KJIHTHQ2QTZV.pcm
note: The clang module cache may have expired since this object file was built. Rebuilding the object file will rebuild the module cache.
warning: /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3CM2ENP77I0GB/CoreMotion-RZ4DJFEI29KM.pcm: No such file or directory
note: while processing /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3CM2ENP77I0GB/CoreMotion-RZ4DJFEI29KM.pcm
warning: /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3GSO36ODTI67V/Accelerate-KJIHTHQ2QTZV.pcm: No such file or directory
note: while processing /Users//Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3GSO36ODTI67V/Accelerate-KJIHTHQ2QTZV.pcm
note: The clang module cache may have expired since this object file was built. Rebuilding the object file will rebuild the module cache.
warning: /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3GSO36ODTI67V/CoreMotion-RZ4DJFEI29KM.pcm: No such file or directory
note: while processing /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3GSO36ODTI67V/CoreMotion-RZ4DJFEI29KM.pcm
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
To assist further on the error that I get, the application is made with dart 2.2 and Wikitude 9.10 plugin.
On Android the app is already published.
I am embedding the WikitudeSDK.Framework from plugin/ios/Frameworks/WikitudeSDK.xcframework/ios-arm64.

Library not loaded: #rpath/FBAEMKit.framework/FBAEMKit

I just start using Carthage and added FBSDKCoreKit and FBSDKLoginKit to my project. I added them under my target's General>Frameworks, Libraries, and Embedded Content.
When running the app I'm getting: Library not loaded: #rpath/FBAEMKit.framework/FBAEMKit.
Is there any additional setup required to make this work? Maybe I'm missing something?
Thanks for any suggestions!
dyld[83163]: Library not loaded: #rpath/FBAEMKit.framework/FBAEMKit
Referenced from: /Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit
Reason: tried: '/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-bofellgqfanzxiczrleafuilfnvl/Build/Products/Debug-iphonesimulator/FBAEMKit.framework/FBAEMKit' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (no such file), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file)Library not loaded: #rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics
Referenced from: /Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit
Reason: tried: '/Users/Admin/Library/Developer/Xcode/DerivedData/DuotoneAcademy-bofellgqfanzxiczrleafuilfnvl/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/usr/lib/swift/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKLoginKit.framework/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKLoginKit.framework/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' (no such file)
Library not loaded: #rpath/FBAEMKit.framework/FBAEMKit
Referenced from: /Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit
Reason: tried: '/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-bofellgqfanzxiczrleafuilfnvl/Build/Products/Debug-iphonesimulator/FBAEMKit.framework/FBAEMKit' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (no such file), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Library/Developer/CoreSimulator/Devices/5844632B-ED51-4F86-9587-18047A570EB1/data/Containers/Bundle/Application/18218705-7148-4778-9A82-79D36BB48A13/Academy.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/Admin/Li
I'm using CocoaPods and have a similar issue.
In my case, I solved it by replacing it with FBSDKCoreKit_Basics.framework downloaded from GitHub.
I'm curious that the FBSDKCoreKit_Basics file downloaded from GitHub is larger than the file I got with pod install.

Tweak make package failed: libfakeroot.dylib: mach-o, but wrong architecture

I was trying to make my first tweak for ios using Theos.
And I just used a default tweak template(nic.pl), didnt change anything, I got this error when I tried to run make package:
dyld: could not load inserted library '/usr/local/Cellar/fakeroot/1.22/lib/libfakeroot.dylib' because no suitable image found. Did find:
/usr/local/Cellar/fakeroot/1.22/lib/libfakeroot.dylib: mach-o, but wrong architecture
/usr/local/Cellar/fakeroot/1.22/lib/libfakeroot-0.dylib: mach-o, but wrong architecture
/usr/local/bin/fakeroot: line 181: 3701 Abort trap: 6 FAKEROOTKEY=$FAKEROOTKEY DYLD_INSERT_LIBRARIES="$LIB" "$#"
make: *** [internal-package] Error 134
More Information:
Env: Darwin MacBook pro 16.7.0 Darwin Kernel Version 16.7.0
IOS sdk: I am using the newest version of SDK(iosdk11) & Xcode(9.0), I also tried different SDK, but no luck, I assume the problem here is fake root did not generate compatible binary.
Fakeroot: I just did brew install fakeroot to install.
libfakeroot info: /usr/local/Cellar/fakeroot/1.22/lib/libfakeroot.dylib: Mach-O 64-bit dynamically linked shared library x86_64.

Resources