Post

Replies

Boosts

Views

Activity

Reply to SwiftUI MacOS Return/Enter Key in TextField
use the submit modifier on the the ok button TextField("Name: ", text: $name) TextField("Description:", text: $description) Button("Cancel") { self.isVisible.Toggle() } .keyboardShortcut(.cancelAction) Button("Ok") { doSomeThing() } .keyboardShortcut(.defaultAction) .onSubmit { doSomething() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to Is it possible that the device token for Push notification will change while the app is running?
Please mention a specific problem you're experiencing instead of being as clear as mud. As the documentation outlines it will call the method mentioned if there is a change while the app is running or the next time the app launches. It is your responsibility to take the token and store it somewhere for use by your APNS backend sending server, or script any time a notification has to be delivered to the device.
Feb ’22