I am receiving this error when trying to build my project on a real device, when I build it on a simulator it works without any issue.
No such file or directory: '/Xcode/DerivedData/ProjectName/Build/Products/Debug-iphoneos/PackageFrameworks/AlamofireDynamic.framework/AlamofireDynamic'
I checked derived data on the simulator folder and it seems that it’s different from the real device. Also what is this Alamofire Dynamic? I searched and cannot seem to find and answer if I remove Alamofire from my project it will build but it will crash giving me the same error as the one above but for Alamofire not Alamofire Dynamic, I tried clean build folder, reinstalling Alamofire, restart Xcode, pretty much everything that I could find online but nothing seems to work. Any help would be appreciated thanks! Forgot to mention that I am using SPM.
2
Answers
Remove the Alamofire package, clean the project using
cmd + shift + k
, and then add the package again using "Exact Version". I had success adding specifically version5.8.1
.Try this
When installing, you need to choose one of two, Alamofire or Alamofire Dynamic
Delete both libraries in the project settings
Install via SPM by selecting the target of your project only for Alamofire
FYI: In version 5.9.0 was added Alamofire Dynamic.
Alamofire Dynamic was added for dynamic linking, most projects don’t need it.
from the developers of Alamofire: