tags:

views:

550

answers:

2

I have an application that worked just fine on iOS 3.0 - 3.1.3. When testing an iOS 4 SDK ad-hoc build however the app behaves strangely. After installation (with either Xcode, iTunes or iPhone Configuration Utility) the app does one of two things:

  1. App launches and works, but fails on subsequent launches and just shows a black screen.
  2. App fails with black screen immediately.

Debugging is not possible since the app never reaches a point where it can be debugged. The Xcode console shows no contact with the remote debugger, and the iPhone console shows only a single line related to the app:

Sat Jun 26 01:41:48 iPhone SpringBoard[28] : Unable to send activation event to no.applics.myapp resume animate activate: animationStart = 1880.316523041667 deactivate: killed : (ipc/send) invalid destination port

I thought this might indicate multitasking was the problem, but the same thing happens with UIApplicationExitsOnSuspend both on and off.

I also tested a SDK 3.1.3 build and got the same behaviour.

The really interesting part is that if the iPhone is rebooted the installed app works fine. I'm starting to think this is an issue with iOS 4 and provisioning. Has anyone else experienced this or something similar?

A: 

I have, just today. I have no idea why. I'm starting to think it may have something to do with syncing with iTunes, then installing an app. I've only noticed it when I've had photos to sync with iPhoto.

spstanley
Yes, the problem is related to syncing, or rather provisioning. I can now reproduce it easily. Make sure no (relevant) profiles are installed on the device, then install the provisioning profile and the app in the same session. Start the app and it will fail, possibly on the second startup. Reboot the device and the app will work as intended. After describing this to Apple my apps were approved, so they apparently are aware of the problem.
Bjorn Ruud
I get this in a live app from the iTunes. First time after you download the app, black screen. Second start up, it's fine. Only get the black screen on iOS 4 devices.
stoutyhk
A: 

I encountered the same bug on a 4.0.1 iPhone 3GS - an app that worked fine the day before started failing on startup, and then presenting a black screen. Running the app from Xcode was causing gdb to crash with "putpkt: write failed" message. I also could not use the organizer to remove the relevant provisioning profiles, and Apple has apparently removed Settings->General->Profiles in iOS4.

Rebooting the phone, removing the app, and removing the provisioning profiles in Xcode organizer fixed this bug for me.

Springboard errors from the console log:

activate:  deactivate: eventOnly underLock : (ipc/send) invalid destination port
activate:  deactivate: animate : (ipc/send) invalid destination port
mr_marc