Urkman
Urkman

Reputation: 1318

Using asset images in Apple Watch Complications

I'm currently build a new Apple Watch App, that should support Complications. But I can't use an asset image in a Complication.

When I use a system image Image(systemName: "lock") everything is fine. But when I use an asset Image("image_name") it is not displayed.

I tried to copy the image to the WidgetExtension Assets, but this didn't help.

I'm using SwiftUI and WatchOS 9 for this...

Any ideas on this?

Upvotes: 4

Views: 706

Answers (2)

tosh
tosh

Reputation: 5392

Apparently images that are larger than 120px in size are not loaded. Try a smaller image.

Upvotes: 1

Ori
Ori

Reputation: 443

Try using a UIImage instead.

Image(uiImage: UIImage(named: "lock") ?? "fallback")

Hope it works :)

Upvotes: 1

Related Questions