I'm using a third party library "Reachability.swift"
https://github.com/ashleymills/Reachability.swift
Followed this blog post to identify network event using Notification Center, So the change in network event can be identified dynamically in the foreground
https://blog.pusher.com/handling-internet-connection-reachability-swift/
My Requirement:-
I need to run a background service that uses Alamofire(Information not needed for alamofire) to push the locally saved SQLite data to the server whenever internet connection status is Active
Important note:- iOS Application should not run in the foreground, everything should happen in the background
Please help me out to understand the topic, Thank in advance!
You should fully read and understand Apple's excellent documentation on background execution: Background Execution
There are only a few application types that are allowed to run permanently in background mode:
Apps of those types must ask for specific permission to run in the background. Declaring a wrong type for your app may lead to app rejection by Apple.