Overriding CN1 native iOS code

11 views
Skip to first unread message

jv

unread,
Jan 25, 2019, 6:33:30 PM1/25/19
to CodenameOne Discussions
In the file CodenameOne_GLViewController.h, I would like to replace this following line:
#define CN1_REQUEST_LOCATION_AUTH requestWhenInUseAuthorization
 
With this line:
#define CN1_REQUEST_LOCATION_AUTH requestAlwaysAuthorization 

So that my app requests this permission instead. I already have my plist set up correctly, and am able to select "always" in the Settings app in iOS. I would just like the app to ask for "always" instead of "when in use." Is this possible?

Shai Almog

unread,
Jan 26, 2019, 12:43:12 AM1/26/19
to CodenameOne Discussions
Check out the developer guide section on location background modes. You would need to set ios.background_modes=location

veresp...@gmail.com

unread,
Feb 5, 2019, 12:32:41 PM2/5/19
to CodenameOne Discussions
Can you point me to where this is the the developer's guide? I do not see that string anywhere in the 744-page PDF

Shai Almog

unread,
Feb 5, 2019, 10:21:26 PM2/5/19
to CodenameOne Discussions
14.4.1. Location In The Background - Geofencing page 526 at this time (notice both values change with every revision).
Reply all
Reply to author
Forward
0 new messages