iOS Error on launch from deeplink: lsd[738] <Warning>: LaunchServices: application launch failed - timeout waiting for launch - ios

When launching my iOS app from a deeplink (a URL with app specific scheme), I get this error in log:
lsd[738] <Warning>: LaunchServices: application launch failed - timeout waiting for launch.
when the app is launched normally, there is no error.
There is no other log regarding the root of the timeout.
I am looking at the log coming from a device.
Here is the full log:
Mar 26 18:03:35 iPod kernel[0] <Notice>: xpcproxy[2291] Container: /private/var/mobile/Containers/Data/Application/E1E3A2BC-E5B7-4BE3-881D-CFFC37666FA2 (sandbox)
Mar 26 18:03:35 iPod MobileSafari[2291] <Error>: assertion failed: 12F5047f: libxpc.dylib + 51923 [A76ECB1C-8653-340A-A02D-52E89E8A8902]: 0x7d
Mar 26 18:03:35 iPod Unknown[2291] <Error>:
Mar 26 18:03:35 iPod locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Mar 26 18:03:35 iPod MobileSafari[2291] <Error>: Could not successfully update network info during initialization.
Mar 26 18:03:36 iPod locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Mar 26 18:03:36 iPod backboardd[56] <Warning>: CoreAnimation: updates deferred for too long
Mar 26 18:03:38 iPod kernel[0] <Notice>: xpcproxy[2295] Container: /private/var/mobile/Containers/Data/Application/8D14282B-075D-431C-B5BE-D9961FB420D7 (sandbox)
Mar 26 18:03:38 iPod syncdefaultsd[2287] <Notice>: (Note ) marked "com.me.keyvalueservice" topic as "ignored" on (null)
Mar 26 18:03:38 iPod locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Mar 26 18:03:38 iPod Training[2295] <Error>: assertion failed: 12F5047f: libxpc.dylib + 51923 [A76ECB1C-8653-340A-A02D-52E89E8A8902]: 0x7d
Mar 26 18:03:38 iPod Unknown[2295] <Error>:
Mar 26 18:03:48 iPod **lsd[738] <Warning>: LaunchServices: application launch failed - timeout waiting for launch.**
Mar 26 18:03:48 iPod Training[2295] <Warning>: willFinishLaunchingWithOptions
Mar 26 18:03:48 iPod Training[2295] <Warning>: didFinishLaunchingWithOptions

I was seeing 8 second delays before seeing the same log message.
Mar 26 18:03:48 iPod **lsd[738] <Warning>: LaunchServices: application launch failed - timeout waiting for launch.**
This was only happening when launching the app when the app was not already in the background. I filed a bug with Apple. This issue is supposedly fixed in iOS 9 beta 4. Unfortunately, older versions of iOS will continue to have this problem.

Related

ios app goes background when launched in ios9.3 after killed. but works fine in ios 10

Jan 23 09:34:06 ipad4 SpringBoard[46] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Jan 23 09:34:06 ipad4 SpringBoard[46] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Jan 23 09:34:06 ipad4 kernel[0] <Notice>: xpcproxy[944] Container: /private/var/mobile/Containers/Data/Application/B079D4E8-6E3B-4742-975F-F2FE38F78C1E (sandbox)
Jan 23 09:34:06 ipad4 com.apple.xpc.launchd[1] <Error>: assertion failed: 13G36: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3
Jan 23 09:34:07 ipad4 DealerApp[944] <Warning>: -[AppDelegate application:didFinishLaunchingWithOptions:]:65 [Debug] Configured Web Service URL: \\\\\\\\\\
Jan 23 09:34:07 ipad4 DealerApp[944] <Warning>: Initializing Manager Class!!!!!
Jan 23 09:34:07 ipad4 DealerApp[944] <Warning>: -[AppDelegate applicationDidBecomeActive:]:147 [Debug] APP DELEGATE: applicationDidBecomeActive
Jan 23 09:34:26 ipad4 SpringBoard[46] <Warning>: Forcing crash report of <FBApplicationProcess: 0x196f7ad0; DealerApp; pid: 944> (reason: 1, description: App failed to scene-create after 19.77s (launch took 0.23s of total time limit 20.00s))
Jan 23 09:34:27 ipad4 syncdefaultsd[941] <Notice>: (Note ) marked "com.me.keyvalueservice" topic as "enabled" on <APSConnection: 0x1556ab60>
Jan 23 09:34:27 ipad4 ReportCrash[945] <Error>: assertion failed: 13G36: libsystem_trace.dylib + 15927 [E82A6F2D-873A-39AD-8014-EDEB52248157]: 0x0
Jan 23 09:34:27 ipad4 Unknown[945] <Error>:
Jan 23 09:34:27 ipad4 ReportCrash[945] <Warning>: os_activity_diagnostic_for_pid() failed!
Jan 23 09:34:27 ipad4 SpringBoard[46] <Warning>: Finished crash reporting.
Jan 23 09:34:27 ipad4 SpringBoard[46] <Warning>: BSXPCMessage received error for message: Connection interrupted
Jan 23 09:34:27 ipad4 SpringBoard[46] <Warning>: BSXPCMessage received error for message: Connection invalid
Jan 23 09:34:27 ipad4 SpringBoard[46] <Warning>: HW kbd: Failed to set (null) as keyboard focus
Jan 23 09:34:27 ipad4 com.apple.xpc.launchd[1] (UIKitApplication:—————[0x9b4][944]) <Notice>: Service exited due to signal: Killed: 9
Jan 23 09:34:27 ipad4 SpringBoard[46] <Warning>: Application 'UIKitApplication:————[0x9b4]' exited abnormally via signal.
Jan 23 09:34:27 ipad4 UserEventAgent[23] <Warning>: 4288342351487: id=———pid=944, state=0
Jan 23 09:34:27 ipad4 ReportCrash[945] <Warning>: Saved type '109(109_DealerApp)' report (1 of max 25) at /var/mobile/Library/Logs/CrashReporter/DealerApp-2017-01-23-093427.ips
Jan 23 09:34:07 ipad4 DealerApp[944] : Initializing Manager Class!!!!!
Jan 23 09:34:07 ipad4 DealerApp[944] : -[AppDelegate applicationDidBecomeActive:]:147 [Debug] APP DELEGATE: applicationDidBecomeActive
Jan 23 09:34:26 ipad4 SpringBoard[46] : Forcing crash report of (reason: 1, description: App failed to scene-create after 19.77s (launch took 0.23s of total time limit 20.00s))
The first two lines show you were you've been and the last line told you why it crashed: the launch took too long. You would need to provide more context, e.g. the app delegate code to get an answer for why this is happening.
PS: Please use the code feature here, otherwise it's pretty hard to read

Application is not installing after resigning the app

I have followed resigning of the app using this approach
link
When I sign the application using the code signing identity of same account,I am not facing any problem.
When I sign the application using the code signing identity of different account,the app is not installing.
**Find device logs below**
Aug 9 05:02:57 iPhone installd[50] <Notice>: 0x16e087000 -[MIClientConnection lookupUninstalledWithOptions:completion:]: Lookup uninstalled requested by atc (pid 40) with options (null)
Aug 9 05:02:57 iPhone atc[40] <Warning>: |error| Unable to create file lock.
Aug 9 05:02:58 iPhone CommCenter[79] <Notice>: Snapshot path [/var/wireless/Library/Logs/CrashReporter/Baseband/] was removed
Aug 9 05:02:58 iPhone crash_mover[2659] <Notice>: (Warn ) <crash_mover.m nr_isPaired:305> device is not paired
Aug 9 05:03:00 iPhone storebookkeeperd[138] <Warning>: [UPP-SBDDomainSyncedStorageController] target sync date from client: 2016-08-08 23:33:10 +0000 (in 10.00 sec)
Aug 9 05:03:00 iPhone storebookkeeperd[138] <Warning>: [UPP-SBDDomainSyncedStorageController] setting target date to: 2016-08-08 23:33:10 +0000 (in 62621512019.73 sec)
Aug 9 05:03:00 iPhone storebookkeeperd[138] <Warning>: [UPP-SBDDomainSyncedStorageController] scheduling sync (via BackgroundTaskJob) 9.999694 seconds from now...
Aug 9 05:03:00 iPhone SpringBoard[58] <Warning>: could not find icon for representation -> com.testing.test1
Aug 9 05:03:00 iPhone SpringBoard[58] <Warning>: Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x1521a4700 H:|-(0)-[UIView:0x152956030] (Names: '|':UITableViewCellContentView:0x15295f610 )>",
"<NSLayoutConstraint:0x152911190 H:[UIView:0x152956030]-(0)-| (Names: '|':UITableViewCellContentView:0x15295f610 )>",
"<NSLayoutConstraint:0x152776570 H:|-(16)-[UIView:0x152853d80] (Names: '|':UIView:0x152956030 )>",
"<NSLayoutConstraint:0x15290bac0 H:[UIView:0x152853d80]-(16)-| (Names: '|':UIView:0x152956030 )>",
"<NSLayoutConstraint:0x152831960 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x15295f610(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x15290bac0 H:[UIView:0x152853d80]-(16)-| (Names: '|':UIView:0x152956030 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Aug 9 05:03:00 iPhone searchd[168] <Warning>: ====^^^^ DuetExpert missing data, count -> people:0 applicationDeepLinks:0 applications:8 requests:242 missingAllDataRequests:0
Aug 9 05:03:00 iPhone installd[50] <Notice>: 0x16e1bb000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/tmp/com.apple.atc.Apps/com.testing.test1.app" type Placeholder (LSInstallType = 4) requested by atc (pid 40)
Aug 9 05:03:00 iPhone installd[50] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.testing.test1; Version=0.0.10, ShortVersion=(null)>
Aug 9 05:03:00 iPhone installd[50] <Notice>: 0x16e1bb000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.testing.test1 at /private/var/mobile/Containers/Data/Application/0685BF39-E8C4-4D66-A5CF-EFD7CE29773C
Aug 9 05:03:00 iPhone installd[50] <Notice>: 0x16e1bb000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.testing.test1 at /private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184
Aug 9 05:03:00 iPhone installd[50] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 0.00s; Waiting: 0.00s; Preflight/Patch: 0.00s, Verifying: 0.01s; Overall: 0.14s
Aug 9 05:03:00 iPhone nesessionmanager[133] <Notice>: NESMPathControllerSession[com.apple.commcenter.ne.cellularusage:358E9214-5A59-4451-B74C-2D08546A5FAA]: Skip a start command from nehelper[108]: session in state connected
Aug 9 05:03:00 iPhone syncdefaultsd[2661] <Notice>: (Note ) SYDAccount: no account
Aug 9 05:03:00 iPhone syncdefaultsd[2661] <Notice>: (Note ) SYDBootAccount: no account (null)
Aug 9 05:03:00 iPhone syncdefaultsd[2661] <Notice>: (Note ) SYDPIMAccount: no account (null)
Aug 9 05:03:00 iPhone syncdefaultsd[2661] <Notice>: (Note ) SYDAlwaysOnAccount: no account (null)
Aug 9 05:03:01 iPhone tccd[103] <Notice>: Refusing client without bundle identifier (/System/Library/PrivateFrameworks/MusicLibrary.framework/Support/medialibraryd)
Aug 9 05:03:01 iPhone tccd[103] <Notice>: Refusing client without bundle identifier (/System/Library/PrivateFrameworks/MusicLibrary.framework/Support/medialibraryd)
Aug 9 05:03:03 iPhone installd[50] <Notice>: 0x16e247000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/test1.ipa" type Customer (LSInstallType = (null)) requested by atc (pid 40)
Aug 9 05:03:03 iPhone installd[50] <Notice>: 0x16e247000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.testing.test1; Version=0.0.10, ShortVersion=0.0.10>
Aug 9 05:03:03 iPhone profiled[153] <Notice>: (Note ) MC: Provisioning profiles changed
Aug 9 05:03:03 iPhone profiled[153] <Notice>: (Note ) MC: Updating MIS trust...
Aug 9 05:03:03 iPhone securityd[91] <Error>: secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Aug 9 05:03:03 iPhone securityd[91] <Error>: secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Aug 9 05:03:03 iPhone installd[50] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Aug 9 05:03:03 iPhone installd[50] <Notice>: MIS: entitlement 'keychain-access-groups' has value not permitted by provisioning profile 'SmartOffice Mobile Enterprise Dist'
Aug 9 05:03:03 iPhone installd[50] <Error>: 0x16e247000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.2qAqVP/extracted/Payload/test1.app : 0xe8008016 (The executable was signed with invalid entitlements.)
Aug 9 05:03:03 iPhone installd[50] <Error>: 0x16e247000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Aug 9 05:03:03 iPhone atc[40] <Error>: 0x16e1bb000 __MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.2qAqVP/extracted/Payload/test1.app : 0xe8008016 (The executable was signed with invalid entitlements.)" UserInfo={LibMISErrorNumber=-402620394, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=142, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], NSLocalizedDescription=Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.2qAqVP/extracted/Payload/test1.app : 0xe8008016 (The executable was signed with invalid entitlements.)}
Aug 9 05:03:03 iPhone nsurlsessiond[115] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x1465658f0> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone itunesstored[111] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x139146030> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone iaptransportd[73] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x14f537910> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone apsd[95] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x15f57a0b0> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone atc[40] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x1378c3360> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone SpringBoard[58] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x1528762f0> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone BTServer[65] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x13fd3f680> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone UserEventAgent[26] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x13dde4400> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone passd[136] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x147d80a20> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone homed[135] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x125e04010> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone profiled[153] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
"<LSApplicationProxy: 0x13c55ee80> com.testing.test1 (Placeholder) <file:///private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184/com.testing.test1.app>"
)
Aug 9 05:03:03 iPhone lsd[86] <Warning>: LaunchServices: Unentitled vendor device identifier lookup for app com.testing.test1 by pid 40
Aug 9 05:03:03 iPhone installd[50] <Notice>: 0x16e247000 -[MIClientConnection uninstallIdentifiers:withOptions:completion:]: Uninstall requested by atc (pid 40) for identifier com.testing.test1 with options: (null)
Aug 9 05:03:03 iPhone installd[50] <Notice>: 0x16e247000 -[MIUninstaller _uninstallBundleWithIdentifier:error:]: Uninstalling identifier com.testing.test1
Aug 9 05:03:03 iPhone installd[50] <Notice>: 0x16e247000 -[MIUninstallNotifier performRemovalWithCompletionBlock:]: Destroying container with identifier com.testing.test1 at /private/var/containers/Bundle/Application/55D4F9A3-DB4A-483F-A11E-E4CE58DE5184
Aug 9 05:03:03 iPhone installd[50] <Notice>: 0x16e247000 -[MIUninstallNotifier performRemovalWithCompletionBlock:]: Destroying container with identifier com.testing.test1 at /private/var/mobile/Containers/Data/Application/0685BF39-E8C4-4D66-A5CF-EFD7CE29773C
Aug 9 05:03:03 iPhone nesessionmanager[133] <Notice>: NESMPathControllerSession[com.apple.commcenter.ne.cellularusage:358E9214-5A59-4451-B74C-2D08546A5FAA]: Skip a start command from nehelper[108]: session in state connected
Aug 9 05:03:04 iPhone mobile_assertion_agent[154] <Notice>: service_one_connection: Connection closed for client iTunes.
Aug 9 05:03:09 iPhone kernel[0] <Notice>: AppleKeyStore: operation failed (pid: 44 sel: 34 ret: e00002bc '-536870212')
Aug 9 05:03:09 iPhone kernel[0] <Notice>: AppleKeyStore: operation failed (pid: 44 sel: 34 ret: e00002bc '-536870212')
Aug 9 05:03:09 iPhone keybagd[44] <Error>: 0x16e1bb000 __handle_keystashverify_block_invoke: aks_stash_verify failed e00002bc
Aug 9 05:03:09 iPhone softwareupdateservicesd[178] <Error>: call_and_response: Error from server
Aug 9 05:03:09 iPhone keybagd[44] <Error>: 0x16e12f000 __handle_keystashverify_block_invoke: aks_stash_verify failed e00002bc
Aug 9 05:03:09 iPhone SpringBoard[58] <Error>: call_and_response: Error from server
Aug 9 05:03:09 iPhone softwareupdateservicesd[178] <Warning>: [autosu error]: SPI for AutoSU: probabilityVector is empty
Aug 9 05:03:10 iPhone storebookkeeperd[138] <Warning>: [UPP-SBDDomainSyncedStorageController] running synchronizeImmediatelyWithCompletionHandler: now
Aug 9 05:03:10 iPhone storebookkeeperd[138] <Warning>: [StoreBookkeeper] -[SBKUniversalPlaybackPositionStore _onQueueRunTaskWithName:taskCompletionHandler:runTaskBlock:] _onQueueSync - beginning synchronize operation...
Aug 9 05:03:10 iPhone storebookkeeperd[138] <Warning>: [StoreBookkeeper] -[SBKUniversalPlaybackPositionStore _onQueueLoadBagContextWithCompletionHandler:] _onQueueLoadBag - load bag operation beginning...
Aug 9 05:03:10 iPhone storebookkeeperd[138] <Warning>: [StoreBookkeeper] __81-[SBKUniversalPlaybackPositionStore _onQueueLoadBagContextWithCompletionHandler:]_block_invoke413 _onQueueLoadBag - load bag completed.
Aug 9 05:03:10 iPhone storebookkeeperd[138] <Warning>: [StoreBookkeeper] __89-[SBKUniversalPlaybackPositionStore _onQueueSynchronizeImmediatelyWithCompletionHandler:]_block_invoke _onQueueSync - synchronize operation beginning...
Aug 9 05:03:11 iPhone storebookkeeperd[138] <Warning>: [StoreBookkeeper] __96-[SBKUniversalPlaybackPositionStore _onQueueRunTaskWithName:taskCompletionHandler:runTaskBlock:]_block_invoke281 _onQueueSync - synchronize completed.
Aug 9 05:03:18 iPhone SpringBoard[58] <Warning>: [autosu error]: SPI for AutoSU: probabilityVector is empty
Aug 9 05:03:18 iPhone SpringBoard[58] <Warning>: [autosu error]: SPI for AutoSU: probabilityVector is empty
I think you are not changing the entitlements properly.
i.e
team identifier present in application identifier and keychain access group might be the one that belongs old account.
You have to update those with the one for new account.
then
try signing that it'd work I guess
FYI:
Application identifier is the combination of team id and bundle id
team id you can find from the installed certificate in keychain

Titanium ios app with 5.2.0 sdk crashes at launch in run or distrib mode but works fine in debug or simulator

The device is iPhone 6s Plus with iOS 9.2. Using Titanium Studio, when I run in debug mode and stepping through code, the app runs fine. However, when I simply "run" it (device connected to laptop via USB) or install the .ipa file in adhoc distribution, the app crashes as soon as it is launched. There is absolutely no log generated in Titanium when "run". And there is little to no relevant information in Xcode too when the installed .ipa is run. Here is the log from Xcode:
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus SpringBoard[58] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus SpringBoard[58] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus securityd[96] <Error>: secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus securityd[96] <Error>: secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus amfid[178] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus kernel[0] <Notice>: xpcproxy[311] Container: /private/var/mobile/Containers/Data/Application/8A3B415C-2259-A7NA-8XXD-8X5XFXCAJBDK (sandbox)
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus MySampleApp[311] <Warning>: [DEBUG] Reading stylesheet from: /var/mobile/Containers/Bundle/Application/H3POBLF9-PB0N-1KF5-4RXY-EEDRD90GC79X/MySampleApp.app/stylesheet.plist
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus iap2d[176] <Warning>: process com.mysampleco.mysampleapp is now running the foreground
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus UserEventAgent[26] <Warning>: Tracking com.mysampleco.mysampleapp (via activity)
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus MySampleApp[311] <Warning>: [INFO] MySampleApp/1.0.1 (5.2.0.384775e)
Mar 18 09:42:51 ThisUser-iPhone-6s-Plus MySampleApp[311] <Warning>: [DEBUG] Loading: /var/mobile/Containers/Bundle/Application/H3POBLF9-PB0N-1KF5-4RXY-EEDRD90GC79X/MySampleApp.app/app.js, Resource: app_js
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus kernel[0] <Notice>: Sandbox: MySampleApp(311) deny(1) sysctl-read kern.proc.all.0
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus kernel[0] <Notice>: Sandbox: MySampleApp(311) deny(1) process-info-pidinfo 0
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus kernel[0] <Notice>: Sandbox: MySampleApp(311) deny(1) sysctl-read kern.proc.pid.0
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus mediaserverd[28] <Notice>: '' com.mysampleco.mysampleapp(pid = 311) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus SpringBoard[58] <Warning>: HW kbd: Failed to set (null) as keyboard focus
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus mediaserverd[28] <Notice>: 'FigPlayer - 34' (pid = 34) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus com.apple.xpc.launchd[1] (UIKitApplication:com.mysampleco.mysampleapp[0x72dd][311]) <Warning>: Service exited with abnormal code: 1
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus SpringBoard[58] <Warning>: Application 'UIKitApplication:com.mysampleco.mysampleapp[0x72dd]' exited voluntarily.
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus iap2d[176] <Warning>: process com.mysampleco.mysampleapp is now switching to other state
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus iap2d[176] <Warning>: process com.mysampleco.mysampleapp is now terminated
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus UserEventAgent[26] <Warning>: 85324450686: id=com.mysampleco.mysampleapp pid=311, state=0
Mar 18 09:42:52 ThisUser-iPhone-6s-Plus SpringBoard[58] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.
I've searched through other posts, some of whom point to "Javascript Minification" (which I turned off but still got the crash) and some talk about "Fastest, Smallest [-Os]" for Release in Code Generation section of Xcode's Build setting (which I don't know how to control since I'm using Appcelerator Titanium to build the app). Several others discuss specific code issues as revealed by the log. Since I get nothing in the log files that I can tell of significance, I'm not sure where to look.
Any help is appreciated.
UPDATE on March 21, 2016:
It took me a while to figure out the culprit. Here are the steps to reproduce the issue:
1) In Titanium Studio, create a new Mobile App project using Alloy Default template.
2) Run the newly created project as-is to a USB attached iPhone 6s Plus (or probably ANY ios device).
3) Click on the app icon on the device and the app will launch just fine with Hello World on the screen.
4) Now go to the TiApp.xml file and edit it by adding the following parameter:
<property name="appc-sourcecode-encryption-policy">embed</property>
5) Now run the modified project to the USB attached device.
6) Open the app and you will notice that it crashes right after the splash screen shows briefly.
It seems the property above does not work properly. Opened JIRA ticket AC-3389.
It looks like a provisioning issue. Check this thread which deals with a similar error.
If that does not help, please provide some more details like sample code and detailed crash logs (full trace-log). Thanks!

iOS8 iCloud backup not restoring enterprise app data

We have an enterprise iOS app that currently stores all of its data locally (core data plus a folder full of images) and a substantial number of users who have been using iCloud to backup their devices frequently. Restoring after device failure and when upgrading devices has and is still working just fine on iOS7. Unfortunately we're finding that backup restoration of app data is not happening on current versions of iOS8 (failing on 8.2, 8.1.3, 8.1.2 and possibly more). The app installs and runs just fine on iOS 8 for new installs. Restore from iTunes backup still works just fine. The results are the same for users with 1MB of data as ones with nearly 1GB of data. The results were the same last week before this weeks iCloud drama.
The timing seems to potentially line up with the "Masque Attack" fix, were there new requirements on enterprise apps added?
From the user stand point, you see the normal grayed out icon with the loading indicator and then it disappears about the same time as the following console log. If the user then installs the app again they start with no data, where in previous versions of iOS they would have all of their data.
A few potentially relevant snippets from the monstrously long console log of an attempt to restore on 8.2 (identifying info altered):
Mar 11 15:40:22 iPad backupd[60] <Warning>: WARNING: Retrying after hard error: Error getting file auth-tokens from service (MBErrorDomain/300). Underlying error: HTTP connection error (MBErrorDomain/300). Underlying error: The request timed out. (NSURLErrorDomain/-1001). Underlying error: The request timed out. (kCFErrorDomainCFNetwork/-1001)...
Mar 11 15:40:33 iPad backupd[60] <Warning>: INFO: [2] Restoring from snapshot 10 of backup xxxxxxxxxxxxxxxxxxxxxxxxxxxxx (3/6/15, 9:37:17 AM, iPad, iPad4,1, 11D201)
Mar 11 15:40:33 iPad backupd[60] <Warning>: INFO: [2] Starting to restore 0 files of size 0 B
Mar 11 15:40:34 iPad backupd[60] <Warning>: INFO: Unregistering MMCS item 488: /var/mobile/Containers/Data/Application/AF8DAA2A-AC8A-A3CA-AEBA-AF26FDA720AA/Documents/Photos/8142837B-DAFE-4AB1-A1C3-575441A52528.jpg.encrypted (574c85a9e9dca9d018fcc44a6c4c456bbb4bddd3)
.....
Mar 11 15:40:46 iPad backupd[60] <Warning>: WARNING: Chunk store progress model bytes remaining underflow (8192 bytes)
.....
Mar 11 15:40:47 iPad backupd[60] <Warning>: WARNING: [2] Error getting item from chunk store: /var/mobile/Containers/Data/Application/AF8DAA2A-AC8A-A3CA-AEBA-AF26FDA720AA/Documents/Photos/8142837B-DAFE-4AB1-A1C3-575441A52528.jpg.encrypted (574c85a9e9dca9d018fcc44a6c4c456bbb4bddd3): Error getting item from MMCS at path "/var/mobile/Containers/Data/Application/AF8DAA2A-AC8A-A3CA-AEBA-AF26FDA720AA/Documents/Photos/8142837B-DAFE-4AB1-A1C3-575441A52528.jpg.encrypted" (MBErrorDomain/401). Underlying error: chunk for item 00000000000001e8 at chunk index 0 has location r. Perhaps the item should be unregistered. (com.apple.mmcs/29).
.....
Mar 11 15:40:48 iPad backupd[60] <Warning>: WARNING: Retrying after hard error: Error getting item from MMCS at path "/var/mobile/Containers/Data/Application/AF8DAA2A-AC8A-A3CA-AEBA-AF26FDA720AA/Documents/Photos/8142837B-DAFE-4AB1-A1C3-575441A52528.jpg.encrypted" (MBErrorDomain/401). Underlying error: chunk for item 00000000000001e8 at chunk index 0 has location r. Perhaps the item should be unregistered. (com.apple.mmcs/29).
.....
Mar 11 15:41:30 iPad BTServer[68] <Critical>: LE LE_Security_DeriveLinkKeyForAddress with result BM3 STATUS 102
Mar 11 15:41:30 iPad identityservicesd[42] <Warning>: [Warning] sqlite3 error in _Bool CSDBRecordStoreSaveWithPreAndPostCallbacksAndTransactionType(CSDBRecordStoreRef, CSDBRecordStoreSaveCallback, CSDBRecordStoreSaveCallback, CSDBRecordConflictPolicy, CSDBSqliteTransactionType, CFErrorRef *): disk I/O error
Mar 11 15:41:30 iPad identityservicesd[42] <Error>: Error saving record store: CSDBRecordSQLite/10
.....
Mar 11 15:50:49 iPad backupd[60] <Warning>: WARNING: Chunk store progress model bytes remaining underflow (8192 bytes)
Mar 11 15:50:49 iPad backupd[60] <Warning>: WARNING: Chunk store progress model bytes remaining underflow (208784 bytes)
Mar 11 15:50:51 iPad backupd[60] <Warning>: INFO: [2] Restored batch of 17 files of size 24.8 MB in 30.5 s at 0.81 MB/s (99.4%)
Mar 11 15:50:51 iPad backupd[60] <Warning>: INFO: [2] Finished restoring files in 603.930 at 0.00 MB/s
Mar 11 15:50:51 iPad backupd[60] <Warning>: INFO: [2] Uninstalling placeholder: com.enterprise.app.in.question
Mar 11 15:50:51 iPad backupd[60] <Warning>: LaunchServices: Uninstalling app <LSApplicationProxy: 0x1563fdd0> com.enterprise.app.in.question (Placeholder)
Mar 11 15:50:52 iPad installd[36] <Notice>: 0x341000 -[MIClientConnection uninstallIdentifiers:withOptions:completion:]: Uninstall requested by backupd (pid 60) with options: (null)
Mar 11 15:50:52 iPad MobileStorageMounter[199] <Error>: 0x350749dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such process
Mar 11 15:50:52 iPad MobileStorageMounter[199] <Error>: 0x350749dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Mar 11 15:50:52 iPad MobileStorageMounter[199] <Error>: 0x350749dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Mar 11 15:50:52 iPad MobileStorageMounter[199] <Error>: 0x350749dc Device-O-Matic: iterate_ancestors IORegistryEntryGetParentIterator failed: No such file or directory
Mar 11 15:50:52 iPad SpringBoard[43] <Warning>: Killing com.enterprise.app.in.question for termination assertion
Mar 11 15:50:52 iPad installd[36] <Notice>: 0x341000 -[MIUninstaller _uninstallBundleWithIdentifier:error:]: Uninstalling identifier com.enterprise.app.in.question
Mar 11 15:50:53 iPad installd[36] <Notice>: 0x341000 -[MIUninstallNotifier performRemovalWithCompletionBlock:]: Destroying container with identifier com.enterprise.app.in.question at /private/va
r/mobile/Containers/Bundle/Application/AC76CA20-A0A9-49F0-A3E5-A854ACC834DA
Mar 11 15:50:53 iPad installd[36] <Notice>: 0x341000 -[MIUninstallNotifier performRemovalWithCompletionBlock:]: Destroying container with identifier com.enterprise.app.in.question at /private/va
r/mobile/Containers/Data/Application/AF8DAA2A-AC8A-A3CA-AEBA-AF26FDA720AA
Mar 11 15:50:53 iPad syncdefaultsd[200] <Notice>: (Note ) marked "com.me.keyvalueservice" topic as "opportunistic" on <APSConnection: 0x166601e0>
Mar 11 15:50:53 iPad backupd[60] <Warning>: LaunchServies: No app bundle to remove for com.enterprise.app.in.question
Mar 11 15:50:53 iPad lsd[153] <Warning>: LaunchServices: Updating identifier store
Mar 11 15:50:53 iPad backupd[60] <Warning>: INFO: [2] Registering safe harbor for com.enterprise.app.in.question at /var/mobile/Library/SafeHarbor/1
Mar 11 15:50:54 iPad installd[36] <Notice>: 0x1f59000 -[MIClientConnection registerSafeHarborAtPath:forIdentifier:ofType:withOptions:completion:]: Register safe harbor requested by client backupd (pid 60) for path /var/mobile/Library/SafeHarbor/1, identifier com.enterprise.app.in.question of type 2, with options (null)
Mar 11 15:50:54 iPad locationd[64] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0Mar 11 15:50:54 iPad installd[36] <Notice>: 0x1f59000 -[MIContainer makeContainerLiveReplacingContainer:withError:]: Made safe harbor container active for com.enterprise.app.in.question at /priv
ate/var/mobile/Containers/Data/Application/50638B9B-39E4-4CA8-815E-59B17685FF24
Mar 11 15:50:54 iPad backupd[60] <Warning>: INFO: [2] Processed failed app restore in 2.832 sMar 11 15:50:55 iPad backupd[60] <Warning>: INFO: Restore finished in 1642.926 s
Mar 11 15:50:55 iPad installd[36] <Notice>: 0x1f59000 -[MIClientConnection listSafeHarborsOfType:withOptions:completion:]: List safe harbor requested by client backupd (pid 60) for type 2 with options (null)
Mar 11 15:50:55 iPad atc[28] <Warning>: LaunchServices: Not creating progress for <LSApplicationProxy: 0x17dec580> com.enterprise.app.in.question since it is not a placeholder.
Mar 11 15:50:56 iPad backupd[60] <Warning>: INFO: [2] Restoring cancelled app: com.enterprise.app.in.question
Mar 11 15:50:56 iPad backupd[60] <Warning>: INFO: [2] Uninstalling placeholder: com.enterprise.app.in.question
Mar 11 15:50:56 iPad backupd[60] <Warning>: LaunchServices: Uninstalling app <LSApplicationProxy: 0x15578670> com.enterprise.app.in.question
Mar 11 15:50:56 iPad installd[36] <Notice>: 0x1f59000 -[MIClientConnection uninstallIdentifiers:withOptions:completion:]: Uninstall requested by backupd (pid 60) with options: (null)
Mar 11 15:50:56 iPad SpringBoard[43] <Warning>: Killing com.enterprise.app.in.question for termination assertion
Mar 11 15:50:56 iPad installd[36] <Error>: 0x1f59000 +[MIContainer allContainersForIdentifier:options:error:]: 686: No bundle container found for identifier com.enterprise.app.in.question
Mar 11 15:50:56 iPad backupd[60] <Warning>: LaunchServices: MobileInstallationUninstallForLaunchServices did not uninstall any apps, ignoring
Mar 11 15:50:57 iPad backupd[60] <Warning>: INFO: [2] Removing any partially restored app data
I (and our client) have been in contact with Apple about this, part of Apple had us log this as a bug and another responded saying that iCloud restore wasn't an enterprise level service and that this is how it is supposed to work currently. Hopefully the 2nd was mistaken.

iOS App will not die, writes to console & plays sounds after quit

My app has some kind of Zombie problem. (Not an NSZombie problem. Like, a coming-back-from-the-dead problem.)
I first noticed that after a debugging session, when I would go for a run the music on my iPhone would pause every ~7 minutes, and when I'd unlock the device the app name would be flashing red in the status bar as though it had just crashed. Sometimes there would even be phantom sound from the app, like it was still running in the background somehow.
Manually quit the app, continue. Still get the intermittent audio artifacts even though the app no longer appears in my list of running apps.
When I plug back in, this is in the console for each time the app zombified and restarted itself. It looks just like a normal launch of the app! What the? What could be triggering my app to restart itself?
Console:
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: cocos2d v1.1.0-beta2b
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: Using Director Type:CCDirectorDisplayLink
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: OS version: 5.1 (0x05010000)
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: GL_VENDOR: Imagination Technologies
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: GL_RENDERER: PowerVR SGX 535
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: GL_VERSION: OpenGL ES-CM 1.1 IMGSGX535-63.24
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: GL_MAX_TEXTURE_SIZE: 2048
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 16
// etc //
Apr 26 12:10:01 unknown kernel[0] <Debug>: launchd[2658] Builtin profile: container (sandbox)
Apr 26 12:10:01 unknown kernel[0] <Debug>: launchd[2658] Container: /private/var/mobile/Applications/FFEB0A26-06D1-4C46-8AE5-C60582D09A1D [69] (sandbox)
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: Audio session details
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: Audio Input Available? YES
Apr 26 12:10:01 unknown mediaserverd[32] <Warning>: 12:10:01.641 <SystemSoundServer> WARNING translating HAL error: 561214578
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: Max Possible Inputs 15151420
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: Outputs 2
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: Device sample rate 44100.000000
Apr 26 12:10:01 unknown Breakout[2658] <Warning>: Hardware buffer size 0.023220
// etc //
Apr 26 12:10:33 unknown SpringBoard[52] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Apr 26 12:10:33 unknown UserEventAgent[12] <Warning>: DEBUG: Changing screen blanked state: 0
Apr 26 12:10:33 unknown SpringBoard[52] <Notice>: MultitouchHID: detection mode: 255->0 (deferring until bootloaded)
Apr 26 12:10:33 unknown SpringBoard[52] <Notice>: MultitouchHID: device bootloaded
Apr 26 12:10:33 unknown SpringBoard[52] <Notice>: MultitouchHID: detection mode: 0->0
Apr 26 12:10:34 unknown kernel[0] <Debug>: set_crc_notification_state 0
Apr 26 12:10:34 unknown ReportCrash[2659] <Notice>: Formulating crash report for process Breakout[2658]
>
Apr 26 12:10:34 unknown SpringBoard[52] <Warning>: pid_suspend failed for [2658]: Unknown error: -1, Unknown error: -1
Apr 26 12:10:34 unknown SpringBoard[52] <Warning>: Could not set priority of [2658] to 4096, priority: No such process
Apr 26 12:10:34 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.charliewilliams.Breakout[0xd5ad]) Job appears to have crashed: Trace/BPT trap: 5
Apr 26 12:10:34 unknown SpringBoard[52] <Warning>: Application 'Breakout' exited abnormally with signal 5: Trace/BPT trap: 5
Apr 26 12:10:35 unknown ReportCrash[2659] <Error>: libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0
Apr 26 12:10:35 unknown ReportCrash[2659] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/Breakout_2012-04-26-121033_Tortuga-Gigante.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Explanation of the solution: It turned out to be simple - 1. I was shutting down my audio session in dealloc but not in applicationDidEnterBackground. And since I'm using kaudiosessioncategory_playandrecord that seems to tell iOS to restart the app if it crashes in the background.
Now, why is it crashing in the background? ...well, that's my next task.
The app may have a background voip flag set. If it does, the OS will restart the app if it exits abnormally (or when the device restarts).
what audio framework are you using? the iPod app, GarageBand and other audio apps present red flashing in the title bar when audio processing continues after exiting the app. This wouldn't happen with Cocos Denshion I don't think, so you must be using an Apple framework for your audio? The answer likely lies with how it is configured. Apple gives some of its own audio frameworks permission to keep running when in the background so you can have customized music playing, like apps for radio stations, etc.
We will probably need code snippets also as the logs don't tell us what code is executed

Resources