dyld: Library not loaded: @rpath/libswiftDispatch.dylib
I am using AVG Free for Mac. Yesterday it removed libswiftDispatch.dylib to quarantine because of 'MacOS:BitCoinMiner-AS'. This seems like a false positive, see:
https://discussions.agilebits.com/discussion/86860/avg-quarantined-1password-libswiftdispatch-dylib/p2
https://forum.avast.com/index.php?topic=216164.msg1449648#msg1449648 (AVG and Avast are the same company)
So for me the fix was restoring this file from quarantine.
Library not loaded because image not found
Problem was in framework build. In target settings you have to set special parameter LD_DYLIB_INSTALL_NAME
to correct value. In my case it was set to @loader_path
value.
Xcode won't start after OS update
Confirming that Avast Business Antivirus broke my Xcode. To fix it, I made sure OSX was updated, then I opened Avast, opened Virus Chest, and restored libswiftDispatch.dylib then restarted my machine.
The right way to link RxSwift into a Command Line Tool
One quick way could be to have all the pods frameworks as static libs.
- Select Pods project on the Project Navigator
- Select the main Pods project above all the pods target
- Go to Build Settings and change
Mach-O Type
toStatic Library
. This will change all the pods to haveMach-O Type
asStatic Library
. (Each time you runpod install
this will be changed back so you might have to do it again) - Clean
The advantage of this method is that your output will be a single executable.
If you want to use dynamic frameworks follow this tutorial:
https://medium.com/livefront/how-to-add-a-dynamic-swift-framework-to-a-command-line-tool-bab6426d6c31.
By using this second method your output will not be just a single executable, but you will have to provide all the dynamic frameworks as well.
Related Topics
Bringing iOS Frameworks Through Carthage in Xcode 12.0
Convert Optional String to Int in Swift
How to Make a Segue to Second Item of Tab Bar
Error "No Such Module" When Installed Framework with Pod in Swift 3
Core Image Filter Cisourceovercompositing Not Appearing as Expected with Alpha Overlay
How to Split a String into a [String] and Not [Substring]
Unresponsive Uibutton in Subview Added to Uistackview
How to Get Notification Authorization Status in Swift 3
Loading Multiple Google Interstitial Ads Makes App Crash
Appdelegate Segue Alternative Pass Data
Best Way to Structure My Firebase Database
Nspredicate in Query from Array Elements
How to Test Required Init(Coder:)
Create a Loading Image/ Activity Indicator, Until the Image Is Shown in the Screen in Swift
Sharing Highscore with Social Media
How to Convert Bytes to Nsstring After Aes Cryptoswift Cipher