私は iPhone アプリを作成しましたが、iPad ユーザーはいくつかの問題に直面しています。そのうちの 1 つは次のとおりです。
Smartcover が iPad に取り付けられていると、通知が繰り返されます。10.15 としましょう:
NSDateComponents *comps = [[NSDateComponents alloc] init];
[comps setDay:[dateComponents day]];
[comps setMonth:[dateComponents month]];
[comps setYear:[dateComponents year]];
[comps setHour:10];
[comps setMinute:15];
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDate *fireDate = [gregorian dateFromComponents:comps];
UILocalNotification *alarm = [[UILocalNotification alloc] init];
alarm.fireDate = [fireDate dateByAddingTimeInterval:timeAdjustment];
alarm.soundName = @"sounder.aiff";
alarm.alertBody = @"Testing..";
alarm.timeZone = [NSTimeZone defaultTimeZone];
if ([alarm.fireDate compare:[NSDate date]] == NSOrderedDescending) {[[UIApplication sharedApplication] scheduleLocalNotification:alarm];}
通知は適切なタイミングでオフになりますが、ユーザーが通知後にスマートケースを閉じてケースを再度開くと、iPad は、たとえば 10.59 で通知を繰り返します。これは私が望むものではありません。繰り返すことはありませんが、どこでこれを無効にできるかわかりません