I have created a ruby on rails responsive web application, I wanted to try and use this code to develop a native iOS app and possibly an android app using Phonegap. I followed this tutorial https://www.youtube.com/watch?v=LjIKElAP6_A in an attempt to use my app on my iPhone. When I follow the tutorial and run the app on my iPhone I just get a blank screen.
I used the following commands to set up my phone gap app:
phonegap create myappios com.testrails.myappios Myiosapp
phonegap platform add ios
cordova plugin add org.apache.cordova.console
cordova plugin add cordova-plugin-device
I then used the following code in my index.html file within the phone gap app:
<html>
<head>
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript">
function onBodyLoad()
{
document.addEventListener("deviceready", onDeviceReady, false);
window.location.href = " http://localhost:3000/"
}
function onDeviceReady
{
//do your thing
}
</script>
<script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
</head>
<body onload="onBodyLoad()">
</body>
</html>
Followed by the command: phonegap build iOS
.
I just get a blank screen when the app is opened on my phone. I think the tutorial I followed is outdated, or maybe I have done something wrong. Can anybody see any blatant errors above? I have also looked into using Sencha and appcelerator but I'm not really sure what my best option here is.