저는 지금 당분간 '그냥 작동해야'하는 것처럼 보이기 위해 고심하고 있습니다. Urban Flyship을 통한 푸시 알림 설정이 있으며 앱이 백그라운드에서 진행되는 동안 업데이트되는 배지를 제외하고는 모두 잘 작동합니다. 늘어나는만큼 배지가 페이로드의 정수로 설정되어있는 한 앱이 포 그라운드에 있지 않으면 자체 처리해야합니다.푸시 알림 배지가 Urban Airship으로 백그라운드에서 업데이트되지 않습니다.
앱이 포 그라운드에있을 때 배지 업데이트를 캡처 한 경우 제대로 설정할 수는 있지만 앱에서 배지를 사용하고 싶지 않습니다.
여기 resetUABadge 호출이 단순히 0 응용 프로그램 출시에 다시 모든 설정 didFinishLaunchingWithOptions:
UAConfig *config = [UAConfig defaultConfig];
// You can also programatically override the plist values:
// config.developmentAppKey = @"YourKey";
// etc.
// Call takeOff (which creates the UAirship singleton)
[UAirship takeOff:config];
[UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeNewsstandContentAvailability);
[[UAPush shared] setPushEnabled:YES];
[[UAPush shared] setAutobadgeEnabled:YES];
[self performSelector:@selector(resetUABadge:)];
[[UAPush shared] handleNotification:[launchOptions valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey]
applicationState:application.applicationState];
내 설정입니다. 이 문제는 performSelector가 있는지 여부에 관계없이 유지됩니다.
내가 누락되었거나 누락되었지만 앱이 백그라운드/종료 (알림, 사운드)하는 동안 푸시 알림의 다른 모든 부분이 작동하지만 배지가 업데이트되지 않는다면 확실하지 않습니다. .
내 앱이 나쁘다고 보여줍니다. 초과 [UAirship takeOff : config]; **이 문제를 해결할 수 있도록 도와주세요. ** – Manthan