Copy link to clipboard
Copied
Whilst debugging, I normally kill the APP manually - so I completely missed this new occurrence in iOS 11..
Within just a few seconds of being moved into the background, for example when the user clicks the Home Button - the APP is now being killed by iOS.
We've set background execution:
NativeApplication.nativeApplication.executeInBackground = true;
We are implementing the obligatory deactivate listener which calls:
this.stage.quality = StageQuality.LOW;
Starling.current.stop(true);
In the app.xml we have:
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
<string>fetch</string>
</array>
<key>UIRequiresPersistentWiFi</key>
<array>
string>YES</string>
</array>
iOS 10.3.3 and earlier this is not happening..
Odd thing is, I'm not seeing any Crash Logs being written? In the Console just before the APP is terminated I'm seeing the following - it appears to move into the background - and then exits voluntarily?
Any help much appreciated.
SpringBoard default 02:26:15.029377 -0700 SpringBoard Application process state changed for com.testing.app: <SBApplicationProcessState: 0x1c5423fe0; pid: 1601; taskState: Running; visibility: Background>
WiFiPicker default 02:26:15.132320 -0700 SpringBoard WIFI PICKER [com.testing.app]: isProcessLaunch: 0, isForegroundActivation: 0, isForegroundDeactivation: 1
CoreMedia default 02:26:15.132418 -0700 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.testing.app with pid '1601' is now Background Running. Background entitlement: NO
SymptomEvaluator default 02:26:15.134983 -0700 symptomsd 1601 com.testing.app: BackgroundRunning (most elevated: BackgroundRunning)
SymptomEvaluator default 02:26:15.135115 -0700 symptomsd Entry, display name com.testing.app uuid 539F2752-06B3-3E36-BAB6-FADD517C6003 pid 1601 isFront 0
SymptomEvaluator default 02:26:15.135274 -0700 symptomsd Continue with bundle name com.testing.app, is front 0
SymptomEvaluator default 02:26:15.135380 -0700 symptomsd com.testing.app: Foreground: false
assertiond default 02:26:15.153614 -0700 assertiond [APP:1601] dump all assertions HWM:7 (deactivateAssertion): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133d279a0; "_UIRemoteKeyboard XPC disconnection" (finishTask:180s); id:…01ED14707EBD> [active]
<BKProcessAssertion: 0x133d4bfe0; "snapshot-task" (finishTask:180s); id:…9D6F567601C0> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.153705 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133d279a0; "_UIRemoteKeyboard XPC disconnection" (finishTask:180s); id:…01ED14707EBD> [active]
<BKProcessAssertion: 0x133d4bfe0; "snapshot-task" (finishTask:180s); id:…9D6F567601C0> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.155210 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133d279a0; "_UIRemoteKeyboard XPC disconnection" (finishTask:180s); id:…01ED14707EBD> [active]
<BKProcessAssertion: 0x133d4bfe0; "snapshot-task" (finishTask:180s); id:…9D6F567601C0> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.156675 -0700 assertiond [APP:1601] dump all assertions HWM:7 (deactivateAssertion): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133d4bfe0; "snapshot-task" (finishTask:180s); id:…9D6F567601C0> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.157056 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133d4bfe0; "snapshot-task" (finishTask:180s); id:…9D6F567601C0> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.157726 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133d4bfe0; "snapshot-task" (finishTask:180s); id:…9D6F567601C0> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.158503 -0700 assertiond [APP:1601] dump all assertions HWM:7 (deactivateAssertion): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.158873 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.159505 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.161390 -0700 assertiond Server invalidated <BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65>
assertiond default 02:26:15.161851 -0700 assertiond Process exited: <BKProcess: 0x133e136c0; APP; com.testing.app; pid: 1601; agency: Application; visibility: background; task: none; hostpid: 364>
assertiond default 02:26:15.162364 -0700 assertiond Client relinquished <BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65>
assertiond default 02:26:15.163203 -0700 assertiond [APP:1601] dump all assertions HWM:7 (CPUMON check): {
<BKProcessAssertion: 0x133f15de0; "FBSceneSnapshotAction:com.testing.app" (finishTask:180s); id:…C415CBDF7A65> [active]
<BKProcessAssertion: 0x133e385d0; "Suspending" (suspend:10s); id:…B42D19D850CD> [active]
}
assertiond default 02:26:15.275851 -0700 assertiond Deleted job with label: UIKitApplication:com.testing.app[0x744a][73]
assertiond default 02:26:15.276065 -0700 assertiond [APP:1601] Deleted launchd job with label: UIKitApplication:com.testing.app[0x744a][73]
assertiond default 02:26:15.276488 -0700 assertiond Checking for deferred bootstrap request for com.testing.app
FrontBoard default 02:26:15.276676 -0700 SpringBoard <FBApplicationProcess: 0x110386740; APP (com.testing.app); pid: 1601> exited voluntarily.
FrontBoard default 02:26:15.277535 -0700 SpringBoard [FBProcessManager] Removing: <FBApplicationProcess: 0x110386740; APP (com.testing.app); pid: 1601>
SpringBoard default 02:26:15.277608 -0700 SpringBoard Process exited: <FBApplicationProcess: 0x110386740; APP (com.testing.app); pid: -1> -> <FBApplicationProcessExitContext: 0x1c522fd60; exitReason: voluntary; terminationReason: (none)>
WiFiPicker default 02:26:15.277724 -0700 SpringBoard WIFI PICKER [com.testing.app]: isProcessLaunch: 0, isForegroundActivation: 0, isForegroundDeactivation: 0
SpringBoard default 02:26:15.278008 -0700 SpringBoard Application process state changed for com.testing.app: (null)
CoreMedia default 02:26:15.278211 -0700 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.testing.app with pid '1601' is now Terminated. Background entitlement: NO
SymptomEvaluator default 02:26:15.278609 -0700 symptomsd 1601 com.testing.app: Terminated (most elevated: Terminated)
SymptomEvaluator default 02:26:15.278960 -0700 symptomsd Entry, display name com.testing.app uuid (null) pid 1601 isFront 0
I found something that worked for us. It's bonkers and I don't blame anyone for not believing this but if this applies to your case, it won't take 5 minutes to give it a try.
I changed the 'platformsdk' path to the symlink which contains "11.0" at the end of it rather than the path to the directory that ends in "iPhoneOS.sdk".
Copy link to clipboard
Copied
We are seeing the same behavior. We thought it might be related to one of our ANEs or the AIR version we're using, but I was able to reproduce the behavior in a completely empty "Hello World" project with no ANEs and across different AIR versions including the latest. We use an ant script to make our builds which calls the commandline utilities as JARs using the <java> ant task.
This issue is affecting both of our apps currently on the appstore. It only happens on the iPhone on iOS 11, and not the iPad. Like you say, it doesn't appear to be a crash - the app simply exits, and according to the information in the logs, it is doing so for "no" reason. It happens in debug as well as release builds.
Through trial and error I found that using the IntelliJ GUI to package the .ipa file, the problem goes away. I'm currently trying to figure out what is different about the way IntelliJ compiles and packages the app that is different so as to not cause this behavior. I haven't tried the GUI option in Flex Builder.
How are you building/packaging your app?
Copy link to clipboard
Copied
I thought the same, and removed all ANEs and tried the previous version of AIR, 26, but the issue still occurs.
I'm packaging via the GUI option of FB and I've also tried ADT with the command line.. both result in this unwanted behavior.
How interesting that using IntelliJ GUI the problem goes away..
Adobe please jump in - this is surely going to be a problem that more users will see..
Copy link to clipboard
Copied
I found something that worked for us. It's bonkers and I don't blame anyone for not believing this but if this applies to your case, it won't take 5 minutes to give it a try.
I changed the 'platformsdk' path to the symlink which contains "11.0" at the end of it rather than the path to the directory that ends in "iPhoneOS.sdk".
Copy link to clipboard
Copied
That worked! You are an absolute champion mate, well done and thank you for sharing!
Copy link to clipboard
Copied
Could you please tell me the steps of changing the 'platformsdk' path to the symlink
Copy link to clipboard
Copied
If you are using the -platformsdk compiler flag with a value like:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
and the app is exiting when it goes to background, try a value like this instead for the -platformsdk flag:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
If you are not defining this flag then this probably doesn't apply to your situation
Copy link to clipboard
Copied
Thanks Peter ! You Rock