Can someone please comment on when we can get this modification made to the cordova-2.0.0.js file for PGBuild 2.0?
https://github.com/apache/incubator-c...
This is hugely important because our app no longer works when people upgrade their iPhones/iPads to iOS6. I am sure MANY users will find themselves in the same situation. It is truly unfortunate because we will have to re-submit an update through the Apple AppStore and wait until they approve it. But I am using PGBuild to make my binaries so is there any possibility that we can get this change made for PGBuild using Cordova 2.0?
I have updated my XCode environment to 4.5 and verified that this one change fixes the problem. I just don't have things set up to compile and build and ship to the Apple AppStore from there because we rely on PGBuild. Please PGBuild, we need you here.... Many thanks in advance!
https://github.com/apache/incubator-c...
This is hugely important because our app no longer works when people upgrade their iPhones/iPads to iOS6. I am sure MANY users will find themselves in the same situation. It is truly unfortunate because we will have to re-submit an update through the Apple AppStore and wait until they approve it. But I am using PGBuild to make my binaries so is there any possibility that we can get this change made for PGBuild using Cordova 2.0?
I have updated my XCode environment to 4.5 and verified that this one change fixes the problem. I just don't have things set up to compile and build and ship to the Apple AppStore from there because we rely on PGBuild. Please PGBuild, we need you here.... Many thanks in advance!
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
Posted 8 years ago
- 20 Posts
- 0 Reply Likes
Can this please be addressed? I'm really surprised this still exists in the current PGB .js in use.
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
So I figured out that I can work around this for iOS temporarily by placing my own modified version of Cordova-2.0.0.js into my www root and referencing that file instead of the generic cordova.js or phonegap.js. This works so that I can make a build that seems to now be working on iOS6. Trouble is, I seem to be running into one more incompatability. I will post up if I can figure out what that issue is, and of course how I can work around it as well. I hope this info helps you Chris, and anyone else.
- 20 Posts
- 0 Reply Likes
Hey thanks for the reply. I'm a little unclear on where to even download the fix from. I see it's committed in "master", but where is that as far as releases go?
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
Well, you can just type those few lines of code into your version of the file and that will work. Make sense?
- 20 Posts
- 0 Reply Likes
I get your concept, what I mean is where the d/l is to even have those "few lines of code". But I think I found the right stuff on github. Here's my current concept. I snipped just the FileReader.js stuff from cordova.ios.js and wrapped that in a namespace. I'm going to try to use just that one different class rather than an entire new cordova.js
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
I understand, and yeah that might work for you, kind of a modular way of addressing this. Mine is definitely a hack, but I hope that the hack will not be necessary when they fold this modification into 2.1 or higher. Let me see if I can explain it a little better for you though.. There is a cordova.js file that PGBuild packages up with your app, and it uses a different version of it for each platform (iOS, Android, etc.). So when you zip up your www directory you are not supposed to put a cordova.js file in there, but rather just reference cordova.js in your index.html and it will link up when PGBuild puts the correct file there for each platform. So in this case I just put my own (iOS) version of cordova.js into my www directory and called it cordova_mod.js and referenced that file in my index.html. Then PGBuild comes along and puts the (bad) vesrsion of cordova.js into the www folder but I use my own version so all is well on iOS anyway. Make sense?
- 20 Posts
- 0 Reply Likes
Yes, your concept makes perfect sense. What I was getting at is I don't know where to get the replacement cordova.js file from to do the same thing.
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
Oh, I see. Click on this link:
https://github.com/apache/incubator-c...
And then click on the Files Changed tab. Then click on the View file @ button. Then click on Raw. The resulting file gets dynamically built into cordova.js at some point when the Cordova team creates a new build of PhoneGap. You have the resulting cordova.js file when you download PhoneGap 2.0 from phonegap.com, so you can just take the cordova-2.0.0.js file that's in the iOS directory and find this portion of it and modify it. I hope that helps.
https://github.com/apache/incubator-c...
And then click on the Files Changed tab. Then click on the View file @ button. Then click on Raw. The resulting file gets dynamically built into cordova.js at some point when the Cordova team creates a new build of PhoneGap. You have the resulting cordova.js file when you download PhoneGap 2.0 from phonegap.com, so you can just take the cordova-2.0.0.js file that's in the iOS directory and find this portion of it and modify it. I hope that helps.
- 20 Posts
- 0 Reply Likes
Ok, yeah, so grabbed the latest cordova iOS version that has those 3 lines, stopped referencing phonegap.js and started referencing that in our bundle instead. Things work differently...still broken unfortunately. Let us know if you have more success.
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
Well, I did not grab the latest cordova iOS - I took the standard 2.0 and modified it to have those few lines. That way I know that I'm not breaking anything else in terms of dependencies between that .js file and the compiled/native components that they reference. Right now I am just arm wrestling with XCode 4.5 to try to get it to allow debugging on my iPhone 4S that is now running iOS 6, but once I get that working then I hope to resolve what should be the last issue. I believe that I got through the FileReader issue without creating any side effects, though, so I would recommend that you do it the way I describe here so as to avoid creating any other problems while adding those 3 lines of code. You have control over the .js file but you do not have control over the compiled/native code that PGBuild is snapping into your iPhone build. So just modify the .js file with the lightest touch possible.
- 20 Posts
- 0 Reply Likes
As a follow on to this, we have successfully handled this in the way Alan suggested. Thank you so much for the help.
In an unrelated matter, our .ajax() calls are all getting cached now where they weren't before. Even if we specify an explicit cache: false as a parameter (which I believe is the default for JSON requests) it still occurs in iOS6. We've resolved this by using a dummy query string parameter, but it's another annoying iOS6 quirk.
In an unrelated matter, our .ajax() calls are all getting cached now where they weren't before. Even if we specify an explicit cache: false as a parameter (which I believe is the default for JSON requests) it still occurs in iOS6. We've resolved this by using a dummy query string parameter, but it's another annoying iOS6 quirk.
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
DUDE, we were on the exactly same path here. I stayed up till 3:30 resolving that issue with Safari caching as well. Here is the StackOverflow post I created in the middle of it all:
http://stackoverflow.com/questions/12...
Looks like everyone else has solved this in the same manner. I am bleary eyed, but happy to report that I was able to resubmit my app on iTunesConnect by 3:30 AM EST......... And now, I wait.
http://stackoverflow.com/questions/12...
Looks like everyone else has solved this in the same manner. I am bleary eyed, but happy to report that I was able to resubmit my app on iTunesConnect by 3:30 AM EST......... And now, I wait.
- 3500 Posts
- 40 Reply Likes
Due to the thread inactivity, this issue is now closed.
Create a new issue if you have any other problem with PhoneGap Build.
Thanks
Create a new issue if you have any other problem with PhoneGap Build.
Thanks
This conversation is no longer open for comments or replies.
This conversation is no longer open for comments or replies.
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers


