iPhone - Register for push notification lock iPhone running iOS3 on Release mode

394 Views Asked by At

I put the following code in "applicationdidFinishLaunchingWithOptions"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{    
    // Let the device know we want to receive push notifications
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
     (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

...//other code
}

The app works fine in iOS 4, iOS 5 (DEBUG and RELEASE mode).
The app works fine in iOS 3 in DEBUG mode.
The app DOES NOT work in iOS 3 in RELEASE mode, the phone is locked when the app starts.
Please see screenshot.
enter image description here Do you know how to fix it?

1

There are 1 best solutions below

0
On BEST ANSWER

So borrowed 2 other iPhone running iOS 3.0 and the app works fine. May be it happens to my device only.