AndyIbanez / andyibanez-com

Static website.
1 stars 0 forks source link

posts/background-execution-in-ios/ #4

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

Background Execution in iOS • Andy Ibanez

https://www.andyibanez.com/posts/background-execution-in-ios/

shantaramk commented 4 years ago

ProcessInfo.performExpiringActivity(withReason:using:) performExpiringActivity

shantaramk commented 4 years ago

In ProcessInfo, performExpiringActivity is object method not an class or static method.

//*** open func performExpiringActivity(withReason reason: String, using block: @escaping (Bool) -> Void)

//**It should like this ProcessInfo().performExpiringActivity(withReason:, using: )

We have call performExpiringActivity on class ProcessInfo instead of its object ProcessInfo.performExpiringActivity(withReason:using:)

AndyIbanez commented 4 years ago

Good catch, thanks. I’ll update that sample code.

merthkm commented 4 years ago

When the user presses the middle button on the device twice in a row, they can kill the applications in the background. When the application is like this, we cannot track it via GPS. How can I solve this problem?

For example; Can I restart the application with local push notification?

What procedure do I need to follow?

I'll be happy if you can help me.

sumitkale-zymr commented 3 years ago

Can we check battery charging state in background in iOS 13 and bellow iOS 13 till user open app, It may take 1 day to 2 day or more If yes how?