Initializer for conditional binding must have Optional type, not 'AnyView'

7.5k Views Asked by At

we are facing the issue after updating the Xcode 14.3

/Users/ankit/Library/Developer/Xcode/DerivedData/ProjectName/ dhfelfdsyohhzxfkhlcejfrdx/SourcePackages/checkouts/Kingfisher/Sources/SwiftUI/KFImageRenderer.swift:48:63 Initializer for conditional binding must have Optional type, not 'AnyView'

4

There are 4 best solutions below

0
Jason On

I used to have the same problem.

pod 'Kingfisher', '7.6.1'

And then pod install, you can solve the problem.

0
caglar On

If you are using Swift Package Manager,

  • Open Package Dependencies and double click on the Kingfisher
  • Change the version as 7.6.2
  • Done!
0
Artur Mkrtchian On

if you are using cocoa pods, verify your configuration and run pod update

1
Guilherme On

Just click in UPGRADE PACKAGE Kingfisher at the left menu.