Unable to run apple swift-format - swiftformat

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

Related

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?

Quick framework crash XCTest library not loaded for arch x86_64

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

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.

Xcode10 error: can't exec (No such file or directory) for a user defined build setting

I get the "error: can't exec (No such file or directory)" when building a project with a user-defined build setting which is a path to a script. The project builds in Xcode 9.
ld = $(USER_LIBRARY_DIR)/Application\ Support/BlackBerry/Good.platform/iOS/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
gives
error: can't exec '/Users/username/Library/Application\ Support/BlackBerry/Good.platform/iOS/FIPS_module/arm64.sdk/bin/gd_fipsld' (No such file or directory)
How to fix it?
In Xcode10 the new build system doesn’t support the tilde(~) character which is replaced with $(HOME) in the path.
Before: ~/Library/Application Support/BlackBerry/Good.platform/iOS/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
After: $(HOME)/Library/Application Support/BlackBerry/Good.platform/iOS/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
Note: The changes needs to be made in default.xcconfig file.

use Pod instead of import Parse and Bolts framework

Currently I have a project and import Parse and Bolts framework manually.
I want to use Pod to instead of manually import. After Pod install, Build project is fine.
However, When I use simulator to run project then get below error message
fatal error: lipo: input file (/Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts) must be a fat file when the -extract option is specified
fatal error: lipo: can't open input file: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-x86_64 (No such file or directory)
mv: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-merged: No such file or directory
rm: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Bolts.framework/Bolts-x86_64: No such file or directory
fatal error: lipo: input file (/Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse) must be a fat file when the -extract option is specified
fatal error: lipo: can't open input file: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-x86_64 (No such file or directory)
mv: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-merged: No such file or directory
rm: /Users/anchi/Library/Developer/Xcode/DerivedData/xxxxxxx/Build/Products/Debug-iphonesimulator/xxxxxxx.app/Frameworks/Parse.framework/Parse-x86_64: No such file or directory
use simulator run app will display error message, after clear and re-run will success. However, stop simulator and re-run will fail. That means, every time run simulator I have to clear first. Have any expert can help ? (xcode 7.3.1)

Resources