Post

Replies

Boosts

Views

Activity

iOS did not update all widgets of an app when the user press a button on a widget
Hello, I have an app in AppStore "Counter Widget". https://apps.apple.com/app/id1522170621 It allows you to add a widget to your homescreen/lockscreen to count anything. Everything works fine except for one scenario. iOS 18+ I create 2 or more widgets for one counter. For example, medium and small widgets. I click on the widget button to increase or decrease the value. The button in the widget uses Button(intent: AppIntent) to update the value and calls WidgetCenter.shared.reloadAllTimelines() to update the second widget for the same counter. For iOS 18 in this particular scenario, you don't even have to call the WidgetCenter.shared.reloadAllTimelines(). iOS already knows that there is a widget with the same INIntent settings and will update it itself. Both widgets are updated and show the new value. Everything is correct. Now on the homescreen I open the widget configuration for one of the widgets to change the INIntent for the widget. For example, i change the background to wallpaper. This is just a skin for the widget, and the widget is associated with the same counter value as before. As in (2), I click the widget button to increase or decrease the value. But now only one widget is updated. iOS ignores my call to WidgetCenter.shared.reloadAllTimelines() and does not update the second widget connected to the same counter. As I found, iOS, when I call WidgetCenter.shared.reloadAllTimelines() from the widget itself, updates other widgets only if INIntent is absolutely equal for them. Overriding isEqual for them did not help. That is, I cannot specify which fields from my INIntent can be ignored during such an update and consider that widgets are equal and need to be updated. Obviously iOS make this compare outside my code. The main problem is that when the user adds a widget to the lock screen and increases and decreases the value there. After that, he opens the home screen and the widget there is not synchronized with the value from the widget on the lock screen. How to solve this problem?
3
0
177
2w
can't use #Preview for widgets code compatible with iOS < 17
Can't compile existing project with new #Preview macros. Get: 'Preview' is only available in application extensions for iOS 17.0 or newer And because macros generate struct I can't use #available to fix this. Does anyone have any ideas how to fix this? I guess the only solution is to create new macros that will work like #available(iOS 17) { code } and remove the code for older iOS?
1
3
2.2k
Jun ’23
Apple Configurator 2 stopped loading apps
Apple Configurator 2 hasn't downloaded apps since May 21, 2021. I am trying different Macbooks and different user accounts. Before that, the download was working. Can anyone confirm that this is not just my case? MacOS Catalina 10.15.7 (19H1030) Appstore Apple Configurator 2 Version 2.14 (6E26) When loading any application, it spins endlessly loading. If you press cancel, it writes about an unknown error. On old MacOS HighSierra 10.13.6 (17G14042) With Apple Configurator 2 Version 2.7.1 on download show error: An unknown error has occurred [ISErrorDomain – 0x138A (5002)] Yesterday I reported the error FB9112391. As usual, without any feedback from Apple.
3
0
1.2k
May ’21