Reputation: 3361
Our app works fine on iOS 4.2 and 4.3. However, on iOS 3.2 it crashes at this line
[[NSNotificationCenter defaultCenter] postNotificationName:@"notificnname" object:nil];
The function postNotificationName is available since iOS 2.0. I am building my app with iOS 4.3 and the target sdk is set as 3.2. Any ideas what could be causing the crash.
Thanks.
Upvotes: 0
Views: 435
Reputation: 10065
agree with pt2ph8's comment above.
Mostly likely some object registered for a notification, then got dealloced without unregistering for a notification. Thus the notification center is sending notifications to dead objects.
Make sure in your dealloc (or viewDidUnload for view controllers) that you are unregistering that object from all notifications.
Upvotes: 3