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 8418541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:21:51+00:00 2026-06-10T02:21:51+00:00

I am building an iOS app based on XMPP. When I send an XMPP

  • 0

I am building an iOS app based on XMPP. When I send an XMPP message from a client via XMPPFramework, I found the message of the delegate called instantly.

- (void)xmppStream:(XMPPStream *)sender didSendMessage:(XMPPMessage *)message

But my message contains lots of data, I am sure it cannot be sent so fast. Then the user puts the app to background, and the message is lost. How can I solve this problem?

  • 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-06-10T02:21:52+00:00Added an answer on June 10, 2026 at 2:21 am

    It seems that

    - (void)xmppStream:(XMPPStream *)sender didSendMessage:(XMPPMessage *)message;
    

    is called instantly, true, but:

    You can request up to 10 minutes of time if your application has entered background state to ensure that your request finishes:

    Article about the background states: http://www.macworld.com/article/1164616/how_ios_multitasking_really_works.html

    Apple Docs: http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

    The XMPPStream has a property enableBackgroundingOnSocket which you can set to YES:

    /**
     * If set, the kCFStreamNetworkServiceTypeVoIP flags will be set on the underlying CFRead/Write streams.
     * 
     * The default value is NO.
    **/
    @property (readwrite, assign) BOOL enableBackgroundingOnSocket;
    

    Note that you can run into issues with the App Store, when using this trick to “fake” the voip background mode as discussed here:

    iphone XMPP App run background

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

Sidebar

Related Questions

I am currently building an iOS app which utilises GameKit's turn based gaming api's.
I'm diving into iOS development and I'm building a navigation based app that wasn't
I'm in the progress of building an web-app that syncs with an iOS client.
I am currently building an iOS app that uses Kosmaczewski's Objective-C REST client/wrapper to
I'm building an iOS app which needs real-time updates from the server, and I'd
I'm currently building an iOS app via Xcode that utilises the corelocation.framework, but unfortunately
I am building an iOS App which displays video streams from a somewhat complex
I am building a ios app for ipad, in which the user will be
I'm building an iOS app and I have all the functionality going already so
Hey so I'm building an iOS app. The fist window is a login screen

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.