From 4369b7f8c643c846b7913df4534c72dc8d6d192a Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 26 Jun 2020 22:09:02 -0400 Subject: [PATCH] Fix to identifier string on MacOS. --- macos/notify_macos.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macos/notify_macos.go b/macos/notify_macos.go index 53e0ece..973f5b1 100644 --- a/macos/notify_macos.go +++ b/macos/notify_macos.go @@ -46,9 +46,10 @@ notify(char *id, char *title, char *content) { UNMutableNotificationContent *note = [[UNMutableNotificationContent alloc] init]; note.title = [[NSString alloc] initWithUTF8String: title]; note.body = [[NSString alloc] initWithUTF8String: content]; + NSString *identifier = [[NSString alloc] initWithUTF8String: id]; NSLog(@"Creating request"); - UNNotificationRequest *req = [UNNotificationRequest requestWithIdentifier:@"Gio" content: note trigger:nil]; + UNNotificationRequest *req = [UNNotificationRequest requestWithIdentifier:identifier content: note trigger:nil]; ret = req.identifier; // FIXME: need to call retain? NSLog(@"Adding notification request"); [nc addNotificationRequest:req withCompletionHandler: ^(NSError *error) {