After updating to iOS 17 and Xcode 15 I noticed that menus on my app get automatically dismissed while CloudKit is syncing data right after opening the app. I know it's CloudKit because this issue doesn't happen when I launch the app in Airplane Mode.
It looks like CloudKit causes something to change (even when there are no data changes since the last usage), which causes the UI to refresh. This refresh causes the menus to be dismissed.
This is frustrating because users have to tap a button two or three times before being able to interact with the menu showed by the button. I'm attaching a screen recording that shows the issue:
https://youtube.com/shorts/Wl9gP2HLktE
- I open the app and tap the "+" icon, which shows the menu.
- The menu is quickly dismissed.
- I tap the "+" icon again, and the menu is shown for a millisecond, and is dismissed again.
- I tap the "+" button once again. This time the menu is shown and stays there because CloudKit has finished its initial sync process.
Note that this didn't happened on iOS 16 / Xcode 14, so something must have changed to cause this issue. Is there something I need to update on my code to fix this issue, or is it a bug in the OS or frameworks that will be fixed in a future update?