keep a connection alive in the background, not download task

I have a downchannel half-connection to the Amazon Alexa cloud

https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/manage-http2-connection.html#create

Now, if the APP enters the background, my connection will be broken. Even if I put it in the backgroundTask, I cannot maintain the connection through ping, How do I maintain this HTTP persistent connection when the APP is in the background, plz。

Answered by DTS Engineer in 714468022

How do I maintain this HTTP persistent connection when the APP is in the background

You don’t, at least not in general. See iOS Background Execution Limits for more… ahem… background on this. If you have follow-up questions, feel free to post them here, but make sure to include more details about your high-level goals.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

How do I maintain this HTTP persistent connection when the APP is in the background

You don’t, at least not in general. See iOS Background Execution Limits for more… ahem… background on this. If you have follow-up questions, feel free to post them here, but make sure to include more details about your high-level goals.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

keep a connection alive in the background, not download task
 
 
Q