Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove access to application launch options via @Application on macOS (…
…#100) # Remove access to application launch options via @Application on macOS ## ♻️ Current situation & Problem The current version of Spezi crashes when using the `ApplicationDelegateAdaptor` with the `.spezi()` view modifier on macOS platforms. This results from a broken assumption about the initialization order upon Spezi bootup on macOS (not Catalyst!): The `.spezi()` view modifier is evaluated (and therefore `Spezi` initialized) before `SpeziAppDelegate/applicationWillFinishLaunching()` is called. This currently leads to a `precondition` failure on macOS within `SpeziAppDelegate/applicationWillFinishLaunching()` as `Spezi` is already initialized. Background: We initialize `Spezi` on macOS within the `SpeziAppDelegate/applicationWillFinishLaunching()` so that the application launch options are accessible via `@Application` (`@Application(\.launchOptions)`). We noticed that error when lifting the SpeziSpeech module to visionOS & macOS: StanfordSpezi/SpeziSpeech#5 ## ⚙️ Release Notes - Remove access to application launch options via @Application on macOS, fixing a crash upon Spezi initialization ## 📚 Documentation Adjusted documentation in line about not supporting launch options on macOS anymore ## ✅ Testing Manual testing ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
- Loading branch information