简体   繁体   中英

Xamarin iOS backgrounding app termination

I'm currently developing a timer app for android and iOS. I really care more about iOS for the time being, and even after following Xamarin's documentation on backgrounding, using messaging center calls to the appDelegate.cs class and then launching a background task with the platform specific code, I'm still having my app terminated.

Is there any way to put an iOS app as a foreground service, like on android. Or is a background service still the way to go? I am trying to allow the user to set a timer up to 23 hours in advance and show count down.

To those interested, another strategy I found was just setting a notification to go off, regardless of if the app is running or not. Then, you can just handle persistence instead of trying to make the app keep running!

Good luck to everyone!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM