add files apis
This commit is contained in:
@@ -36,12 +36,12 @@
|
||||
NSURL *imageUrl = [[NSBundle mainBundle] URLForResource:@"MaskTime" withExtension:@"png"];
|
||||
UNNotificationAttachment *attach = [UNNotificationAttachment attachmentWithIdentifier:@"photo" URL:imageUrl options:nil error:nil];
|
||||
|
||||
NSURL *audioUrl = [[NSBundle mainBundle] URLForResource:@"4481" withExtension:@"wav"];
|
||||
UNNotificationAttachment *attachAudio = [UNNotificationAttachment attachmentWithIdentifier:@"audio" URL:audioUrl options:nil error:nil];
|
||||
// NSURL *audioUrl = [[NSBundle mainBundle] URLForResource:@"4481" withExtension:@"wav"];
|
||||
// UNNotificationAttachment *attachAudio = [UNNotificationAttachment attachmentWithIdentifier:@"audio" URL:audioUrl options:nil error:nil];
|
||||
|
||||
NSURL *vedioUrl = [[NSBundle mainBundle] URLForResource:@"emojizone" withExtension:@"mp4"];
|
||||
UNNotificationAttachment *vedioAudio = [UNNotificationAttachment attachmentWithIdentifier:@"vedio" URL:vedioUrl options:nil error:nil];
|
||||
content.attachments = @[attachAudio];
|
||||
// NSURL *vedioUrl = [[NSBundle mainBundle] URLForResource:@"emojizone" withExtension:@"mp4"];
|
||||
// UNNotificationAttachment *vedioAudio = [UNNotificationAttachment attachmentWithIdentifier:@"vedio" URL:vedioUrl options:nil error:nil];
|
||||
content.attachments = @[attach];
|
||||
|
||||
//延迟通知 第一个参数是重复的时间间隔,最小60s,第二个参数是是否重复。
|
||||
UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:timeInterval repeats:NO];
|
||||
|
||||
Reference in New Issue
Block a user