I am using cordova 2.1.0 for my IOS app development.
I connected my IOS device to a MAC processor and installed/initialized my app running in xcode or dragged it from itunes folder. Now i physically disconnected my device from the processor and through wifi enabled in the device, sent notifications/messages through APNS to the device. I was able to successfully receive notifications in the device. Now after some time, i reconnected the device to the processor, which lead to a problem of the app launching again and calling ‘didFinishLaunchingWithOptions’ method again, which is not desirable as the launch/initialization should happen only once. This behaviour is random ie. every time when i disconnect/reconnect, it is not happening, only sometimes. Why is this happening. What could be the reason for this random behaviour.
Any help will be appreciated.Thanks
didFinishLaunchingWithOptions:is called every time the app is launched. When you run your app from Xcode, and disconnect the device, it kills the app. So, when you launch the app with the device disconnected, it starts the app again, which callsdidFinishLaunchingWithOptions:when the app finishes launching. The same thing happens if you run the app from Xcode, and run it again the same way.EDIT :
Not sure if it’s clear, but
didFinishLaunchingWithOptions:is not called if you quit the app (press the home button) and call it back without killing it.