Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4572376
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:38:15+00:00 2026-05-21T19:38:15+00:00

An iPhone app, connecting to a remote server via TCP. The use scenarios are:

  • 0

An iPhone app, connecting to a remote server via TCP. The use scenarios are:

  1. app (user) sends data to server and server responds data back.
  2. server might send data to app while it does nothing.

Assume that if app does not send data to server for 30 minutes, server will close the connection. I want to keep the connection alive for 120 minutes even if user does nothing.

Case 1: if app is in foreground, I can use timer to send some do-nothing data to server. No problem.

Case 2: if user pressed Home and app went to background, what could I do? I don’t wan to show alert or something to interrupt user(he is away or playing games). I just wanna keep the connection alive for a longer period and when user comes back to the app, he found out that the connection will be still alive and be happy with that.

I have read documentations about background execution, multitasking, and local notifications of iphone APIs. I’m not sure whether if I can achieve Case 2.

Only use legal APIs, no jailbreaking.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:38:16+00:00Added an answer on May 21, 2026 at 7:38 pm

    Tapbots solved this problem with Pastebot by prompting the user to run a silent background audio track at all times.

    Note that Apple frowns on using hacks like employing the background audio or VOIP APIs to keep non audio or VOIP apps running (as evidenced by the ‘workaround’ described in the article above) so dabbling with these techniques risks rejection at the point of submission.

    Unfortunately, though, there is no legal API to keep a connection alive in the background. Perhaps they’ll introduce one in a future update to iOS, but you might consider submitting a feature request to voice your support for it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My iPhone app sends data persistently over the network, and can handle having the
I'm using a tcp socket connection between an iPhone app and a NodeJS server
My iPhone app can't seem to use soft keyboards that doesn't use the US-like
I wish upload a file into my iphone app via ftp ( wifi connection
An iPhone app which I am creating generates reports from a Core Data database
I'm trying to build an objective C app which posts data to a remote
I have an iPhone app that is a client for an existing server application.
I'm building an iPhone app that aggregates data from several different data sources and
I have an iPhone app that uses ASIHTTPRequest to transmit data input by the
I have a native iPhone app that connects to a client machine via sockets.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.