iPhone and PhoneGap? Don't work

0 favourites
  • 4 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • After hours upon hours of testing I can say that c2 DOESN'T work on the iPhone with the latest phoneGap (1.5.0).

    On the simulator it works perfectly, once built and sent to the device it does not, and it's a construct problem, it looks (say it looks because it's IMPOSSIBLE TO DEBUG) like something throws an error and the screen remains blank. I tried to remove any reference to c2 and the "Your browser doesn't..." string appears perfectly (so no memory problem as all the assets are still in the app.

    Someone has any idea about this? Ashley, how do I debug c2? Possibly with some try catch blocks? Has someone been successful on testing ON the actual device (not on the simulator)?

    Thanks

  • have you tried not to include phonegap.js into the zip?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley I fixed it but I need your input. Basically c2 works perfectly, the problem is that this event:

    document.addEventListener("deviceready", function () {},false};

    Never fires! I tried also with true at the end after reading a question on stack overflow. But with no luck.

    I ended up using jQuery .ready and everything works as expected. It's very strange nevertheless as the standard example of PhoneGap works perfectly with deviceready.

    I hope I helped someone to avoid wasting 2 hours trying to figure out this thing.

  • Well, I finally got this, turns out I made a mistake.

    The new phoneGap (renamed Cordova) has two different js, one for iOS and the other for Android which are not interchangable. Be careful when developing for both!

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