iOS Permission problems with phonegap build

0 favourites
  • 10 posts
From the Asset Store
Build Your Snowman
$2 USD
60% off
Create your own beautiful snowman in this fun game!
  • Hi,

    When I export my app using the cordova exporter, I only select the "Hide status bar" option. NOT the geolocation option.

    Then I upload my app to and download the ipa-file, then I install the app on my iPad and iPhone and when I open the app it pops up this alert:

    "Allow <App Name> to access your location even when you are not using the app?"

    I'm trying to get the app out on app store and Apple is asking why the app need the location permission and the truth is I just can't figure out how to get rid of it, any help is appreciated.

    This is my config.xml file, I've tried adding some extra things to remove the permission alter but without any luck so far:

    <?xml version="1.0" encoding="UTF-8"?>
    <widget xmlns="" xmlns:gap="" id="se.onemuppet.draw" version="1.0.0">
      <author href="" email="">David Borgenvik</author>
      <icon src="icon-128.png" width="128" height="128" />
      <icon src="icon-256.png" width="256" height="256" gap:role="default" />
      <preference name="permissions" value="none"/>
      <preference name="android-targetSdkVersion" value="21" />
      <preference name="orientation" value="landscape" />
      <preference name="fullscreen" value="true" />
      <gap:config-file platform="ios" parent="UIStatusBarHidden">
      <gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance">
      <preference name="deployment-target" value="8.0" />
      <preference name="android-minSdkVersion" value="21" />
      <preference name="target-device" value="universal" />
      <preference name="EnableLocation" value="false" />
      <!-- Optional splash screen image, e.g.: -->
      <!-- iPhone / iPod Touch  -->
      <icon src="icon-57.png" gap:platform="ios" width="57" height="57" />
      <icon src="icon-60.png" gap:platform="ios" width="60" height="60" />
      <icon src="icon-120.png" gap:platform="ios" width="120" height="120" />
      <icon src="icon-114.png" gap:platform="ios" width="114" height="114" />
      <!-- iPad -->
      <icon src="icon-72.png" gap:platform="ios" width="72" height="72" />
      <icon src="icon-144.png" gap:platform="ios" width="144" height="144" />
      <icon src="icon-76.png" gap:platform="ios" width="76" height="76" />
      <icon src="icon-152.png" gap:platform="ios" width="152" height="152" />
      <!-- Settings Icon -->
      <icon src="icon-29.png" gap:platform="ios" width="29" height="29" />
      <icon src="icon-58.png" gap:platform="ios" width="58" height="58" />
      <icon src="icon-50.png" gap:platform="ios" width="50" height="50" />
      <icon src="icon-100.png" gap:platform="ios" width="100" height="100" />
      <!-- Spotlight Icon -->
      <icon src="icon-40.png" gap:platform="ios" width="40" height="40" />
      <icon src="icon-80.png" gap:platform="ios" width="80" height="80" />
      <!-- Optional splash screen image, e.g.: -->
      <gap:splash src="splash480.png" gap:platform="ios" width="480" height="320" />
      <gap:splash src="splash320x480.png" gap:platform="ios" width="320" height="480" />
      <gap:splash src="splash960.png" gap:platform="ios" width="960" height="640" />
      <gap:splash src="splash640x960.png" gap:platform="ios" width="640" height="960" />
      <gap:splash src="splash_iphone5.png" gap:platform="ios" width="1136" height="640" />
      <gap:splash src="splash640x1136.png" gap:platform="ios" width="640" height="1136" />
      <gap:splash src="splash.png" gap:platform="ios" width="1024" height="768" />
      <gap:splash src="splash768x1024.png" gap:platform="ios" width="768" height="1024" />
      <gap:splash src="splash568.png" gap:platform="ios" width="568" height="320" />
      <gap:splash src="splash320.png" gap:platform="ios" width="320" height="568" />
      <gap:splash src="splash1334.png" gap:platform="ios" width="1334" height="750" />
      <gap:splash src="splash750x1334.png" gap:platform="ios" width="750" height="1334" />
      <gap:splash src="splash2208.png" gap:platform="ios" width="2208" height="1242" />
      <gap:splash src="splash1242x2208.png" gap:platform="ios" width="1242" height="2208" />
      <gap:splash src="splash2048x1536.png" gap:platform="ios" width="2048" height="1536" />
      <gap:splash src="splash1536x2048.png" gap:platform="ios" width="1536" height="2048" />
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ashley I have a thread going about this problem over at the phonegap build forums. The last response from Amir who is from the phonegap build team was that he suspected the c2runtime.js file to be the reason for the app making the location permission request at start up. I'm not sure that is the case but I would be very grateful if you could have a look at this issue.

    let me know if you have some time to look into this and if you need anything, files, more info etc.

    Here is the thread at the phonegap build community: ... tton&reply[id]=15227901#reply_15227901

    I'm attaching a screen shot of the project, not sure what good it will do but at least it can provide some context.

  • If anyone stumbles into this thread I have not solved this problem with phone gap buil yet, but I downloaded the cordova CLI and did it locally instead which worked without problems.

  • How easy was using Cordova CLI? I am only familiar with PhoneGap Build, which seems extremely pain-free compared to any actual coding. With CLI, would I actually need to write a fair share of code to build? I'm very much a newbie in the back-end process of going from Construct 2 to an actual app.

  • nal1200 hi there is no coding required. This is the guide that I used: ... The important stuff is in the black boxes.

    I use a macbook pro with windows using parallels. Then I can export from Construct 2 directly into the www folder of my cordova project and run the command, cordova build ios (when I'm in the project root folder) and it will pretty quickly build a new xcode project.

    Since I can test most of the features directly in the browser I don't have to export and build to xcode that often, but even when I do it is a pretty quick process.

    Gimmie a shout if you have any troubles and I'll try to answer .

  • Thanks much for the help. After a few hours sinking into the documentation and fiddling around in my virtual mac via, I was able to build via Cordova, then export through Xcode without the geolocation bug, yay!

    Ashley is this indicative of a possible bug in the Cordova export option in Construct 2?

  • The C2 runtime never makes any location requests, unless you add the Geolocation plugin and request the location, or use a third party plugin that does the same.

  • Ashley yeah it's a bug in the phone gap build servic, or it must be since it works with local CLI cordova.

  • I have just encountered this problem too. I'm making a kid's app and it has been rejected due to the location permission. Has anyone figured out how to solve this with phonegap build?

  • The problem seems to persist still, I recommend downloading and using cordova locally. Once you've got it running you will be able to build you projects quicker than with phonegap build (imo). I'm considering creating a program to help construct 2 developers use cordova locally instead of beeing stuck with phonegap build. But I'm not sure how big the interest would be though. If I get around to building it I'll probably upload it to the scirra store.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)