braze-swift-sdk
braze-swift-sdk copied to clipboard
[Feature]: Swift Concurrency / Sendable support for Braze
What problem are you facing?
Braze should conform to Sendable protocol and expose async functions for Swift consumers instead of Obj-C versions with completion handlers.
Braze.Notifications.categories - should be revamped since it's produces a warning if I add the following settings to the swift package:
swiftSettings: [.unsafeFlags(["-Xfrontend",
"-warn-concurrency",
"-Xfrontend",
"-enable-actor-data-race-checks"
])
]
Please note that on Swift 6 there would be errors. Please prepare Braze API for Swift 6.
Workarounds
partially resolved by
@preconcurrency import BrazeKit
Ideal Solution
No response
Other Information
No response
Hey @3a4oT, thanks for raising this. We've filed a ticket internally to dive into this to determine the best solution for supporting Sendable in Swift 6 and will keep you updated on a solution.
Thank you!
+1
In Xcode16, when Swift 6 is enabled then concurrency checks are done it causes compiler errors in a couple of places in braze sdk. I hope braze developers prioritize on this soon.
Hi @3a4oT @twittemb @nacho4d,
We are happy to announce that we've released Swift SDK version 11.0.0 with support for Swift 6 concurrency and Sendable. You can reference the Changelog entry with more details.
Thanks and let us know if you run into any issues!