Documentations
MotherApp TutorialPart 2: Debug your app with MotherApp iPhone simulatorThe MotherApp mobile simulator is a Javascript and CSS library that can turn your website into an iPhone simulator for MotherApp HTML. Before submitting your website to us, you can use it to debug your site interactively. Download Apple's Safari (available on both Mac and PC) and see the example in http://simulator.motherapp.com/code/examples/widgets/restaurant.html.
Note: We try to make it as close to iPhone as possible, but it is still a simulator and it cannot show all the elements perfectly. But don't worry, when you submit the website to MotherApp, MotherApp doesn't simulate the iPhone as it creates the actual iPhone app. All your elements and layout will show up properly. Below shows a screenshot from the actual iPhone in full size
1. Include LibrariesFirst, include the library at the <head> tag as below:
<html>
<head>
<!-- using map -->
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAXs6fffdzf-Y3421qG3pbLhQLGfjVVVLUaA4cBvzBhgxmSoNFTxTKGYwqcMMc1_O3F2c1xUI6WyYfjg"></script>
<script>
google.load("maps", "2.x");
</script>
<script src="http://simulator.motherapp.com/code/src/gmaps-utility-library/labeledmarker/src/labeledmarker.js" type="text/javascript"></script>
<!-- base library -->
<script type="text/javascript" src="http://simulator.motherapp.com/code/src/mootools/mootools-core.js"></script>
<script type="text/javascript" src="http://simulator.motherapp.com/code/src/wf-iphone/iphone.js"></script>
<link rel="stylesheet" href="http://simulator.motherapp.com/code/src/wf-iphone/iphone.css"/>
</head>
<body>...</body>
<script>WF.initIPhone();</script>
</html>
Typically, we need to do 3 things:
2. MotherApp simulator options2.1. viewsource=yesUse "viewsource=yes" to view the MotherApp HTML side-by-side with the simulator. See an example in http://simulator.motherapp.com/code/examples/widgets/restaurant.html?viewsource=yes. It allows you to debug interactively. When you make a change in the HTML, save it and you will see the result immediately on the simulator.
2.2. mode=webappUse "mode=webapp" to make your site optimized for web browser. Currently it is optimized for Apple's Safari. In the future, we will extend it to the web browsers on other platforms such as Windows Mobile and Nokia's Symbian S60.
|





