문제

I tried the push notification tutorial . It's working fine but problem is badge. When I click on the view, app is appear and the close it. it still red badge in app icon. How to remove it ?

Another question is

when I click the view, it will appear home screen. I want to show other view when coming from push notification.

도움이 되었습니까?

해결책

This will reset the application badge number. If you set that value to zero, it will hide the badge.

[UIApplication sharedApplication].applicationIconBadgeNumber = iCount;

To handle your push notification with a separate view, you need to handle the following message in your application delegate:

- (void)application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)userInfo

You can access the userInfo dictionary to get additional information about the push notification that resulted in the message callback.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top