Reputation: 1318
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
Reputation: 5392
Apparently images that are larger than 120px in size are not loaded. Try a smaller image.
Upvotes: 1
Reputation: 443
Try using a UIImage instead.
Image(uiImage: UIImage(named: "lock") ?? "fallback")
Hope it works :)
Upvotes: 1