Security errors in console

Since iOS 9 I've been seeing slow launch times with our application, to the point where users will have to launch it multiple times in a row just to get it to stay in the foreground.


What's interesting is that once it's been loaded into the foreground, it's usually not a problem to continue using the application after that.


We use enterprise distribution to allow employees to test the application before we ship to the app store. After dumping the console while having my device plugged into my computer, I saw my phone continually outputting these messages into the log, until the app ultimately timed out from the watchdog.


securityd[11300] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
securityd[11300] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
amfid[11381] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]


These same errors will repeat in blocks about 20 or so times in the console. When the application does eventually launch, these messages are not present. Additionally, these log messages are not present when launching the App Store version of the very same application, but are present in TestFlight versions of the binary.


I've verified my profiles and entitlements files following steps hereand am now at a loss. I would love some help with this as it's hindering some of our internal users from even running the application.

Replies

We're seeing something similar when launching an enterprise signed app on iOS 9 immediately after the app is installed:


The line

amfid[11381] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]

repeats once a second for about 15 seconds. This appears to have been a regression in iOS 9 GM (I don't remember seeing it in the previous betas).


In our case, the app does eventually launch. And subsequently launches are fast. It's just immediately after install/upgrade that we see the super slow launch time.

Take a look at the provisioning profile that are installed on your iPhone. There may be more installed than you think and could be slowing things down as you describe. You should be able to see them using 'Show Provisioning Profiles..." in the Devices window in XCode.

Looking through Xcode 7 and Xcode 7.1 beta I do not see any option for 'Show Provisioning Profiles...' in the devices window anymore.


However, I did download Apple Configurator 2, and see *tons* of duplicate profiles which I've tried to remove, but they just keep showing back up.


Would love some more ideas on how to actually remove them.

Xocde 7.x: Use the menu Window/Devices and select your device/iphone upper left. Then notice the 'gear' icon down below - tap it and choose 'Show Provisioning Profiles'. Tap to select the pp you want to manage, then use the '-' below left to delete.

Ahh, thanks! Launch times for the enterprise build do seem a bit better after removing lots of old profiles, however I still see the error logs stream out of the console.

I'm also seeing this Brian.


My first run of my app installed from Xcode *always* fails. Second run works. I see those messages you have in the console. Only since using 7.1, on 7 it was fine.


Have you found the magic incantation to stop this? I cleaned out all the unnecessary profiles on the device, no luck.


Also... fails to run on simu. P.S. I'm not using Enterprise Distro. Just straight up Xcode -> wired Device, standard dev account.

This is still happening with iOS 9.2, are others still seeing this problem?

Yep, we're also seeing this. Especially on the iPad 2, it easily adds up to more than 10 seconds.


In our case, we have a Swift app with lots of frameworks. And there's currently another issue that increases load times for Swift + frameworks:

https://github.com/CocoaPods/CocoaPods/issues/4532


This compounds to a 20+ second launch time...

Still happenning to me. Just uninstalled an enterprise app that was installed prior to the upgrade to iOS 9.2 (from 9.1). Now when I reinstall it, it repeatedly gets killed after 20 seconds of waiting to launch with the logs from your original post repeated over and over.