iOS Platform Support¶
iOS-specific implementation details for Toss.
Background Limitations¶
iOS has strict limitations on background clipboard access. The app cannot monitor clipboard changes when in the background. However, there are several workarounds:
- App Extensions - Share extensions can access clipboard
- Shortcuts Integration - Siri Shortcuts can trigger sync
- Widgets - Home screen widgets can trigger sync
- Foreground Optimization - Optimize sync when app is active
Implementation Status¶
Basic Structure: Created ios_background_service.dart with:
- Shortcut action registration
- Widget update methods
- Foreground sync optimization
- App extension setup structure
Files:
- flutter_app/lib/src/core/services/ios_background_service.dart
- flutter_app/ios/Runner/Info.plist (updated with background modes)
Required Native Code¶
1. App Extension¶
Create Share Extension target in Xcode: - Share extension target - Clipboard access from extension - Communication with main app
2. Shortcuts Integration¶
In ios/Runner/AppDelegate.swift:
- Handle UIApplicationShortcutItem
- Register shortcut actions
- Trigger sync on shortcut invocation
3. Widget¶
Create widget extension: - Home screen widget target - Quick sync button - Status display
Next Steps¶
- Create Share Extension target in Xcode
- Implement shortcut handlers in AppDelegate
- Create widget extension
- Test on iOS device
See Also¶
- iOS and Android Implementation Guide - Detailed implementation guide
- Platform Overview - Return to platform overview