Tag: 通知

iPhone:每日本地通知

我正在尝试实施本地通知 这是我设定的 // Current date NSDate *date = [NSDate date]; // Add one minute to the current time NSDate *dateToFire = [date dateByAddingTimeInterval:20]; // Set the fire date/time [localNotification setFireDate:dateToFire]; [localNotification setTimeZone:[NSTimeZone defaultTimeZone]]; 而不是20,我想把一个固定的时间(每天)开始推。 例如:我想推动通知每6:00上午popup。 怎么可能呢? 谢谢

为本地通知select自定义声音

你如何改变播放本地通知的声音? 我使用下面的代码来播放默认声音: notif.soundName = UILocalNotificationDefaultSoundName; 所以,我在下面尝试了这个,但是没有成功。 我该怎么办? 谢谢你的帮助! notif.soundName = @"sound.caf";

代码更新后,启用iOS 8的设备不会收到PUSH通知

我最近升级了我的一个testingiPhone到iOS 8,然后升级了PUSH注册码如下(使用xCode 6) -(BOOL)hasNotificationsEnabled { NSString *iOSversion = [[UIDevice currentDevice] systemVersion]; NSString *prefix = [[iOSversion componentsSeparatedByString:@"."] firstObject]; float versionVal = [prefix floatValue]; if (versionVal >= 8) { NSLog(@"%@", [[UIApplication sharedApplication] currentUserNotificationSettings]); //The output of this log shows that the app is registered for PUSH so should receive them if ([[UIApplication sharedApplication] currentUserNotificationSettings].types != UIUserNotificationTypeNone) { […]

iOS中的远程通知和安静通知有什么区别?

当我阅读Apple Docs时 ,他们提到了3种types的通知:本地,远程和无声。 本地通知可以从应用程序本地发送的名称中推断出来。 但是,其他两种types有什么不同呢? 非常感谢。