scheduleLocalNotification funktioniert nicht für Jailbreak-Apps?

Ich habe eine App, die anruftscheduleLocalNotification, aber es funktioniert nicht, wenn ich es installiere/ Anwendungen anstatt/ var / mobile / Anwendungen:

- (void) doNotify
{
    // this doesn't work when app is in /Applications but does in /var/mobile/Applications
    UILocalNotification * theNotification = [[UILocalNotification alloc] init];
    theNotification.alertBody = @"Finished processing.";
    theNotification.alertAction = @"Ok";
    theNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:1];
    [[UIApplication sharedApplication] scheduleLocalNotification:theNotification];
    NSLog(@"notification scheduled: %@", theNotification);
}

Ich habe es versuchtpresentLocalNotification Stattdessen, falls es sich um ein Zeitproblem handelte.

Ich implementiertdidReceiveLocalNotification in app delegieren, um zu sehen, ob das stattdessen aufgerufen wurde, aber nicht, es wurde nur aufgerufen, wenn app im Vordergrund ist, wie es sollte.

Wenn ich die App wieder einlege/ var / mobile / Anwendungen, es funktioniert so wie es sollte. Ich verwende Xcode 4.2.1 und verwende iOS 5.1.1 auf einem iPhone 4S und iPod Touch 4g

BEARBEITEN: App kann im Hintergrund ausgeführt werden, da es sich um eine Musik-App handelt

Antworten auf die Frage(2)

Ihre Antwort auf die Frage