There seems to be a naming conflict inside the objc header file with the SessionDelegate class when using both Kingfisher and Alamofire in Xcode 12 GM. (You can see the issue on Alamofire side here, more discussion here)
/Users/sachajln/ios-workspace/MyProject/Carthage/Build/iOS/Kingfisher.framework/Headers/Kingfisher-Swift.h:836:1: error: 'SessionDelegate' has different definitions in different modules; first difference is definition in module 'Kingfisher.Swift' found method with designater initializer
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
^
/Users/sachajln/ios-workspace/MyProject/Carthage/Build/iOS/Alamofire.framework/Headers/Alamofire-Swift.h:772:1: note: but in 'Alamofire.Swift' found method with no designater initializer
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
^
Use Alamofire and Kingfisher frameworks inside a project and do a xcodebuild -project YOUR_PROJECT.xcodeproj -sdk iphoneos with Xcode 12 GM command line tools.
I'm using Carthage to build and copy the frameworks in my project
I am having exactly the same problem with latest Xcode official release
The same issue.
For now, a quick solution is to install the module with CocoaPods (if you're using Carthage) and if needed, rename the SessionDelegate interface.
Issue still exists in Xcode 12 official release.
The only solution for now is to rename the "SessionDelegate" to "KFSessionDelegate" or something like that in Kingfisher module.
I'll check what I can do for it.
@sachajln @timbms @Senocico @alperkayabasi
Can you confirm whether this branch "fix/no-objc" can solve your issue? If everything goes fine, I will merge it and tag a new version soon.
Thanks!
@onevcat Worked for me! Thanks.
@onevcat Worked for me too, thank you.
5.15.3 was released for this.
hello @onevcat, i tried from cocoapod for version 5.15.3 has same problem with alamofire
@KhairulRijl Which Alamofire version do you have in podfile? It worked for me with the latest release 5.2.2.
@alperkayabasi now i'm using 4.9.0 version of alamofire for some reason, is there any problem with version 4 alamofire with kingfisher?
@KhairulRijl My guess is Alamofire removed objc module support with version 5. So the problem still exists if you use v4.
5.15.3 was released for this.
@onevcat is 5.15.3 already available via cocoapods?
@alperkayabasi yes, the problem from v4 alamofire. after config build setting in cocoapods spesific for alamofire, change to No for objc module support, the problem is gone. thanks for your information.
Most helpful comment
5.15.3 was released for this.