Skip to content

iOS: add App Group container access and NSE bridge module for upcoming NotificationService extension#86

Draft
jkaczman wants to merge 1 commit into
dev-ios-nsefrom
feat/ios/app-group
Draft

iOS: add App Group container access and NSE bridge module for upcoming NotificationService extension#86
jkaczman wants to merge 1 commit into
dev-ios-nsefrom
feat/ios/app-group

Conversation

@jkaczman

Copy link
Copy Markdown
Collaborator

This PR lays groundwork for the iOS NotificationService extension for properly handling thumbnail notification upgrades (re #78)

We now store new data in iOS in an App Group container, so that it can be accessed by native Swift code running in a NotificationServiceExtension. This will allow it to share MLS state and decrypt notifications in native code through a C ABI interface. The extension is not allowed to access Application Support or anything like that for process isolation reasons. An iOS app extension runs as a separate process (with its own sandbox), and that sandbox can't touch the main app's Documents / Application Support dirs. An App Group container is the only way in iOS for the app and the app extension to share state, so that's why I did it like this.

Old cameras will still work on the old directory in Application Support, but new pairings will be directed to the App Group container. However, old cameras will not upgrade notifications with thumbnails due to the restrictions mentioned above.

This is not a complete fix. It is only part of the solution; it was done this way to allow for less than 1000 LOC PRs for proper squash-and-merge conventions. Therefore, it will be merged into this "dev-ios-nse" branch, which will have another follow up PR finishing the implementation. There will also be another PR in the secluso/core repository implementing this slim C ABI interface for the NSE to work with (as the NSE has a 24MB memory budget; app_native is likely overkill and will surpass this). Breaking it up into multiple PRs like this also allows for easier review, as a massive PR is harder to parse.

Includes a small Dart-side bridge module that writes server creds into the App Group whenever they change (so NSE can call the relay on its own). Also some utility functions for the next PR (e.g. event-drain for the consumer)

Added a couple of tests against the path resolver (determine if camera directs to App Group / legacy) and bridge module. We haven't been doing this as much for mobile_client, but probably should do so for future PRs (and work on getting tests in place for all the current functionality).

@jkaczman jkaczman requested a review from arrdalan May 31, 2026 19:49
@jkaczman jkaczman moved this to Todo in v1.2 Release Jun 19, 2026
@jkaczman jkaczman moved this from Todo to Awaiting Merge in v1.2 Release Jun 19, 2026
@jkaczman jkaczman removed this from v1.2 Release Jun 26, 2026
@jkaczman jkaczman moved this from Todo to In progress in v1.2 Release Jun 26, 2026
@jkaczman jkaczman removed this from v1.2 Release Jun 28, 2026
@jkaczman jkaczman moved this from Todo to In progress in v1.1 Release Jun 28, 2026
@jkaczman jkaczman removed this from v1.1 Release Jul 2, 2026
@jkaczman jkaczman marked this pull request as draft July 2, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant