Fix to identifier string on MacOS.
This commit is contained in:
parent
8adb6873d1
commit
4369b7f8c6
|
@ -46,9 +46,10 @@ notify(char *id, char *title, char *content) {
|
||||||
UNMutableNotificationContent *note = [[UNMutableNotificationContent alloc] init];
|
UNMutableNotificationContent *note = [[UNMutableNotificationContent alloc] init];
|
||||||
note.title = [[NSString alloc] initWithUTF8String: title];
|
note.title = [[NSString alloc] initWithUTF8String: title];
|
||||||
note.body = [[NSString alloc] initWithUTF8String: content];
|
note.body = [[NSString alloc] initWithUTF8String: content];
|
||||||
|
NSString *identifier = [[NSString alloc] initWithUTF8String: id];
|
||||||
|
|
||||||
NSLog(@"Creating request");
|
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?
|
ret = req.identifier; // FIXME: need to call retain?
|
||||||
NSLog(@"Adding notification request");
|
NSLog(@"Adding notification request");
|
||||||
[nc addNotificationRequest:req withCompletionHandler: ^(NSError *error) {
|
[nc addNotificationRequest:req withCompletionHandler: ^(NSError *error) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user