를 실행하지 않는 나는 때 응용 프로그램은 내가 JSON을 처리하고와 메시지를 구성 할 수 있습니다 실행, 푸시 메시지가 parse.com로 보내 처리에 문제가 :핸들 JSON 푸시 알림 구문 분석 응용 프로그램은
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
그러나 응용 프로그램이있는 경우 백그라운드에서 또는 죽은이 메시지는 핸들이며 알림 바에 직접 보냅니다. 나는이 함수에서 처리하려고 :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
....
UILocalNotification *localNotif = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (localNotif) {
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 99];
UIAlertView *BOOM = [[UIAlertView alloc] initWithTitle:@"BOOM"
message:@"app was INACTIVE"
delegate:self
cancelButtonTitle:@"a-ha!"
otherButtonTitles:nil];
[BOOM show];
NSLog(@"App was NOT ACTIVE");
}
.....
추정이 응답,하지만 난 메시지를 밀어 처리 할 수 없습니다 :
Handling Push Notifications when App is NOT running
Can't handle push notifications when app is running background
Handling push notifications when app is not running (App is Killed)
how can I handle push notification when my app is not running
을도움이 필요하십니까? 고마워.
응용 프로그램이 실행 중일 때이 함수를 사용하면 JSON을 가져 와서 메시지를 만들 수 있습니다. 내 문제는 앱이 실행되고 있지 않을 때입니다. – fermin
앱이 실행되지 않을 때도이 기능이 계속 호출되지만 로컬 알림을 활성화하고 애플리케이션에 경고를 표시하려면 앱을 강제 중지 상태로 만들 때 애플리케이션을 다시 실행해야합니다. 애플리케이션 코드를 사용하여 경고를 표시 할 수 없습니다. –
앱을 제거한 다음 다시 설치해보세요.하지만 동일한 문제가 있습니다. 표시 할 메시지를 다시 작성하지만이 기능에 대해 실행되지 않았습니다. – fermin