Summary
Enabling iCloud sync can crash Flycut in builds that do not have valid iCloud entitlements (for example local unsigned builds used for debugging).
Affected area
- iCloud sync startup path (
MJCloudKitUserDefaultsSync)
Steps to reproduce
- Launch Flycut in a build without iCloud entitlements.
- Enable iCloud Clippings Sync in Preferences.
- Save/close preferences.
Alternative repro via defaults:
defaults write com.generalarcade.flycut syncClippingsViaICloud -bool true
defaults write com.generalarcade.flycut savePreference -int 2
Then launch Flycut.
Actual behavior
Flycut terminates due to CloudKit startup path reaching invalid container/entitlement state.
Observed crash signatures include:
CKException: containerIdentifier can not be nil
- CloudKit
_os_crash (EXC_BREAKPOINT/SIGTRAP) in enable path
Expected behavior
If iCloud container configuration/entitlements are unavailable, Flycut should not crash. It should safely skip CloudKit enablement.
Proposed fix
Add defensive guards in MJCloudKitUserDefaultsSync:
- Verify effective container identifier before enabling.
- Verify process has iCloud container entitlement before CloudKit calls.
- Wrap container creation in exception-safe checks and bail out cleanly.
Notes
This does not change normal signed/entitled behavior. It only prevents hard crashes when the environment cannot support CloudKit.
Summary
Enabling iCloud sync can crash Flycut in builds that do not have valid iCloud entitlements (for example local unsigned builds used for debugging).
Affected area
MJCloudKitUserDefaultsSync)Steps to reproduce
Alternative repro via defaults:
defaults write com.generalarcade.flycut syncClippingsViaICloud -bool true defaults write com.generalarcade.flycut savePreference -int 2Then launch Flycut.
Actual behavior
Flycut terminates due to CloudKit startup path reaching invalid container/entitlement state.
Observed crash signatures include:
CKException: containerIdentifier can not be nil_os_crash(EXC_BREAKPOINT/SIGTRAP) in enable pathExpected behavior
If iCloud container configuration/entitlements are unavailable, Flycut should not crash. It should safely skip CloudKit enablement.
Proposed fix
Add defensive guards in
MJCloudKitUserDefaultsSync:Notes
This does not change normal signed/entitled behavior. It only prevents hard crashes when the environment cannot support CloudKit.