Installing KingfisherSwiftUI via CocoaPods not working
After running pod install, Xcode shows error " No such module 'KingfisherSwiftUI' ".
pod 'Kingfisher/SwiftUI' to your podfile.CocoaPods only provides a single module so you can try import struct Kingfisher.KFImage to use the KFImage type for SwiftUI.
CocoaPods only provides a single module so you can try
import struct Kingfisher.KFImageto use theKFImagetype for SwiftUI.
Yes this works. Thanks. Maybe you may add this in the documentation.
Yes, you are right!
Thanks @onevcat, it works!
why don't you add it to documentation?
Finally got some time for the documentation. https://github.com/onevcat/Kingfisher/wiki/SwiftUI-Support#basic
Thanks!
I did this in my code:
import struct Kingfisher.KFImage
KFImage(URL(string: img)).resizable()
it crashed:
dyld: Symbol not found: _$s10Kingfisher7KFImageV7SwiftUI4ViewAAMc
Referenced from: /private/var/containers/Bundle/Application/11AA53B4-C799-4D5D-B5F3-651DFAB0A0B8/GeekMadeBySwiftUI.app/GeekMadeBySwiftUI
Expected in: /private/var/containers/Bundle/Application/11AA53B4-C799-4D5D-B5F3-651DFAB0A0B8/GeekMadeBySwiftUI.app/Frameworks/Kingfisher.framework/Kingfisher
in /private/var/containers/Bundle/Application/11AA53B4-C799-4D5D-B5F3-651DFAB0A0B8/GeekMadeBySwiftUI.app/GeekMadeBySwiftUI
@Insfgg99x How did you install the Kingfisher and related components?
Not sure why, but this error seems to be happening when you are not copying the framework to your final app bundle. So I suggest checking the way and config you are using to add the Kingisher (and its SwiftUI support) to your project.
For those interested, cleaning and rebuilding my project fixed the dyld: Symbol not found error.
Most helpful comment
CocoaPods only provides a single module so you can try
import struct Kingfisher.KFImageto use theKFImagetype for SwiftUI.