내 앱에서 Urban 비행선을 사용하여 푸시 알림을 받고 예상대로 작동합니다. 문제는 내 응용 프로그램이 포 그라운드에서 실행되고 푸시받은 때 나는 this-iOS 앱이 포 그라운드에서 실행 중일 때 푸시 알림 제목을 변경하는 방법은 무엇입니까?
을 시도 알림 대신 NOTIS로 제목을 표시 할 payload.But의 정보와 함께 제목으로 알림을 보여주고 있다는 것입니다- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
if (application.applicationState == UIApplicationStateActive)
{
NSDictionary* aps = [userInfo valueForKey:@"aps"];
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Notis" message:[aps valueForKey:@"alert"] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
}
else
{
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
tabBarController.selectedIndex=2;
[self loadStatisticsInBackground];
[[UAPush shared] handleNotification:userInfo applicationState:application.applicationState];
}
[[UAPush shared] resetBadge];
}
그러나 내가 정의한 경보와 시스템 정의 된 두 개의 경보를 보여줍니다. 도움이 될 것입니다. 편집 : 좋습니다 .. 푸시 알림의 제목을 변경할 수없는 경우 앱이 포 그라운드에서 실행될 때 푸시 알림을 방지 할 수있는 방법이 있습니까? 내 앱이 언제 실행되는지 표시하고 싶지 않습니다. 전경?
앱이 포 그라운드에서 실행 중일 때 푸시 알림을 방지 할 수있는 방법이 있습니까? 내 앱이 포 그라운드에서 실행될 때 표시하고 싶지 않습니다. – Blios
'displayNotificationAlert :'메소드의 구현이 있습니까? ([Urban Airship iOS Library 4.0.0 도시 비행선 UAPushNotificationDelegate Protocol Reference (http://docs.urbanairship.com/reference/libraries/ios/latest/Protocols/UAPushNotificationDelegate.html#//api/name/)을 참조하십시오. displayNotificationAlert :)) –
일부 대리인이이 메서드를 시작하도록 설정해야합니까? – Blios