Reputation: 1334
The project I am working on involves passing control immediately from iOS phonegap to an external host (although using cache manifest, so not entirely external), via document.location.href, then accessing all phonegap's goodies in the (cached) external javascript.
Prior to iOS 6 and phonegap 2.1.0 this was working fine. Since I upgraded, the first thing I noticed is that console logging no longer gets passed to Xcode. I have created a new project using ./create and copied the new cordova-2.1.0.js (also tried with cordova.ios.js) into my javascript folder of the external content. I have then stripped my external index.html to simply
<!DOCTYPE html>
<html>
<head>
<script src="js/lib/phonegap/cordova-2.1.0.js"></script>
</head>
<body>
<button type='button' onclick='console.log("huf")'>click</button>
</body>
</html>
I have ensured all my paths are correct (a test in the javascript for the existence of cordova passes). Console logging works correctly before passing control to the external host.
No console log is shown in Xcode.
Anyone any ideas?
Upvotes: 3
Views: 422
Reputation: 1275
I just tried and for me it work. iPad 3 with iOS6 + PhoneGap 2.1.0 XCode 4.5.1
Are you sure the library loaded correctly? IT might be a good idea to add an ondeviceready event listener and put the logging in there. Also add an alert in there too so you know that your event fired.
Upvotes: 1