User97693321
User97693321

Reputation: 3346

can we show badge without APNS?

I want to simulate push notification without using apple's push notification server, so I want to know can I show badge also if yes which API or Objective-C code I have use to show badge?

Upvotes: 1

Views: 1454

Answers (2)

User97693321
User97693321

Reputation: 3346

We can use [[UIApplication sharedApplication] setApplicationIconBadgeNumber:<n>] to show the badge with out APNS.

If we want to reset the previous badge while application is restarted ,we can use this [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];

Upvotes: 1

Robin Summerhill
Robin Summerhill

Reputation: 13675

Yes. Use [[UIApplication sharedApplication] setApplicationIconBadgeNumber:<n>]. See the documentation.

Upvotes: 2

Related Questions