0

Im building a location based application, where in i use CLLocation to get users device location. But my question, Is it possible to get users current/last know location from other apps in device which are already using Location services. So i can save the battery of iPhone? Just a thought. Not sure security issue? Or is it possible?

Thanks in advance

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Mahesh S
  • 309
  • 1
  • 11
  • 1
    You cant access other apps. – Siba Prasad Hota May 25 '16 at 15:35
  • 1
    What makes you think such a thing will save battery life? Two apps using location services at the same time uses no more power than one app using location services. – rmaddy May 25 '16 at 15:45
  • @rmaddy- May be he is not trying to use core location in his app. He is just trying to get location details from other apps that uses Core location services into his app. – Teja Nandamuri May 25 '16 at 15:49
  • @TejaNandamuri Please read the start of the question. The OP states they are using Core Location. – rmaddy May 25 '16 at 15:54
  • @rmaddy,Thanks for replay. Yes im using CLLocation, But my question was Can i get location stored in other apps without using CoreLocation from my apps. Was not clear about my question.. Apologies. – Mahesh S Jun 01 '16 at 10:09

2 Answers2

1

No. Apps are sandboxed. You can not access info from any other app.

Richmond Watkins
  • 1,342
  • 9
  • 17
  • 1
    ... and if it's efficient for the OS to use sufficiently-recent GPS coordinates that it already knows to service you, it will. You don't need to write these things for yourself. – Tommy May 25 '16 at 15:55
0

One word

NO

You can't access any info of other apps.

If you want to access any info, you have to jailbreak your iPhone, which Apple never allow.


From Apple,

Communication Between Apps Follows Specific Pathways
For security, iOS apps run in a sandbox and have limited interactions with other apps. When you want to communicate with other apps on the system, there are specific ways to do so.

For more details, take a look at this link

Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276