braze-swift-sdk icon indicating copy to clipboard operation
braze-swift-sdk copied to clipboard

[Feature]: Swift Concurrency / Sendable support for Braze

Open 3a4oT opened this issue 1 year ago • 2 comments

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

3a4oT avatar Oct 26 '23 18:10 3a4oT

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!

jerielng avatar Oct 26 '23 18:10 jerielng