Skip to content

Swift 6.1#87

Merged
marcprux merged 4 commits into
skiptools:mainfrom
dfabulich:swift-6.1
Jun 16, 2026
Merged

Swift 6.1#87
marcprux merged 4 commits into
skiptools:mainfrom
dfabulich:swift-6.1

Conversation

@dfabulich

Copy link
Copy Markdown
Member

In skiptools/skipapp-fireside#6 I fixed it by adding @preconcurrency to my import SkipFirebaseMessaging and import SkipFirebaseFirestore calls. In this PR, I'm adding @retroactive @unchecked Sendable conformance to Messaging, Firestore, and CollectionReference, so users don't have to do it themselves.

I'm also documenting how to use @MainActor on NotificationDelegate (it can crash the app if you don't add it).

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Tested in skipapp-fireside.

dfabulich added 3 commits June 5, 2026 11:54
Otherwise, users will have to do this to get their code to compile on Swift 6.1
Without `@MainActor`, the app will crash when receiving notifications while the app is in the background.

And, in order to get Swift 6.1+ to _allow_ you to use `@MainActor`, we have to use `@preconcurrency UNUserNotificationCenterDelegate`. (In Swift 6.2+, we can use isolated conformances, but Swift Lite doesn't support 6.2 yet, so I'm using `@preconcurrency` instead.)
@marcprux marcprux merged commit 9212a08 into skiptools:main Jun 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants