3 Replies
      Latest reply: Dec 28, 2016 2:31 PM by eskimo RSS
      Petey Level 1 Level 1 (0 points)

        Hi all!

         

        Okay I think I know the answer to this one but I thought I'd check because it's been a while since I've looked into such a thing.

        I was wondering if it's possible to have an app check for updates even when it's not active.

         

        Thanks

        Pete

        • Re: Can an app update without being open?
          eskimo Apple Staff Apple Staff (6,480 points)

          I was wondering if it's possible to have an app check for updates even when it's not active.

          Updates to what?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: Can an app update without being open?
              Petey Level 1 Level 1 (0 points)

              Hey, sorry I hadn't seen the reply!

              My app lets you know if there are upcoming events in your area and it would be nice if it could check every week or so with my server to see if there were any and update the users local Notifications. So this would require it to run in the background and access the web. It's a very small download but I could imagine that might be a feature that isn't allowed.

               

              Thanks,

              Pete

                • Re: Can an app update without being open?
                  eskimo Apple Staff Apple Staff (6,480 points)

                  My app lets you know if there are upcoming events in your area and it would be nice if it could check every week or so with my server to see if there were any and update the users local Notifications. So this would require it to run in the background and access the web.

                  iOS has a mechanism for this, namely background fetch.  You learn more about it in the Background Execution section of the App Programming Guide for iOS.

                  However, if your app is not being run regularly by the user then it’s likely that your app will fall off the background fetch radar.  The best way to meet your requirements is to offload this periodic work to a server.  That is, have your server poll the event database and, if there’s anything relevant for this user, post a push notification.  That is power efficient (no code needs to execute on the user’s device) and reliable.

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"