iPhone 4 – no camera, location or device info

  • 1
  • Question
  • Updated 9 years ago
As part of my test application I have a camera page which uses the full example here: http://docs.phonegap.com/phonegap_cam...

It works fine on android, but not at all on my test iPhone 4 (4.3.3)

The same is true for device, and location examples. It must be something I’ve done.

Does it work for anyone else? I’ve enabled the features in config.xml

Any ideas appreciated.

Time budget wise I only have a few hours left to evaluate phoneGap & build.
Photo of paul.michael.duncan

paul.michael.duncan

  • 8 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
What's the id of the app that is failing to build?

It may be an issue with referencing phonegap.js - perhaps there's an inconsistency on our end between the iPhone builds and Android ones.
Photo of paul.michael.duncan

paul.michael.duncan

  • 8 Posts
  • 0 Reply Likes
Hi Andrew, it was app 16874.

I had to rename phonegap.js to phonegap0951.js whilst trying to get blackberry builds to work.

I've also put it in a js folder.
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
The individual PhoneGap JavaScript files are different for each platform - it's a coincidence that the BlackBerry and Android ones happen to share a lot of code.

Because of this, PhoneGap Build generates a "phonegap.js" file in the www directory of each project for each platform. This one is specific to the platform that is being built. You do not need to upload a phonegap.js file; just include a reference to phonegap.js and we will automatically populate it for each platform.

Hope that's clearer.
Photo of paul.michael.duncan

paul.michael.duncan

  • 8 Posts
  • 0 Reply Likes
Yes, great! That worked. I renamed it phonegap.js and kept it in the root folder i.e. /assets/www/phonegap.js.

Thanks for your help
Photo of terry

terry

  • 10 Posts
  • 0 Reply Likes
I was also puzzled by this for a while, this worked for me!

I found a clue when I noticed that the sample application did not have a phonegap.js file included, and it was supposed to work!
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Please read my above comment - the phonegap.js file is automatically populated for each platform.
Photo of matthew mitchell

matthew mitchell

  • 1 Post
  • 0 Reply Likes
running this command in terminal will take you to your phonegap.js file as built for ios. you can use that. remember the phonegap.js files for each platform/SDK are not the same. (phonegap v1)

open /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www/

- geminiimatt