问题描述:

Trying to get phonegap to work on an iPhone.

With a completely blank project, except for jsconsole for debbuging and the cordova.ios.js file, I keep getting errors as soon as the app loads:

file:///var/mobile/Applications/19E49099-C481-44B4-8803-07A0390EA3B3/pplats.app/www/index.html:1link

TypeError: 'undefined' is not a function

I cant get anything more out of the stacktrace. Why could I be getting a TypeError? Completely running out of ideas here.

The HTML file:

 <!DOCTYPE html>

<html>

<head>

<title></title>

<script src="cordova.ios.js"></script>

<script src="http://jsconsole.com/remote.js?79F01FAA-19A6-40C2-B32F-7FEF1D5E3998"></script>

</head>

<body>

testing......

</body>

</html>

网友答案:

What does your project directory structure look like?

My guess is that this is related to the src="cordova.ios.js" link, have you tried specifying an absolute or root-relative (/path-to-file/cordova.ios.js) path to the js file?

相关阅读:
Top