Q:

Thread1v:signal SIGABRT

I am Android Developer now switching to IOS, so I am new to IOS development.  
I got error this place
Thread1v:signal SIGABRT .  how to solve error
 -(void)updatePostCountUserDefaults{

NSMutableDictionary *postCount ;

NSNumber *count;

if([[NSUserDefaults standardUserDefaults] objectForKey:@"postCount"] ! =nil){

    postCount = [[NSUserDefaults standardUserDefaults] objectForKey:@"postCount"];

    count = [postCount objectForKey:@"count"];

    count = [NSNumber numberWithInt:([count integerValue] + 1.0)];

    int n = [count integerValue];

    NSLog(@"hey count is : %i" , n);

    [postCount setObject:count forKey:@"count"];

}else{

    postCount = [[NSMutableDictionary alloc] init];

    count = [NSNumber numberWithInt:1];

    [postCount setObject:count forKey:@"count"]; //error- 

}

[[NSUserDefaults standardUserDefaults] setObject:postCount  forKey:@"postCount"];

[[NSUserDefaults standardUserDefaults] synchronize];
int num = [count integerValue];
NSLog(@"count is %i " , num);
if([count integerValue] == 4 || [count integerValue] == 12){
    // show rating screen

}

pls any help

A:

Actually I think the line you marked "error" will not crash.  It it [postCount setObject:count forKey:@"count"]; that will cause the exception.  Because postCount in that context is an NSDictionary, not a mutable dictionary.  Therefore, it cannot respond to setObject:forKey:. 
EDIT: The correct code:
if([[NSUserDefaults standardUserDefaults] objectForKey:@"postCount"] ! =nil){
    postCount = [[[NSUserDefaults standardUserDefaults] objectForKey:@"postCount"] mutableCopy];
    count = [postCount objectForKey:@"count"];
    count = [NSNumber numberWithInt:([count integerValue] + 1.0)];
    int n = [count integerValue];
    NSLog(@"hey count is : %i" , n);
    [postCount setObject:count forKey:@"count"];
}else{...}

