Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Background processing on iOS
QtWS25 Last Chance

Background processing on iOS

Scheduled Pinned Locked Moved Solved Mobile and Embedded
ios
7 Posts 3 Posters 3.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DRoscoe
    wrote on 16 Sept 2016, 13:05 last edited by
    #1

    My application runs on iOS (on iPad), using Qt. The application is being used for research so I need a way to transfer the generated log files from the iPad to a remote host on the network. I have a socket connection to the remote host, but I need to ensure that the transfer completes even when the app is suspended. I've started looking into setting up a background operation that will continue to run.

    Is this the right way to go with current iOS builds? Is there a Qt way to implement this? A Google search seems to suggest that Qt does not support background operations in iOS.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Sept 2016, 21:06 last edited by
      #2

      Hi,

      AFAIK, Qt currently doesn't implement anything specific in that regard but you can still do it natively. You have to register the type of background activity that your application is going to implement.

      Choose that correctly, otherwise you won't pass the app store review.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply 19 Sept 2016, 14:03
      0
      • H Offline
        H Offline
        hamer
        wrote on 19 Sept 2016, 11:10 last edited by
        #3

        You can use the iOS background processing (https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html). Background fetch could also work but I do not know if it supports large amounts of data. Also, it does not have time gurantees.

        D 1 Reply Last reply 19 Sept 2016, 14:03
        1
        • H hamer
          19 Sept 2016, 11:10

          You can use the iOS background processing (https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html). Background fetch could also work but I do not know if it supports large amounts of data. Also, it does not have time gurantees.

          D Offline
          D Offline
          DRoscoe
          wrote on 19 Sept 2016, 14:03 last edited by
          #4

          @hamer Thanks! Background fetch won't work. I'm thinking I will need to use NSURLSession.

          1 Reply Last reply
          0
          • S SGaist
            16 Sept 2016, 21:06

            Hi,

            AFAIK, Qt currently doesn't implement anything specific in that regard but you can still do it natively. You have to register the type of background activity that your application is going to implement.

            Choose that correctly, otherwise you won't pass the app store review.

            D Offline
            D Offline
            DRoscoe
            wrote on 19 Sept 2016, 14:03 last edited by
            #5

            @SGaist Thanks!

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DRoscoe
              wrote on 21 Sept 2016, 14:24 last edited by
              #6

              In the end, I decided to take a different approach. The only native iOS approach requires a web server running and an application backend to handle the file transfer. Since this application is designed to be deployed on-board a commercial aircraft and certification issues prevent the use of a web server.

              For the iOS app, I will instead be using my existing socket connection to redirect logging calls to the logging host, which is a custom app already deployed, rather than writing the logs on the device and transferring after the fact.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 21 Sept 2016, 15:57 last edited by
                #7

                Pretty complex setup to handle. Indeed, that's likely the best solution at this time.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0

                7/7

                21 Sept 2016, 15:57

                • Login

                • Login or register to search.
                7 out of 7
                • First post
                  7/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved