fix: survive corrupt preferences at startup; drop CocoaPods leftovers
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
A black window on launch, no error anywhere: main() awaited loadPersistedEndpoint before the first frame, and SharedPreferences.getBool threw 'int is not a subtype of bool?' — the store is writable from outside the app and hub.secure had been written as int 0. Pref reads now go through defensive typed helpers (int coerces to bool, wrong types fall back to defaults), and every pre-frame restore step is failure-isolated: a broken store can cost a preference, never the first frame. Regression tests stage the corrupt store (the exact observed value and worse). Also removes the CocoaPods leftovers from the macOS project (Podfile, [CP] script phases, Pods framework references, xcconfig includes): the project builds via Swift Package Manager, and the dual wiring ran both dependency managers on every build — Flutter's persistent 'removing CocoaPods will improve build time' warning. Verified: clean profile build produces a launchable bundle (plugins statically linked via SwiftPM), suite green, analyze clean. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
61ca365d5e
commit
06f023aada
9 changed files with 130 additions and 148 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
|
@ -5,6 +5,23 @@ version + `kStudioVersion` in `lib/main.dart` stay in lockstep.
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Fixed (startup + build time)
|
||||
|
||||
- **Black window on launch.** A corrupt preference value (`hub.secure`
|
||||
stored as int `0` by an external `defaults write`) made
|
||||
`SharedPreferences.getBool` throw inside `main()` before the first
|
||||
frame — the app sat as a black window with no visible error. Pref
|
||||
reads now tolerate wrong types (int coerces to bool, garbage falls
|
||||
back to the default), and every pre-frame restore step is
|
||||
failure-isolated so nothing can prevent `runApp` again. Regression
|
||||
tests reproduce the corrupt store.
|
||||
- **CocoaPods integration removed** (macOS). The project builds via
|
||||
Swift Package Manager; the leftover Pods wiring (Podfile, `[CP]`
|
||||
script phases, Pods framework refs, xcconfig includes) made every
|
||||
build run both dependency managers — exactly what Flutter's
|
||||
own "will improve the project's build time" warning was about.
|
||||
|
||||
|
||||
### Added
|
||||
|
||||
- **Settings → Security shows the hub's auth policy.** New panel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue