Automates the "Sync Now" action for Messages in iCloud on macOS and iOS. Developed for professional environments to ensure consistent iMessage synchronization without manual intervention.
A unified Apple Shortcut detects the host device to route execution:
- iOS: Utilizes a direct URL scheme to open the specific iCloud settings pane instantly.
- macOS: Prioritizes a Swift-native execution for speed and precision, with an AppleScript fallback for menu-bar navigation if required.
- Dynamic UI Discovery: Recursively searches the UI hierarchy to locate buttons by internal identifiers or labels.
- Swift Optimization: Utilizes the Accessibility API and CoreGraphics to achieve higher reliability and faster response times than legacy AppleScript.
- Input Management: Locks the cursor during click events to prevent user interference and ensure successful execution.
- Shortcuts Ready: Designed for seamless deployment within macOS and iOS automation workflows.