Jump to content
Sign in to follow this  
calinutz

Application style

Recommended Posts

Is there any way to make the compiled app run as a standard app on the iPhone? I mean, NOT in the browser.

Can I have the app be shown on the desktop of iPhone (as an icon)like any other app, and when started get rid of the header and footer of the browser? Or something like that?

Presenting the app in the browser is not very appealing to me since I need to develop apps that behave,look and feel like regular apps on the iPhone. And considering the small desktop of a phone, and the big controls needed, I find it annoying to be forced to have fixed headers and footers, imposed by a browser, when that space could be used for the app itself.

Share this post


Link to post
Share on other sites

Smart allows you to write mobile apps using object pascal rather than javascript. So the same rules apply as when you would use jqtouch or Apple's own dashcode to do the job.

In order to turn your compiled javascript app - into a compiled iOS or Android app, you have to use phonegap.

 

Phonegap takes you html + js code and includes it as a resource file in a .exe stub. When this stub executes it creates a browser, sets it in fullscreen - and you html is loaded. It also disables some of the security stuff (like filesystem access and size of local storage and db access).

 

You can do exactly the same with a smart app as you would do with something created by Adobe dreamweaver -- except that you can use object pascal instead. Some javascript knowledge is a bonus, but you dont have to be an expert in the field. A few ASM sections with javascript snippets can get you a long way.

You can also check out the generates code by smart and learn from that.

 

Fullscreen:

1. When you open a smart app on your phone, select "add shortcut" and place the shortcut on the "desktop" of your iphone or ipad.

 

2. If you have checked the option "generate manifest file" and "serve manifest file " in the project options -- your app will be installed when you add a shortcut to it (see apple docs).

 

When you start the shortcut from the phone screen- it opens fullscreen, without any adress header or footer.

 

 

Note: When testing, i find it better to not serve the manifest, since that installs your app in the browser cache (and must be manually deleted). Just add a shortcut to the smart IP (shown in the browser window), and start that from your iphone or ipad -- it will then open in fullscreen.

 

You can fine-tune how the app behaves in the index.html file from within smart.

See the "meta" tags which define format detection, viewport etc..

 

 

Share this post


Link to post
Share on other sites

If you want to run in "airplane mode" you can also carefully package your entire application into a data url (http://dataurl.net/#about), then craft an instruction page that loads the data url into the browser. Once its there the user can save it to the home screen and it will operate as if it was a native application without requiring internet access. Keep in mind that if you take this approach, then all resources will need to be converted to data urls also and embedded in the html page or the app will need internet access to run.

 

This mode works best for one-off or custom applications that do not need to be deployed via the app store.

 

Share this post


Link to post
Share on other sites

PS: In the "tools" menu you have a wizard for turning an image into a URL, just like the dataurl website does. This is perfect if you want your app to load quickly and dont want to wait for external images.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×