adib adib - 1 year ago 127
iOS Question

Why iOS apps signed with development or enterprise certificates launch slower?

I can't help noticing on my iPhone 5 that the apps that are signed using my development certificate and my company's enterprise distribution certificate takes about 4 seconds to launch or activate. This is the time taken between tapping the application's icon and seeing the launch image – which obviously does not include the application's initialization code.

It's an awkward 4 seconds in which the application's icon remains dimmed after being tapped and the home screen freezes (can't even scroll right/left).

What's weird is that it takes approximately the same amount of time to re-activate the application from the background (i.e launch the app, wait till it runs, press the home button, and then immediately tap the app's icon again).

Questions are:

  • What is causing this?

    • My gut feel blames Springboard trying to verify the signing certificates upon each tap of the application's icon. However I can't prove this.

  • How can I reduce this launch-freeze time? (if at all possible?)

I tested this using iOS 8.3 on iPhone 5

Answer Source

In my case, I think it was due to the devices having literally a ton of different provisioning profiles installed in them (for some reason, the "Profiles" entry in the Settings app is no longer available... but they show in Window / Devices / Show Provisioning Profiles...).

In theory, you should have to delete all the profiles from within Xcode's "Devices" window. However -at least as of Xcode 6 in my environment- this is very unresponsive (either by clicking the menu's button or hitting the Delete key) to the point of almost beach-balling, and the displayed list itself sometimes seems to be very inconsistent from one plugging of the device to the next (perhaps it is cached? an Xcode bug?).


So instead, I just reset my devices to factory settings ("Delete all settings and Data"), and now my apps launch immediately (iPad Air) and almost immediately (iPod Touch 5th Gen).

I believe (but this needs confirmation) that the reason why all those provisioning profiles where installed on the devices in the first place is that, in the Target's General/Identity pane I specified the "Team". Now, I have these settings:

  1. Target / General / Identity

    Bundle Ientifier: com.MyCompanyName.AppName

    Team: None

(Setting the team seems to cause Xcode to install all provisioning profiles from the developer portal into the device...?)

  1. Target / Build Settings / Code Signing

    Code Signing Identity: iOS Developer

    Provisioning Profile: Automatic

...and on Run, only one of my profiles (one of the Xcode-managed "iOS Team Provisioning Profile" ones) gets installed on the device.

Addendum: Searching the internet for "Xcode specify team why" yielded this documentation page by Apple on setting the Xcode Team. Hope it helps.

UPDATE: Still the same as of Xcode 7.x

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download