Touch Object Creates Location Services Prompt on iOS

Report Construct 2 bugs here.

Post » Wed May 13, 2015 2:25 am

Image

Problem Description
Including the Touch object in a Construct 2 project prompts a location services request on first startup on iOS devices.

Attach a Capx
dl.dropboxusercontent dot com/u/1108862/Cordova%20Test.capx

Description of Capx
This is an empty project with only the Touch object included.

Steps to Reproduce Bug
  • Export project to Cordova
  • Zip contents of project and upload to Adobe PhoneGap Build
  • Load IPA file on iOS device

Observed Result
The application displays the following message to the user: "Allow "Cordova Test" to access your location even when you are not using the app?"

Expected Result
This prompt should not appear. There is no reason for the Touch object to request location services.

Affected Browsers
  • N/A

Operating System and Service Pack
Windows 7 Ultimate x64 SP1

Construct 2 Version ID
Release 200 (NOTE: This is still an issue in the 204.2 beta)
B
14
S
2
Posts: 73
Reputation: 794

Post » Thu May 14, 2015 3:52 pm

I think this is a bug in PhoneGap Build. The export from Construct 2 clearly specifies in config.xml:

<preference name="permissions" value="none"/>

However if you build the .ipa, rename to .zip, open and extract, the bundled config.xml file is a "hello world" style default which says nothing much about permissions, so I guess it might default to asking for location.

According to this thread: http://community.phonegap.com/nitobi/topics/how-to-i-turn-off-geolocation-when-using-phonegap-build - it sounds like it's been a problem before:
That's a good idea. My guess is, that PGB never built with your config.xml and took a default config instead. That has been reported several times before.


I'd report this to the PhoneGap Build service, I don't think it's related to Construct 2 at all, our export is trying to say that it does not require any permissions. Geolocation calls are made strictly only from the Geolocation object, so if that is not in your project, the C2 engine is not making any location requests.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,537

Post » Thu May 14, 2015 5:15 pm

I just rebuilt the version of my project with the Touch object intact and checked the IPA file. The "hello world" config.xml still has the "permissions none" flag despite throwing that location prompt when I install it.

I can report this to PhoneGap Build, but if you could recommend any temporary workarounds (some value in the Info.plist I could change?), it would be greatly appreciated. I was able to get my app approved in the App Store the first time around, but they rejected my update the second time around due to that prompt. So, it's effectively impossible to get any touch enabled C2 project approved on iOS as it stands (unless you get a lax reviewer, I suppose). PhoneGap Build is the recommended export method, correct? No alternatives with comparable performance?
B
14
S
2
Posts: 73
Reputation: 794

Post » Thu May 14, 2015 5:25 pm

I don't know, it definitely did not do this previously and we haven't made any changes to the Cordova exporter lately, so it seems the most likely cause is a change in the PhoneGap build system and that thread seemed to make it sound like it was a known/recurring issue too. Not sure what can be done since it already doesn't ask for location permission!

Does removing the Touch object prevent the prompt? I'm just wondering if it thinks the device orientation counts as location...
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,537

Post » Thu May 14, 2015 5:46 pm

It's definitely the Touch object. I spent a few weeks banging my head over this issue (even when it got approved the first time, I still had a handful of negative reviews because of the shady prompt) and finally nailed this down after slowly eliminating plugins from my project until it didn't give the prompt anymore.

If you build a C2 project without the Touch object and upload it to PhoneGap, it will NOT display the location prompt.

I appreciate your help and understand that it's out of your hands! It's just a very frustrating problem to have this late in the game, haha.
B
14
S
2
Posts: 73
Reputation: 794

Post » Sat May 16, 2015 3:48 am

Just would like to add that I've had this same issue. Got rejected because of it, even though 'permissions' in config.xml is set to none.

Device orientation could be a possible cause, I've forced it to portrait but maybe if it isn't forced it won't show up?
B
7
S
2
G
1
Posts: 8
Reputation: 568

Post » Mon May 25, 2015 6:40 pm

I'm having this same issue too, and as @donkeyspaceman says, it's the touch object.
Did you guys found any workaround?
I have 2 games rejected because of this. :( :x
B
5
S
1
Posts: 42
Reputation: 471

Post » Tue Jun 02, 2015 11:27 pm

It was recommended to me to use the Cordova CLI, but now I have a weird audio issue and don't know how to fix it. :/
B
14
S
2
Posts: 73
Reputation: 794

Post » Mon Jun 08, 2015 8:51 pm

Good to see that this is getting some discussion and making some progress (we know it's related to the Touch object now).

I haven't worked on this issue in nearly 5 months but I did have some dialogue with Petra over at PGB and did some of my own testing. None of it was conclusive. I was able to build with Cordova CLI which further supports the theory that it is an issue with how PGB is handling the touch object.

Keep me posted. Thanks all.
B
10
S
3
Posts: 12
Reputation: 695

Post » Tue Jun 09, 2015 12:02 pm

So I tried looking in to this disabling various features of the Touch object one at a time, and the prompt eventually stopped coming, and then I re-enabled everything, and it still didn't come back. So either iOS stops prompting after a while (making testing this extremely difficult), or it's sporadic, or it's somehow fixed already? I don't really know what is going on here. I still suspect it's Cordova making the location request, since it used to work.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,537

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest