Closed Vincent-Loi closed 6 years ago
Hello,
I have the exact same issue with the exact same environment. If it can help, when the crash occurs, this appears in the logs :
dyld: lazy symbol binding failed: Symbol not found: _$S9Alamofire14SessionManagerC13configuration8delegate017serverTrustPolicyC0ACSo25NSURLSessionConfigurationC_AA0B8DelegateCAA06ServerghC0CSgtcfcfA0_
Referenced from: /PATH_TO_APP/Frameworks/AlamofireImage.framework/AlamofireImage
Expected in: /PATH_TO_APP/Frameworks/Alamofire.framework/Alamofire
dyld: Symbol not found: _$S9Alamofire14SessionManagerC13configuration8delegate017serverTrustPolicyC0ACSo25NSURLSessionConfigurationC_AA0B8DelegateCAA06ServerghC0CSgtcfcfA0_
Referenced from: /PATH_TO_APP/Frameworks/AlamofireImage.framework/AlamofireImage
Expected in: /PATH_TO_APP/Frameworks/Alamofire.framework/Alamofire
How are you both integrating Alamofire? If you're using Carthage or some other prebuilt source, you may want to rebuild all of your dependencies so they link properly.
In my case yes: I'm using Carthage for this project. I tried to clean everything up and rebuild. Once at the latest version 3.4.1 and again using 3.4.0 but got the same issue.
But just a minute ago I went checking another project where I'm using AlamofireImage (and where I don't have this issue). I tried the versions used there and the issue is gone. So, the only difference is Alamofire which is at version 4.7.3 (while AlamofireImage is at 3.4.1).
A clean project rebuild may not rebuild Carthage dependencies. For that you need to use Carthage directly.
I can reproduce this in a fresh project. Strange that it says there's an issue with the initializer, but nothing about the init changed, just an additional defaulted parameter for the multipart upload. Strange.
Building with CocoaPods doesn't show this issue.
@Vincent-Loi @nicolas255 I have a branch up that fixes this: update-for-alamofire-4.8
. You can use the following in your Cartfile
to use it until we have time to do an official release.
github "Alamofire/AlamofireImage" "update-for-alamofire-4.8"
3.5 has been released which should fix this issue.
What did you do?
Load a remote url with
imageView.af_setImage(withURL: imageUrl as URL, imageTransition: .crossDissolve(0.1))
What did you expect to happen?
Load the image successfully.
(Works in previous versions)
What happened instead?
Crashed at the following lines:
Alamofire Environment
Alamofire version: 4.8.0 AlamofireImage version: 3.4.1 Xcode version: 10.1 (10B61) Swift version: 4.2 Platform(s) running AlamofireImage: iOS macOS version running Xcode: 10.14