From code to App

Home Forums Procoding From code to App

This topic contains 1 reply, has 1 voice, and was last updated by  audiocommander 6 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #825

    Gregoire

    Hi, I ve been programming with Processing professionnaly for Manu years and it is great.
    Now,of course, i need to switch to iPad tech.
    How can i get m’y code into an App, just an icon to tap to open?
    I export to Html5 but i dont even know where is my export done.

    I work on Ipadmini.

    Thanks!

    #826

    audiocommander
    Keymaster

    Hi Gregoire,

    you will find the exported project as HTML folder in Procoding’s iTunes documents directory. Assuming you have successfully exported your sketch, either:
    – connect your iPad to iTunes, go to the “Apps” Tab and copy the folder to your computer.
    – or tap the import button (to show the iTunes documents folder) and then tap on the blue arrow (of the respective row of your export folder) to transfer and open this export folder in another app of your choice (e.g. dropbox or similar…)

    Now, you have two possibilities:

    1. Make a Web-App:
    – take the folder and upload it onto your server. You will need a web-server for this. I suppose you have one, but there are many free and low-cost services available. The HTML export folder is purely client-based, that means, you don’t need any server-side magic like SQL or PHP.
    Most providers give you free webspace; if you don’t have one, see here: https://www.google.de/search?q=free+web+hosting

    – on your iPad, open Safari and enter the address of your uploaded project, e.g. http://www.yoursite/yourproject. It is important, that it runs on a web server (http://) and not on another computer (file://), else processingjs will complain about it. (HTML5/Canvas and Procoding.js based projects will work fine on a file:// basis as well, btw.)

    – Once you see your sketch in Safari Mobile, go to Safari’s Actions menu and select “To Homescreen”.
    Voilà: now you have your icon on the device and your sketch will run full screen (This is called a “mobile WebApp”).

    – Btw: this also works on Android and other platforms.

    2. Make a “Native” (Hybrid) App:
    – With this second possibility, you will need to have knowledge about native development. For iOS that means, you need Xcode and a developer account (with a 99$ per year account you’ll be able to run your app on real testing devices and use the app store; with a free account you can use the software simulator only).

    – Install Xcode, and create a single-view based app with a UIWebView. Add the HTML5 export folder as a local resource to your project and configure the webview to load the index.html.

    – This approach is much more complicated and requires you to have a least basic knowledge about Objective-C and Xcode. Also, you might have to edit the export folder as well to circumvent some of the local/remote loading problems processingjs is having with external resources (mainly images and classes in external files).

    Hope this helps,
    Best,
    Michael

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘From code to App’ is closed to new replies.