3 Replies
      Latest reply: Sep 22, 2016 12:47 AM by eskimo RSS
      Firenze Web Division Level 1 Level 1 (0 points)

        How do you start an app using location update ?

        Thanks !

        Massimo Senatore

        Italy

        • Re: How relaunched location app when app is not active
          eskimo Apple Staff Apple Staff (7,835 points)

          What sort of location tracking are you using?

          Share and Enjoy

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

            • Re: How relaunched location app when app is not active
              Firenze Web Division Level 1 Level 1 (0 points)

              ---

                  var gLocationManagerWM: CLLocationManager = CLLocationManager()

                  var gStartLocationWM: CLLocation!

                  var gSpeedWM: CLLocationSpeed = CLLocationSpeed()

                  var gMyDistanceFilterWM:Double=10

              ---

                      self.gLocationManagerWM.delegate = self

                      self.gLocationManagerWM.requestAlwaysAuthorization()

                      self.gLocationManagerWM.startUpdatingLocation()

                      self.gLocationManagerWM.distanceFilter = self.gMyDistanceFilterWM

                      self.gLocationManagerWM.activityType = .fitness

                      self.gLocationManagerWM.allowsBackgroundLocationUpdates=true

                      self.gLocationManagerWM.startMonitoringSignificantLocationChanges()

                      self.gLocationManagerWM.desiredAccuracy = kCLLocationAccuracyBest

                 

               

              thank you

              Massimo Senatore

                • Re: How relaunched location app when app is not active
                  eskimo Apple Staff Apple Staff (7,835 points)

                  The significant location change API should resume (or relaunch) your app in the background when there has been a significant location change.  I don’t have a lot of experience with this myself but I’m pretty sure it works because lots of developers are using it.

                  How are you testing this?

                  Share and Enjoy

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