-34018 error when app is booting

I'm encountering -34018 error iOS 15.5

The first time my app is started after installation, the console log frequently shows this error. The first boot after restarting my iphone gives the same error. This error log appears dozens of times per startup. I suspect this bug is slowing down the startup.

P.S: I also don't know why amfi is ”Trust evaluate failure“, please let me know if you know. thanks

Here are some log segments:

16:16:01.911576+0800 imagent devicesChanged on connection account all devices num delegates: 1

16:16:01.911613+0800 mobileassetd handleCopyAssetAttributes: [languageassetd] unable to get asset attributes[com.apple.MobileAsset.DictionaryServices.dictionary2]: 1 [com_apple_MobileAsset_DictionaryServices_dictionary2/add6f6f4efb1726c78a6f4a71cded90212b901d9.zip]

6:16:01.911652+0800 imagent devicesChanged on connection account all devices num delegates: 1

16:16:01.911818+0800 securityd trustd[99]/1#12 LF=0 copy_parent_certificates Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}

16:16:01.912004+0800 securityd trustd[99]/1#12 LF=0 copy_parent_certificates Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}

16:16:01.912039+0800 identityservicesd Device query completed with Account ID: service: com.apple.private.alloy.multiplex1

16:16:01.912070+0800 identityservicesd - write account defaults: (has changes: YES)

16:16:01.912240+0800 trustd cert[0]: IssuerCommonName =(path)[]> 0

16:16:01.912439+0800 amfid Trust evaluate failure: [leaf IssuerCommonName LeafMarkerOid SubjectCommonName]

The first time my app is started after installation

How are you installing this app?

Is this problem unique to iOS 15.5? What other iOS releases have you tried it on? And what did you see there?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I also tried iOS16, the log is the same. The only difference is that the startup is faster and the same error log appears less often

I usually install it after an enterprise signature. It will also appear in the case of real device debug. 

and I --extract-certificates to extract the certificates: notBefore=Mar 15 05:34:18 2022 GMT notAfter=Mar 15 05:34:17 2023 GMT

I have the same logs when installing and starting the app built and installed directly from XCode, with more repetition on iOS15(15.6.1) than on iOS16(16.0.2 20A380) as well.

default	10:00:17.569111+0200	SpringBoard	[Main] dispatch event:
<SBTransitionSwitcherModifierEvent: 0x281f83f00; type: MainTransition; transitionID: -- a UUID --; phase: Animate; animated: YES; fromAppLayout: 0x0; toAppLayout: <SBAppLayout: 0x28386f8c0; primary: com.myapp.apps:default; environment: main>; fromEnvironmentMode: home-screen; toEnvironmentMode: application; pendingTermination: {(
)}; activating: <SBAppLayout: 0x28386f8c0; primary: com.myapp.apps:default; environment: main>; dosidoTransitionDirection: 0>
default	10:00:17.569169+0200	securityd	trustd[127]/1#12 LF=0 copy_parent_certificates Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}
default	10:00:17.569524+0200	securityd	trustd[127]/1#12 LF=0 copy_parent_certificates Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}
default	10:00:17.570209+0200	SpringBoard	adding status bar settings assertion: <SBAppStatusBarSettingsAssertion: aHexValue> {
    settings = <SBAppStatusBarSettings: aHexValue; alpha: 0>;
    level = app switcher;
    reason = kSBMainAppSwitcherStatusBarReason;
}
default	10:00:17.570281+0200	trustd	cert[0]: IssuerCommonName =(path)[]> 0
default	10:00:17.570503+0200	amfid	Trust evaluate failure: [leaf IssuerCommonName LeafMarkerOid SubjectCommonName]
default	10:00:17.572022+0200	amfid	elided platform fast path for key: -- the key --
default	10:00:17.572043+0200	amfid	Authoritative

I also suspect that it slows down the startup of the app, leading to prevent PushKit delivering a VoIP notification in time on slow devices, as callservicesd kills the app before reaching didFinishLaunchingWithOptions: https://developer.apple.com/forums/thread/717403

The project has 4 targets, App, NotificationContent, NotificationServ and Stickers (and Test), the 3 first have App Groups and Keychain Sharing capabilities and Entitlement Files with entries for the these 2 capabilities.

KeyChainAccess is used in the project with SwiftPackageManager.

@doxzhao amfid: https://discussions.apple.com/thread/6692859

amfid -- The mobile file integrity daemon.
amfid amfid is a daemon that checks the integrity of files running on the system.  It is not intended to be invoked directly.

It seems to block running unsigned code, no idea why it appears in our logs, but that sounds similar with not finding "application-identifier nor keychain-access-groups entitlements"...

-34018 error when app is booting
 
 
Q