I am testing applications on device, I used bundle identifier "mycompany.app" and after selecting proper code signing i am able to run the application on device(i.e my iPhone). Now after successfully run this application I deleted that and used the same bundleId and provisioning to test other application which is of local notifications. so it start showing the badge number on the application Icon whenever the local notification generated. Now again I deleted this application and try running my previous application with same bundle but it is showing the badge Number (ie 1) on application Icon even though I have not added any code for showing the badge Number to this application. How to remove these badge?
Asked
Active
Viewed 380 times
1
-
try restarting Xcode or clean your xcode project(command+shift+k). I hope this would help you in some way.. – aToz Feb 04 '13 at 06:22
-
i did restart and cleaned too. but no hope. – Bhavin Kansagara Feb 04 '13 at 06:34
-
please any other way to come out of situation? – Bhavin Kansagara Feb 04 '13 at 06:34
-
I suggest you use different Bundle Identifier for different app. And now, I think reset your iPhone can resolve this problem(be careful, you will lose all your data). – sunkehappy Feb 04 '13 at 06:59
-
ya,but for testing I had used the same one. now onwards i will use different bundle identifiers. btw resetting iPhone is not a good choice. – Bhavin Kansagara Feb 04 '13 at 07:07
-
1Try this out..delete the provisioning profile, download it form the developer account and install. – aToz Feb 04 '13 at 09:46
1 Answers
0
Hi please use following code in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
function:-
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;

Sunil Zalavadiya
- 1,993
- 25
- 36
-
this trick works...but not getting why it was showing the badge Number even i had not added any code to set it. :) – Bhavin Kansagara Feb 04 '13 at 09:53