Search code examples
iosswiftxcodeauth0

LazyImage Loading in Auth0 SDK for iOS


I'm a brand new developer to swift, and am trying to understand how to load an image into the Auth0 SDK.

The documentation describes this:

        return Lock
            .classic()
            .withStyle {
                $0.logo = LazyImage(name: "myimagename")

However, I'm not sure where to put the image referenced in myimagename?

going into the LazyImage struct, it describes:

 Creates a LazyImage with a name and an optional Bundle.
 For images outside Lock's bundle you should specify the Bundle like

 ```
 let image = LazyImage(name: "image_name")
 ```

So do I somehow add this image to Assets, or in a .plist file or just put a JPG in a folder somewhere?

Thanks


Solution

  • If you add the image to the assets folder Images.xcassets it should be able to find it! Let me know if it works.