Posts

Post not yet marked as solved
0 Replies
277 Views
I activate the conditions as follows Unexpected operation found. Details are below Conditions and configurations used in the testing "Background Modes" Capability with "Location updates" checked on added the info.plist keys: NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationWhenInUseUsageDescription with description invoking startMonitoringSignificantLocationChanges using core location API invoking didUpdateLocations using core location API Using Background fetch (15 minutes) I just press the Home button without any gesture. A few hours after the app was stopped, didfinishlaunch, didenterBackground, background fetch, and didUpdateLocation code did not run, but the app started running again in the background from the point it was stopped. The wake-up time is random, and the app will freeze again within a few seconds of running again.(I took logs in all delegate functions related to the app life cycle in the AppDelegate file, but nothing was executed when the app was relaunched.) Is the above behavior normal? If it's normal, who wakes up the app? How do I prevent my app from restarting unexpectedly?
Posted
by h_susan.
Last updated
.
Post not yet marked as solved
2 Replies
343 Views
I activate the conditions as follows Unexpected operation found. Details are below Conditions and configurations used in the testing "Background Modes" Capability with "Location updates" checked on added the info.plist keys: NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationWhenInUseUsageDescription with description invoking startMonitoringSignificantLocationChanges using core location API invoking didUpdateLocations using core location API Using Background fetch (15 minutes) I swipe the app to switch from foreground to background mode, and stop the app without deleting it in the switcher. A few hours after the app was stopped, didfinishlaunch, didenterBackground, background fetch, and didUpdateLocation code did not run, but the app started running again in the background from the point it was stopped. The wake-up time is random, and the app will freeze again within a few seconds of running again.(I took logs in all delegate functions related to the app life cycle in the AppDelegate file, but nothing was executed when the app was relaunched.) Is the above behavior normal? If it's normal, who wakes up the app? How do I prevent my app from restarting unexpectedly?
Posted
by h_susan.
Last updated
.
Post not yet marked as solved
0 Replies
243 Views
I activate the conditions as follows Unexpected operation found. Details are below Conditions and configurations used in the testing "Background Modes" Capability with "Location updates" checked on added the info.plist keys: NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationWhenInUseUsageDescription with description monitoring for several beacon regions and invoking startMonitoringSignificantLocationChanges using core location API My app’s location authorization status set ‘WhenInUse’ add UserNotification in func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool. For that reason, If every app launches, a notification will be triggered in AppDelegate method Given the condition above applied, What I expect is that if the location permission is 'when in use', if I leave the app by swiping(I have not closed my application by force using "swiping up in the app-switcher screen"), the app will be suspended in the background after 30 seconds. However, on specific iOS(iOS 16.5.1~ iOS 17.1.2), when I bring the app to the background, the didUpdateLocation function continues to run. I confirmed that the location was updated for over an hour. Other iOS didn’t occur the issue under iOS 16.3.1.(Couldn't confirm 16.4) I wonder if this is normal operation. In addition, I also want to know why it is working differently between iOS versions. Thanks for your help in advance.
Posted
by h_susan.
Last updated
.