This is a sample AI2Apps iOS App project.
Clone this project and open it with XCode then you run it with simulator.
- Check cokemoke file: If your AI2Apps is create by wizzard, it should come with 2 files "cokemake.config.js" and "setup.template.js". Some old template may not come with this file, you can just copy them from other projects you found has them.
- Review "cokemake.config.js", check if you need add more contents into it.
- Open a terminal and enter your project's dir.
- Run command:
cokemake app
- Wait for cokemake to make the package zip. When done, a "setup.zip" file should be found in your project's "dist" foler.
- Download "setup.zip".
- In your iOS project, you should find a "setup" dir (/app/setup). Remove all contents in this dir.
- Unzip "setup.zip" contents into "/app/setup" dir.
- Use XCode build and run your project again, you should see your AI Agent App running!
Safari should support debug iPhone Simulator's WebView instance. But I can't make it work... If you make it work, you can use Safari debug your app.
Currently I use VConsole inbuilt a on-screen-console to the app.
You need link your html with vconsole:
In your app's "app.html" file, find:
<!--
/*#{PreScripts*/
/*}#PreScripts*/
-->
change it to:
<!--
/*#{PreScripts*/
-->
<script type="text/javascript">
window.console=window.parent.console;
window.onerror=(err)=>{console.log(err)};
</script>
<!--
/*}#PreScripts*/
-->
- Device build support.
- Better console support.
- Example to add your own API.
- WebView dialog example, call from your own app.