-1

I have been investigating in this feature for a long time. All I can find is a pure iOS native code that checks for the key "UIApplicationLaunchOptionsLocationKey" from the LaunchOptions, if it is found it calls the LocationManager to start it and keep on listening to the location updates. You can find this code in this github: https://github.com/voyage11/GettingLocationWhenSuspended

I need the same concept, but with a way to integrate it in Worklight, through cordova plugin or something. As I'm already creating the geofencing triggers using the hybrid Worklight APIs, I need to keep the geofencing alive even when the app is suspended/terminated and also if the phone is restarted.

Please I need you support urgently. Thanks

1 Answers1

0

Worklight provides the ability to create Cordova plug-ins.
You could implementing your own native code then, mimicking that from the Xcode project you've found on GitHub.

Read more here: Adding native functionality to hybrid applications

Idan Adar
  • 43,235
  • 10
  • 45
  • 83
  • Thanks for the reply, but the thing is I do not have native iOS coding experience, I want the same concept of the code but with geofencing, and that it can be integrated with my UI. I know If I managed to create it as cordova plugin I can, but I will have to learn native code to add geofencing in it. – Hala Aziz Apr 01 '15 at 10:01
  • You are asking for a functionality that exists only in the native layer of the OS, so you must write it in native code... – Idan Adar Apr 01 '15 at 10:22
  • Do you mean the geofencing functionality? I was able to do something like it using the enter/exit triggers in Worklight Hybrid APIs. But when running it on my iPhone, it is interpreted by the phone as location update, with a purple or grey arrow icon not the outlined purple arrow. So I guess now I will need to switch my app to a complete native one, right? – Hala Aziz Apr 02 '15 at 10:00