iPhone couldn't receive MDM push messages - ios

I'm developing a MDM solutioin for my own organization. Created an iOS MDM testing server using python mentioned by imdmtools, generate push certs according to softthinker.
Here's the cert details:
Vendor: has an Enterprise Developer Program, the "MDM CSR" type certificate can be found in Apple developer center, downloaded as "mdm.cer".
Customer: same as Vendor, I generated in Windows 2008 IIS where my MDM server was hosted. The customer CSR was generated by the method mentioned by support.citrix.com/proddocs/topic/xmob-dm-8/xmob-dm-connect-create-p12-apns-iis-tsk.html.
The cert file has been created successfully, could be imported into keychain and exported in p12 format. I converted it into PEM format:
Locate the certificate in Keychain Access
Export to a .p12 file
Convert to .pem
openssl pkcs12 -in OrigPushCert.p12 -out PushCert.pem
Strip the passphrase
openssl rsa -in PushCert.pem -out PushKeyNoPass.pem
Open PushCert.pem in a text editor
Replace the encrypted "RSA Private Key" section with contents of PushKeyNoPass.pem
Save it out
The .mobileconfig file contains MDM payload:
With the server cert identify.p12
Push service: development mode
Topic: com.apple.mgmt.External.e8154c51-4788-44bc-8c23-a2669####f9c
After all, the device can be enrolled by https properly, the server could receive Device Token, Push Magic, Unlock Token from device. But when server sends MDM push message: {"mdm" : "PushMagic String>"}, device doesn't receive it. The IPCU device log displays:
Jun 13 16:26:13 unknown MobileSafari[374] <Warning>: webFrameLoader
Jun 13 16:26:16 unknown MobileSafari[374] <Warning>: webFrameLoader
Jun 13 16:26:16 unknown profiled[1394] <Notice>: (Note ) MC: Profile “-c-o-m-.-c-i-t-e-c-h-.-m-d-m-.-p-r-o-f-i-l-e” -q-u-e-u-e-d -f-o-r -i-n-s-t-a-l-l-a-t-i-o-n-.
Jun 13 16:26:18 unknown profiled[1394] <Notice>: (Note ) MC: Checking for MDM installation...
Jun 13 16:26:18 unknown profiled[1394] <Notice>: (Note ) MC: ...finished checking for MDM installation.
Jun 13 16:26:18 unknown profiled[1394] <Notice>: (Note ) MC: Beginning profile installation...
Jun 13 16:26:20 unknown keybagd[1403] <Notice>: MS:Notice: Installing: (null) [keybagd] (690.10)
Jun 13 16:26:22 unknown profiled[1394] <Notice>: (Note ) profiled: Device unlock notification received
Jun 13 16:26:22 unknown kernel[0] <Debug>: AppleKeyStore:Sending lock change
Jun 13 16:26:22 unknown profiled[1394] <Notice>: (Note ) MC: Profile “-c-o-m-.-c-i-t-e-c-h-.-m-d-m-.-p-r-o-f-i-l-e” -i-n-s-t-a-l-l-e-d-.
Jun 13 16:26:22 unknown mc_mobile_tunnel[1409] <Notice>: (Note ) MC: mc_mobile_tunnel starting.
Jun 13 16:26:23 unknown mc_mobile_tunnel[1409] <Notice>: (Note ) MC: mc_mobile_tunnel shutting down.
Jun 13 16:26:23 unknown mdmd[1405] <Notice>: MS:Notice: Installing: com.apple.managedconfiguration.mdmd [mdmd] (690.10)
Jun 13 16:26:24 unknown mdmd[1405] <Notice>: (Note ) MDM: mdmd starting...
Jun 13 16:26:24 unknown mdmd[1405] <Notice>: (Note ) MDM: Looking for managed app states to clean up
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSConnectionServer: 0xd622270>: connection set enabled topics {(
"com.apple.mgmt.External.e8154c51-4788-44bc-8c23-a26695####9c"
)}
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSCourier: 0x11dcb0>: Sending filter message for enabled hashes {
<10f79d78 c6984a13 f9fc677a 4556fc35 73249ead> = "com.apple.mgmt.External.e8154c51-4788-44bc-8c23-a26695####9c";
<141b878f 22242638 a132b5ba 96284394 eb258b67> = "com.citech.mdm.pushtest";
} and ignored hashes {}
Jun 13 16:26:24 unknown com.apple.launchd[1] <Warning>: (com.apple.managedconfiguration.mdmd) Check-in of Mach service failed. Already active: com.apple.managedconfiguration.mdmdpush-dev
Jun 13 16:26:24 unknown mdmd[1405] <Warning>: Unable to bootstrap_check_in() to namedDelegatePort 'com.apple.managedconfiguration.mdmdpush-dev'. APS connections will not persist past process lifetime.
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSConnectionServer: 0xd61b820>: Initializing connection server with environmentName 'development' and connectionPortName '(null)'
Jun 13 16:26:24 unknown com.apple.launchd[1] <Warning>: (com.apple.managedconfiguration.mdmd) Check-in of Mach service failed. Already active: com.apple.managedconfiguration.mdmdpush-prod
Jun 13 16:26:24 unknown mdmd[1405] <Warning>: Unable to bootstrap_check_in() to namedDelegatePort 'com.apple.managedconfiguration.mdmdpush-prod'. APS connections will not persist past process lifetime.
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSConnectionServer: 0x121fa0>: Initializing connection server with environmentName 'production' and connectionPortName '(null)'
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSConnectionServer: 0xd61b820>: connection set enabled topics {(
"com.apple.mgmt.External.e8154c51-4788-44bc-8c23-a26695####9c"
)}
Jun 13 16:26:24 unknown mdmd[1405] <Notice>: (Note ) MDM: Network reachability has changed.
Jun 13 16:26:24 unknown mdmd[1405] <Notice>: (Note ) MDM: Network reachability has changed.
Jun 13 16:26:24 unknown mdmd[1405] <Notice>: (Note ) MDM: Telling MDM Check-In Server about new device token.
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSConnectionServer: 0xd62a150>: Initializing connection server with environmentName 'development' and connectionPortName '(null)'
Jun 13 16:26:24 unknown apsd[95] <Warning>: <APSCourier: 0x11dcb0>: Removing connection server <APSConnectionServer: 0xd62a150>
Jun 13 16:26:24 unknown apsd[95] <Warning>: Interface manager: WWAN radio power level notification; DCH status changed to active
Jun 13 16:26:24 unknown apsd[95] <Warning>: Calculated minimum fire date [2013-06-13 16:29:31 +0800] (54%) with fire date [2013-06-13 16:36:26 +0800], start date [2013-06-13 16:21:24 +0800], minimum early fire proportion 0, power state detection supported: yes, in high power state: yes
Jun 13 16:26:24 unknown apsd[95] <Warning>: Calculated minimum fire date [2013-06-13 16:34:23 +0800] (54%) with fire date [2013-06-13 16:42:49 +0800], start date [2013-06-13 16:24:28 +0800], minimum early fire proportion 0, power state detection supported: yes, in high power state: yes
Jun 13 16:26:25 unknown mdmd[1405] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Jun 13 16:26:25 unknown mdmd[1405] <Notice>: (Note ) MDM: Telling MDM Check-In Server about new device token.
Jun 13 16:26:25 unknown apsd[95] <Warning>: <APSConnectionServer: 0xd624a20>: Initializing connection server with environmentName 'development' and connectionPortName '(null)'
Jun 13 16:26:25 unknown apsd[95] <Warning>: <APSCourier: 0x11dcb0>: Removing connection server <APSConnectionServer: 0xd624a20>
Jun 13 16:26:25 unknown mdmd[1405] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Jun 13 16:26:25 unknown mdmd[1405] <Notice>: (Note ) MDM: Telling MDM Check-In Server about new device token.
Jun 13 16:26:25 unknown apsd[95] <Warning>: <APSConnectionServer: 0xd624a20>: Initializing connection server with environmentName 'development' and connectionPortName '(null)'
Jun 13 16:26:25 unknown apsd[95] <Warning>: <APSCourier: 0x11dcb0>: Removing connection server <APSConnectionServer: 0xd624a20>
Jun 13 16:26:25 unknown mdmd[1405] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Jun 13 16:26:27 unknown mdmd[1405] <Notice>: (Note ) MDM: mdmd stopping...
Jun 13 16:26:27 unknown apsd[95] <Warning>: <APSCourier: 0x11dcb0>: Removing connection server <APSConnectionServer: 0xd61b820>
Jun 13 16:26:27 unknown apsd[95] <Warning>: <APSCourier: 0x119eb0>: Removing connection server <APSConnectionServer: 0x121fa0>
Jun 13 16:26:29 unknown apsd[95] <Warning>: Canceling system wake for [2013-06-13 16:42:34 +0800]
Jun 13 16:26:29 unknown apsd[95] <Warning>: Resuming push keep alive timer in normal mode with action PCActionMaintainPushKeepAliveInterval
Changed .mobileconfig push service to Production mode, still couldn't receive. I use github.com/notnoop/java-apns to simulate MDM push, nothing happened. I don't think push message or .mobileconfig file has mistakes, maybe there's something wrong about the cert file.
If somebody could offer some help or hint, it would be a great kindness. I've spent several days on it... Thanks.

Related

iOS APP Crash For Unknown Log

The following is the crash log I get.But,I don't konw what caused this crash.I'm using 7.2.1 version of Xcode and iOS 9.2.1,device is a iPod touch.I call a third SDK's init method,then the app crashed.Thanks
The init method:
[m_SoHaSDKClass initWithGameDelegate:self application:application];
The device log:
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: BSXPCMessage received error for message: Connection invalid
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: BSXPCMessage received error for message: Connection invalid
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: HW kbd: Failed to set (null) as keyboard focus
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: UNNotificationRegistrarConnectionListener connection invalidated
Mar 10 11:51:27 ceshi-9 com.apple.xpc.launchd[1] (UIKitApplication:vn.sohagame.sg69[0x1782][11313]) <Warning>: Service exited with abnormal code: 1
Mar 10 11:51:27 ceshi-9 com.apple.debugserver-#(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1
[11312] <Warning>: 1 +0.000000 sec [2c30/0f07]: error: ::read ( -1, 0x1f2189ec, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
Mar 10 11:51:27 ceshi-9 com.apple.debugserver-#(#)PROGRAM:debugserver PROJECT:debugserver-340.3.51.1
[11312] <Warning>: Exiting.
Mar 10 11:51:27 ceshi-9 gputoolsd[11309] <Notice>: schedule invalidation <DYTransport 0x176862b0, error: explicit invalidation (6)>
Mar 10 11:51:27 ceshi-9 gputoolsd[11309] <Notice>: schedule invalidation <DYTransport 0x17617560, error: lost transport connection (31)>
Mar 10 11:51:27 ceshi-9 gputoolsd[11309] <Notice>: terminating daemon 0x17524f20
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: Unable to get short BSD proc info for 11313: No such process
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: Unable to get short BSD proc info for 11313: No such process
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: Unable to get short BSD proc info for 11313: No such process
Mar 10 11:51:27 ceshi-9 com.apple.xpc.launchd[1] (UIKitApplication:vn.sohagame.sg69[0x581f]) <Error>: The DisableASLR key is no longer respected. Please remove it.
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: Application 'UIKitApplication:vn.sohagame.sg69[0x1782]' exited voluntarily.
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: Unable to get pid for 'UIKitApplication:vn.sohagame.sg69[0x581f]': No such process (err 3)
Mar 10 11:51:27 ceshi-9 SpringBoard[48] <Warning>: Bootstrapping failed for <FBApplicationProcess: 0x1d380bc0; vn.sohagame.sg69; pid: -1>
Mar 10 11:51:28 ceshi-9 UserEventAgent[23] <Warning>: 45831112213045: id=vn.sohagame.sg69 pid=11313, state=0
Mar 10 11:51:28 ceshi-9 SpringBoard[48] <Warning>: Application 'UIKitApplication:vn.sohagame.sg69[0x581f]' exited voluntarily.

iOS MDM enrollment fails in iOS 9 devices

This has been previously working for iOS 7 and 8 devices but now the enrollment fails for new iOS 9 devices. This is what I see in the device logs.
Oct 26 18:00:34 iPhone profiled[412] <Notice>: (Note ) MC: Enrolling in OTA Profile service...
Oct 26 18:00:35 iPhone profiled[412] <Error>: SecTrustEvaluate [leaf AnchorTrusted]
Oct 26 18:00:38 iPhone securityd[83] <Error>: securityd_xpc_dictionary_handler profiled[412] add Error Domain=NSOSStatusErrorDomain Code=-25299 "duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284" UserInfo={NSDescription=duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284}
Oct 26 18:00:38 iPhone profiled[412] <Error>: SecOSStatusWith error:[-25299] Error Domain=NSOSStatusErrorDomain Code=-25299 "duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284" UserInfo={NSDescription=duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284}
Oct 26 18:00:38 iPhone profiled[412] <Error>: SecTrustEvaluate [leaf AnchorTrusted]
Oct 26 18:00:38 iPhone profiled[412] <Notice>: (Note ) MC: Attempting to retrieve issued certificate...
Oct 26 18:00:39 iPhone securityd[83] <Error>: SecDbRecordChange db <SecDbConnection rw open> changed outside txn
Oct 26 18:00:39 iPhone profiled[412] <Notice>: (Note ) MC: Issued certificate received.
Oct 26 18:00:39 iPhone Preferences[406] <Notice>: (Error) MC: Install profile data, interactive error. Error: NSError:
Desc : Couldn’t communicate with a helper application.
Sugg : Try your operation again. If that fails, quit and relaunch the application and try again.
Domain : NSCocoaErrorDomain
Code : 4097
Extra info:
{
NSDebugDescription = "connection to service named com.apple.managedconfiguration.profiled";
}
Oct 26 18:00:39 iPhone com.apple.xpc.launchd[1] (com.apple.managedconfiguration.profiled[412]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Oct 26 18:00:40 iPhone ReportCrash[423] <Error>: assertion failed: 13A452: libsystem_trace.dylib + 15931 [45DE3123-E22D-320F-9F75-1CCD65A33451]: 0x0
Oct 26 18:00:40 iPhone Unknown[423] <Error>:
Oct 26 18:00:40 iPhone ReportCrash[423] <Warning>: os_activity_diagnostic_for_pid() failed!
Oct 26 18:00:40 iPhone ReportCrash[423] <Notice>: Formulating report for corpse[412] profiled
assertion failed: 13A452: libsystem_trace.dylib + 15931
means that your process "profiled" overran its allocated memory and was killed via the kernel/jetsam. iOS 9 has aggressive memory management and kills processes all over the place and even reboots the device nightly.
Just answering my own question. In order to create the X509 certificate from csr you need to create relative distinguished names (RDNs) and add it to the certificate. Once you get the X500Name from PKCS10CertificationRequest and set it to X509v3CertificateBuilder it throws this error. Rather you have to create separate X500Names and proceed with the certificate generation which solved this issue.

Per-App VPN for iOS7, Not connected to VPN on App Launch

I am not able to get the VPN turned on automatically when the app targeted for a per-app vpn connection is launched.
I have the following flags set in my VPN payload:
<key>VPNUUID</key>
<string>7EF39436-BE7B-DBFE-53E8-2FEB0ECD7D56.vpn</string>
<key>OnDemandMatchAppEnabled</key>
<true/>
and below is the Managed Setting command published to set the VPN for the target app:
<?xml version='1.0' encoding='UTF-8'?>
<plist version="1.0">
<dict>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>Settings</string>
<key>Settings</key>
<array>
<dict>
<key>Item</key>
<string>ApplicationAttributes</string>
<key>Identifier</key>
<string>com.vertex.iStocks</string>
<key>Attributes</key>
<dict>
<key>VPNUUID</key>
<string>7EF39436-BE7B-DBFE-53E8-2FEB0ECD7D56.vpn</string>
</dict>
</dict>
</array>
</dict>
<key>CommandUUID</key>
<string>4174923E-414D-8AB1-B5DD-2246647D895B</string>
</dict>
On installing the configuration profile, I get the below error:
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: mdmd starting...
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Looking for managed app states to clean up
Jul 11 17:02:59 Manmays-iPad profiled[218] <Notice>: (Note ) profiled: Service starting...
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Network reachability has changed.
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Network reachability has changed.
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Push token received.
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Received push notification.
Jul 11 17:02:59 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Polling MDM server https://dc27.mymdm.net/dccontrollerc/processresponse for next command.
Jul 11 17:03:01 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Jul 11 17:03:01 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Attempting to perform MDM request: InstallProfile
Jul 11 17:03:01 Manmays-iPad mdmd[217] <Notice>: (Note ) MC: Loaded VPNUtilities.framework
Jul 11 17:03:01 Manmays-iPad profiled[218] <Notice>: (Note ) MC: Checking for MDM installation...
Jul 11 17:03:01 Manmays-iPad profiled[218] <Notice>: (Note ) MC: ...finished checking for MDM installation.
Jul 11 17:03:01 Manmays-iPad profiled[218] <Notice>: (Note ) MC: Loaded VPNUtilities.framework
Jul 11 17:03:01 Manmays-iPad profiled[218] <Notice>: (Note ) MC: Beginning profile installation...
Jul 11 17:03:01 Manmays-iPad profiled[218] <Notice>: (Note ) MC: Profile “com.apple.mgmt.mymdm.mdmF3A9BD12-2E5E-A2D4-49D2-81F70C7571F9” is replacing an existing profile having the same identifier.
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: MKBDeviceLockAssertion: MKBDeviceLockAssertion (asserttype:3)
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: MKBDeviceGetGracePeriod: MKBDeviceGetGracePeriod() => (0,0,0)
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: MKBDeviceGetGracePeriod: MKBDeviceGetGracePeriod() => (0,0,0)
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: get_longlongvalue_for_key: failed to get GracePeriod
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: get_longlongvalue_for_key: failed to get MaxLifetime
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: MKBDeviceSetGracePeriod: MKBDeviceSetGracePeriod(-1,5,-1)
Jul 11 17:03:01 Manmays-iPad profiled[218] <Error>: MKBDeviceSetGracePeriod: MKBDeviceSetGracePeriod: from AKS 0
Jul 11 17:03:01 Manmays-iPad keybagd[46] <Error>: 0x295000 __update_system_keybag_block_invoke: Updating System Keybag
Jul 11 17:03:01 Manmays-iPad keybagd[46] <Error>: 0x295000 KBUpdateSystemKeyBag: Got opaqueStuff from ondisk keybag
Jul 11 17:03:01 Manmays-iPad configd[58] <Notice>: SCNC: stop, triggered by (58) configd, type IPSec, reason Service Disposed
Jul 11 17:03:01 Manmays-iPad configd[58] <Notice>: network changed.
Jul 11 17:03:01 Manmays-iPad keybagd[46] <Error>: 0x295000 KBUpdateSystemKeyBag: Saved new keybag with result 2707224
Jul 11 17:03:01 Manmays-iPad securityd[79] <Error>: CFPropertyListReadFromFile file file:///Library/Keychains/accountStatus.plist: The operation couldn’t be completed. (Cocoa error 260.)
Jul 11 17:03:01 Manmays-iPad securityd[79] <Error>: CFPropertyListReadFromFile file file:///Library/Keychains/accountStatus.plist: The operation couldn’t be completed. (Cocoa error 260.)
Jul 11 17:03:01 Manmays-iPad securityd[79] <Error>: CFPropertyListReadFromFile file file:///Library/Keychains/accountStatus.plist: The operation couldn’t be completed. (Cocoa error 260.)
Jul 11 17:03:02 Manmays-iPad profiled[218] <Notice>: (Note ) MC: Profile “com.apple.mgmt.mymdm.mdmF3A9BD12-2E5E-A2D4-49D2-81F70C7571F9” installed.
Jul 11 17:03:02 Manmays-iPad corecaptured[212] <Warning>: CCXPCService::setStreamEventHandler Woken up by notifyd.
Jul 11 17:03:02 Manmays-iPad configd[58] <Notice>: network changed.
Jul 11 17:03:02 Manmays-iPad corecaptured[212] <Warning>: CCProfileMonitor::profileCallback Entered token:4
Jul 11 17:03:02 Manmays-iPad profiled[218] <Error>: __MKBAssertionFinalize: __MKBAssertionFinalize(0x14562af0)
Jul 11 17:03:02 Manmays-iPad corecaptured[212] <Warning>: CCLogTap::profileRemoved
Jul 11 17:03:02 Manmays-iPad corecaptured[212] <Warning>: CCDataFile::profileRemoved
Jul 11 17:03:02 Manmays-iPad corecaptured[212] <Warning>: CCLogTap::profileRemoved
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Command Status: Acknowledged
Jul 11 17:03:02 Manmays-iPad afcd[90] <Error>: Checking for changed log settings
Jul 11 17:03:02 Manmays-iPad afcd[90] <Error>: valid 0 value 0
Jul 11 17:03:02 Manmays-iPad afcd[90] <Error>: Verbose logging disabled
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Polling MDM server https://dc27.mymdm.net/dccontrollerc/processresponse for next command.
Jul 11 17:03:02 Manmays-iPad mc_mobile_tunnel[221] <Notice>: (Note ) MC: mc_mobile_tunnel starting.
Jul 11 17:03:02 Manmays-iPad awdd[220] <Error>: CoreLocation: CLClient is deprecated. Will be obsolete soon.
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Attempting to perform MDM request: Settings
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Handling request type: Settings
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Command Status: Acknowledged
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Command Status: Acknowledged
Jul 11 17:03:02 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Polling MDM server https://dc27.mymdm.net/dccontrollerc/processresponse for next command.
Jul 11 17:03:03 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Jul 11 17:03:03 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Attempting to perform MDM request: ProfileList
Jul 11 17:03:03 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Handling request type: ProfileList
Jul 11 17:03:03 Manmays-iPad mdmd[217] <Notice>: (Note ) MDM: Command Status: Acknowledged
And below is the log when I launch the app:
Jul 11 17:04:19 Manmays-iPad mdmd[217] <Error>: TASK-ASSERT: cfurlcache - ProcessCacheTask - FAILED to get task-assertion, going commando with 16 items to process.
Jul 11 17:04:20 Manmays-iPad kernel[0] <Debug>: launchd[223] Container: /private/var/mobile/Applications/D0C06305-AA03-4A32-A8D2-51C55722814C (sandbox)
Jul 11 17:04:20 Manmays-iPad backboardd[28] <Error>: HID: The 'Passive' connection 'iStocks' access to protected services is denied.
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Warning>: Enabling Crittercism v4.3.1...
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Error>: Could not successfully update network info during initialization.
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Error>: Could not successfully update network info during initialization.
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Warning>: Crittercism - Using cached delegate list.
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Warning>: Crittercism successfully initialized.
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Warning>: Crittercism network monitoring: enabled
Jul 11 17:04:21 Manmays-iPad iStocks[223] <Warning>: Reachability Flag Status: -R ------- networkStatusForFlags
Jul 11 17:04:22 Manmays-iPad backboardd[28] <Warning>: |GuidedAccess|warning| SpringBoard server could not disconnect from frontmost app message service gracefully: (null)
Jul 11 17:04:23 Manmays-iPad iStocks[223] <Warning>: Crittercism - net data collection enabled, frequency: 10s
I am trying per-app vpn on a non-supervised device iOS7.1.2, I guess that is correct!!
Please help

Issue with iOS low memory crash but using very low memory - checked with instruments

I have a sample App that works fine on the simulator, but crashes on the device. I get the following output on the console from Organizer. It crashes within a short time.
Using instruments, memory leak, I see that the memory usage is about 2-3 mb. Using memory allocations, I see around 8-9mb for memory allocations and nothing in VM tracker.
The console output is given below. Can anyone kindly suggest what to do?
pr 26 11:46:37 unknown SpringBoard[15] <Warning>: Memory level is not normal (2). Delaying auto-relaunch of 'com.apple.mobilemail' for 30 seconds.
Apr 26 11:46:44 unknown SpringBoard[15] <Warning>: No valid 'aps-environment' entitlement string found for application 'SampleApp': (null). Notifications will not be delivered.
Apr 26 11:46:44 unknown SampleApp[14834] <Warning>: unique id: //someID
Apr 26 11:46:45 unknown SampleApp[14834] <Warning>: Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x2322ae {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
Apr 26 11:46:46 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
Apr 26 11:46:46 unknown com.apple.debugserver-64[14833] <Warning>: 1 [39f1/1303]: error: ::read ( 4, 0x2ff389d4, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Apr 26 11:46:46 unknown com.apple.launchd[1] <Notice>: (com.apple.atc) Exited: Killed: 9
Apr 26 11:46:46 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.fun.SampleApp.ios[0x2344]) Bug: launchd_core_logic.c:3730 (25147):3
Apr 26 11:46:46 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.fun.SampleApp.ios[0x2344]) Assuming job exited: <rdar://problem/5020256>: 10: No child processes
Apr 26 11:46:46 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.fun.SampleApp.ios[0x2344]) Job appears to have crashed: Segmentation fault: 11
Apr 26 11:46:46 unknown com.apple.launchd[1] <Notice>: (com.apple.mediaserverd) Exited: Killed: 9
Apr 26 11:46:46 unknown com.apple.launchd[1] <Notice>: (com.apple.ubd) Exited: Killed: 9
Apr 26 11:46:47 unknown kernel[0] <Debug>: launchd[14836] Builtin profile: mediaserverd (sandbox)
Apr 26 11:46:48 unknown lockdownd[21] <Error>: 2ffd4000 _receive_message: walk away - non-SSL 1
Apr 26 11:46:48 unknown com.apple.mobile.lockdown[21] <Notice>: receive secure message timeout!
Apr 26 11:46:48 unknown ReportCrash[14838] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-04-26-114648.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Apr 26 11:46:49 unknown mediaserverd[14836] <Error>: 11:46:49.618590 com.apple.AVConference: /SourceCache/GameKitServices/GameKitServices-344.3/AVConference.subproj/Sources/AVConferenceServer.m:1862: AVConferenceServerStart aborting - device doesn't support conferencing
Apr 26 11:46:49 unknown SpringBoard[15] <Warning>: Application 'SampleApp' exited abnormally with signal 11: Segmentation fault: 11
Apr 26 11:46:52 unknown atc[14835] <Warning>: Error: Connection invalid
Apr 26 11:46:53 unknown wifid[27] <Error>: WiFi:[357158813.1212122]: Client itunesstored is background application
Apr 26 11:47:07 unknown SpringBoard[15] <Warning>: Memory level is not normal (2). Delaying auto-relaunch of 'com.apple.mobilemail' for 30 seconds.
Apr 26 11:47:37 unknown SpringBoard[15] <Warning>: Memory level is not normal (2). Delaying auto-relaunch of 'com.apple.mobilemail' for 30 seconds.
Apr 26 11:48:07 unknown SpringBoard[15] <Warning>: Memory level is not normal (2). Delaying auto-relaunch of 'com.apple.mobilemail' for 30 seconds.
Apr 26 11:48:37 unknown SpringBoard[15] <Warning>: Memory level is not normal (2). Delaying auto-relaunch of 'com.apple.mobilemail' for 30 seconds.
Apr 26 11:48:49 unknown SpringBoard[15] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
ok, so it seems like everything was fine, I just needed to delete the app from the iPad and reinstall it... pretty weird... !!!

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