I've managed to get a simple text-only complication working and now want to add an Image Provider to it.
From a couple of the posts I've read, it looks like the preferred (and maybe required) way to do this is to add the image assets to images.xcassets and then load them with a name derived from the template size (e.g., Complication/Modular).
That seems to imply a single image will be used whenever the complication is displayed, as xcassets only gives one space for each sized image. In my case, the image will change frequently, each time we generate a new timeline entry we will check to see which image should be displayed. So this implies I'd just be loading them from the file system ( so something like UIImage(named:"myimage.png"), in theory, but that's returning nil at the moment so I may have the image in the wrong place or be missing something else).
Is that a valid approach? (I'm planning to have someone else provide the images so I've got nothing to test with at the moment, although I suppose I should find or create something to play in the short term).
If I'm just creating a UIImage from a .png in the file system, I am guessing things like '@2x' naming convention are irrelevant. I'm not sure if something would fail if I didn't return the exact expected image size -- but I'd like to make everything 'pixel perfect', so if I'm doing my own image loading, is there a way to check the device size so I know whether to return the image sized for a 38mm vs 42mm device?