mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-20 20:22:50 +08:00
ios send local notification can accept 0 as params
This commit is contained in:
parent
265d88e766
commit
e60d7c2b8c
@ -395,13 +395,14 @@
|
||||
}
|
||||
|
||||
JPushNotificationTrigger *trigger = [[JPushNotificationTrigger alloc] init];
|
||||
// 由于 不支持 0 作为传入参数,在传入参数基础上添加一个极小的时间于 android 端保持一致。
|
||||
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0) {
|
||||
if (delay) {
|
||||
trigger.timeInterval = [delay doubleValue];
|
||||
trigger.timeInterval = [delay doubleValue] + 0.000001;
|
||||
}
|
||||
} else {
|
||||
if (delay) {
|
||||
trigger.fireDate = [NSDate dateWithTimeIntervalSinceNow:[[command argumentAtIndex:0] intValue]];
|
||||
trigger.fireDate = [NSDate dateWithTimeIntervalSinceNow:[[command argumentAtIndex:0] doubleValue] + 0.001];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user