I want to post a json using URLSession when the connection is active. For that, I'm using URLSessionConfiguration
and setting configuration.waitsForConnectivity = true
and it works fine.
my problem is when the App goes to background before the performing the Post and even the connectivity is available nothing happens ! so I changed URLSessionConfiguration
to use background mode:
let configuration = URLSessionConfiguration.background(withIdentifier: BackgroundSession.identifier)
configuration.waitsForConnectivity = true
but same problem :/ Is there any way to start the Post even the App is in background mode.