Okay so I thought of an idea to get around the restraints of my last post (for anyone who read it that is reading this). What I need to do it detect if the application badge number is greater than 0 and then set a boolean depending on if it is greater or not. Here is my code:

```
Code is no longer relative to the question.

```

Okay that sets the boolean. Next I read it and execute my actions with this code:

```
Code is no longer relative to the question.

```

My only problem is that no matter what the badge number is, it says that the number is 1 AND then doesn't execute my code even if it was 1. Anyone have an idea what I'm doing wrong? Is it the else statements or the way I'm detecting the badge number? Thanks for any help! I'm really stressed about this because this is the only wall I've hit in my app.

Edit:
I've fixed my problem and below is the code I used. Please note that this MUST go inside the app delegate.

```
int badge = application.applicationIconBadgeNumber;
if(badge)
{
    NSLog(@"App Badge is Greater Than 0");
}
    else
{
    NSLog(@"App Badge is Equal To 0");
}

```