Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 905
adib Avatar asked Apr 12 '15 12:04

adib


People also ask

What is the use of development certificate in iOS?

An iOS developer certificate is a code-signing certificate, a digital signature that associates you and your digital identity with your applications.

What is signing certificate in iOS?

A signing certificate is the first requirement you need in order to be able to sign apps for installation on iOS devices. Specifically, you need a development certificate, which lets an individual install and run an app on a device.

What is ad hoc certificate iOS?

The Ad-Hoc certificate allows you to build your app to run on a predetermined list of devices. There are a couple big caveats though: You need the UDID of every device you want the app to run on. The user needs to install the provisioning profile for the app as well as the device manually.

What is enterprise application in iOS?

The Apple Developer Enterprise Program is only for the internal use and distribution of proprietary apps in specific use cases that are not adequately addressed with public apps on the App Store, custom apps through Apple Business Manager or Ad Hoc distribution, or beta testing through TestFlight.


1 Answers

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?).


TL;DR:

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

like image 155
Nicolas Miari Avatar answered Oct 13 '22 22:10

Nicolas Miari