Here is my code:
`
// A 3rd-party class I must use.
class MySession{
init() async throws {
// ..
}
}
actor SessionManager{
private var mySession: MySession? // The MySession is not Sendable
func createSession() async {
do {
mySession = try await MySession()
log("getOrCreateSession() End, success.")
} catch {
log("getOrCreateSession() End, failure.")
}
}
}`
I get this warning: "Non-sendable type 'MySession' returned by implicitly asynchronous call to a nonisolated function cannot cross the actor boundary."
How can this be fixed?
Post
Replies
Boosts
Views
Activity
Hello,
I am developing an HCE-based contactless payment application for the European Economic Area. I want to detect when my application is not the default contactless app and forward the user to the iOS settings for selecting the default contactless app.
Question #1: How can I detect that my app is not the default contactless app?
Question #2: How can I forward the user directly to the default contactless app selection in iOS settings?
This line of code forwards the user to my app’s settings, which contains a reference to the default contactless app selection, but I couldn’t forward the user directly to the default contactless app selection view:
UIApplication.shared.open(URL(string: "app-settings:root=General")!)
There must be a way to jump directly to the default contactless app selection view as described in Apple's commitment to the EU (Case AT.40452, Chapter 3.8): "Apple will enable HCE Payment Applications to redirect users directly to the App’s page in settings and include a link which will take the user directly to the NFC settings page to easily set the default Payment Application for NFC In-Store Payments.
(https://ec.europa.eu/competition/antitrust/cases1/202428/AT_40452_10155330_9978_4.pdf)