If I add the .onDeleteCommand to a List, the Edit -> Delete menu item is enabled when a row is selected. However, the delete key doesn't work. I see that the menu item doesn't have the shortcut listed. When trying to replace it using a CommandGroup, the shortcut becomes command + delete.
How do I get the Edit -> Delete MenuItem to use the delete key shortcut? Or how do I enable using the delete key to delete rows in a List on the macOS?
@main
struct MyApp: App {
		
		var body: some Scene {
				WindowGroup {
						ContentView()
				}
				// Turns it into command+delete
//				.commands {
//						CommandGroup(replacing: CommandGroupPlacement.pasteboard) {
//								Button("Delete", action: {
//										print("Custom Delete")
//								})
//								.keyboardShortcut(.delete)
//						}
//				}
		}
}
struct ContentView: View {
		@State var data = Data()
		@State var selection = Set<Int>()
		
		var body: some View {
				List.init(data.models, id: \.id, selection: $selection) {
						Text("Name: \($0.name)")
								
				}
				.keyboardShortcut(.delete)	// This does not work
				.onDeleteCommand(perform: { // This works when clicking in the menu
						print("Delete row")
				})
		}
}
struct Model: Identifiable {
		let id: Int
		let name: String
}
struct Data {
		var models = [Model(id: 1, name: "First")]
}
Post
Replies
Boosts
Views
Activity
If I used a private db, I have different uses and permissions for different tables. I'm trying to figure out how I can setup the table permissions in a similar way in CloudKit.
For example, a countries table (admin:read/write, user:read) Only managed by an admin
The data can be read by any user but not updated
Data will be populated before any users have the app
Is there a related store in CloudKit for this use case?
Next, a users table (admin:read/write, user:read/limited write)
When a user signs up, a new record is added.
A user should have read and write access to only their record.
Admins should have read and write access to all records.
The read/write access is different from the countries example. How would this be handled in CloudKit?
I have postfix setup. I confirmed by sending test emails. If I watch the logs, I can see the emails being sent:
log stream --predicate	'(process == "smtpd") || (process == "smtp")' --info
2020-10-07 09:20:05.110042-0700 0x797f8 Info 0x0 44288 0 smtp: 697E213FE996: to=<MY@EMAIL.com>, relay=email-smtp.us-east-1.amazonaws.com[3.209.161.67]:587, delay=15, delays=14/0/0.83/0.84, dsn=2.0.0, status=sent (250 Ok 0100017503dcd187-5b1e6a31-4a69-478e-9d61-0bed900f21a1-000000)
In the Xcode build service logs, I can see that it starts the email step, but I don't see the log being create in the mail logs
/Library/Developer/XcodeServer/IntegrationAssets/db3c6b6a0ee11805255ff018f876ebe7-ServerTest\ Bot/5/buildService.log
Oct 7 09:22:53 [7704] <Info>: Executing trigger 'Periodic Email Report'
Oct 7 09:22:53 [7704] <Info>: Completed integration step XCSTriggersIntegrationStep without error
As for the Xcode email settings, I have tried both empty fields as suggested on stackoverflow and filling them in correctly. Neither seem to work.
In the Sign in With Apple docs - https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens regarding signing a JWT
After creating the JWT, sign it using the Elliptic Curve Digital Signature Algorithm (ECDSA) with the P-256 curve and the SHA-256 hash algorithm. A decoded client_secret JWT token has the following format... There aren't any steps to sign it. I found some references to P256 - https://developer.apple.com/documentation/cryptokit/p256?changes=latest_minor in the docs. Does anyone know how to use Apple's CryptoKit to sign a JWT?