The main reason for the skepticism for this question is, how it is being asked. I am also working in this location tracking on iOS domain for some time now, so I'll give you 4 points to think through and then continue your research.
Mostly people ask in context of Android where you have an option of running a service 24x7 and start GPS when your logic determines, there is some movement/motion specific to n number of use cases.
First, 24x7 does not exist in iOS. There is no concept of a service that will live on the device without user interaction for forever. Apple has some strict guidelines which are going to be even stricter in iOS 13, coming in September 2019, where Apple will remove the "Always Allow" permission for location based apps, when you ask for one.
Second, check your requirement. If you need to track the user's location while sleeping OR driving OR eating. There is a reason, why I am putting stress on the OR. You must distribute and categorize your use case first. If you simply ask, you need location in killed mode, you would probably find yourself good with one use case and failed in another. For example an app that detects user's movement in a vehicle can use Geofence to get updates when user breaches that geofence. In this case, you would somehow ask/predict user's daily routine and add a geofence probably at night, around his/her home. Thereby no usage of battery and resources during the idle usage. In the morning when user starts to move in the car, the geofence would breach and your app will get the update. From there, start the regular location updates and continue until your algo. detects that the trip is complete. All this is possible via the background capability of an app. If you don't know what are those, search and you could find your use case.
Third, even with the above use case, Apple will kill your app once the movement is slowed down and your app is not performing any operations based on LRU (The Least Recently Used) algorithm. So choose wisely which "Background Capabilities", your app can and will support.
Fourth, do you even want your app on the app store? If not, there are other use cases where people have found success by either using proxies or private API's, so search accordingly. I myself never used any of them, so can't suggest much.