Post

Replies

Boosts

Views

Activity

Comment on WatchOS9 - Widgetkit complications do not appear on simulator
In Apple's video he makes it look as though the code being used for the Lock Screen widgets is the same code that's being used on the Watch. I tried that, but just couldn't get it to work, and an Apple engineer told me the complications code goes in the Watch app. So, the video is misleading. I think they were simply showing us what it looks like in a Watch preview. You can share code between targets if you set their target membership correctly. I have shared code, constants, views etc.
Sep ’22
Comment on watchOS `transferFile`
If you're only sending files from the iOS app to the Watch app you'll only have the conditional check in the iOS app to stop you sending files if you're in the Simulator. The Watch app would never hit the func session(_ session: WCSession, didReceive file: WCSessionFile) method if you're using the Simulator. If you're sending files both ways, then yes you'd need a conditional in both targets.
Sep ’22
Comment on Widget is crashing with 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)
My app allows users to take a photo and attach it to an item, so the photo itself can be huge. For Widgets and the Watch app I resize those images to whatever size is needed, then send those to the Widget/Watch. I never send the full-size image. It looks like you're sending a full-size image, then simply telling the view to resize it to 46px x 46px. Resize the image and save it as a new file before sending it to the extension.
Sep ’22
Comment on BackgroudColor of UINavigationBarAppearance() does not work in iOS15.
I'm not sure Rincewind's answer is particularly helpful. If it was possible to customise the appearance of an "out of process UI" such as the image picker before, why can't we do it now? Why isn't it "guaranteed" to support our customisations? We prepare the appearance before we show the picker, so it should just work. That it doesn't suggests this is particularly flaky Apple code. I have an image picker that works perfectly well in iOS 14, but once you use iOS 15, it's a very light grey background with white text for the Cancel button. It looks horrible because you can barely see the button, and I can't seem to get any appearance customisations to apply to it, so it's going to look rubbish to my users. I don't think Rincewind's answer helps anyone?
Sep ’21