revUp - Updates and news for the LiveCode community
Issue 113 | July 1st 2011 Contact the Editor | How to Contribute

Go Native with LiveCode and iOS
Access hundreds of native APIs

by Mark Taoilinn

LiveCode 4.6.2 has everything you need to make great iOS apps. We’ve partnered with MobGui to give your apps that distinctive iOS native look and feel. And for the first time you can now access hundreds of native APIs through the iOS externals interface. Give your end users a native experience with iOS and LiveCode.

The Apple Human Interface Guidelines put it best:

People appreciate iOS apps that feel as though they were designed expressly for the device.

With the recent launch of LiveCode 4.6.2 we’re bringing you some features and add- ons to let you do just that. 

A native iOS Look and Feel

The first thing your users will see with your app is how it looks. Ever since Apple released the first iPhones and iPads, iOS apps have a consistent look that gives users the confidence that their app is an Apple Native app. Small details matter: rounded corners and reflective shine on your buttons, pure white background with appropriate alpha transparency and anti-aliasing for your navigation bars. Then there’s the sizing to remember: iPhone screens are one size, iPads another, and all the buttons, nav bars, title bars and controls should reflect these differences. It’s a lot to think about and a lot to code for, but getting all the subtleties just right is crucial in ensuring your end users feel confident in your apps.

If only there was a quick and easy way to make sure that you get all these elements right for every iOS app you make.

Well, you’ve guessed it, now there is. Introducing MobGui - a new add-on for LiveCode available in the LiveCode Marketplace (and part of this month’s Marketplace 3 for 2 offer). Developed by splash21 the MobGuI add -on takes the drag and drop interface of the LiveCode IDE and does something quite clever with it. No more struggling to code a native look for your iOS app. Simply pick the size you’re working with (iPhone/iPad) and you’ll be given an appropriately sized stack, you can even specify landscape or portrait orientation. Then drag and drop a selection of iOS styled controls on to your stack. Those subtleties of appearance outlined in the Apple Human Interface Guidelines have already been thought of and skins can be added with ease. All of this takes no time at all (I made the interface above in a matter of minutes) freeing up your resources to do the coding that makes your app work the way you want it to. And coding what the app does is easy with LiveCode.

For the month of July MobGui is free with any new LiveCode iOS purchase or it can be bought as add-on from the LiveCode market place. Don’t forget that July is 3 for 2 month in the marketplace and MobGui is part of that offer too.

Hundreds of features in one - support for iOS externals.

It’s not just about the look of the app of course. As the Apple Human Interface Guidelines say “People expect to find iOS technologies in the Apps they use”.

From time to time you’ll want your iOS app to do something that LiveCode on its own can’t do. LiveCode 4.6.2 provides an externals interface so that you can extend the existing iOS feature set and include any native API using a lower level language. Now you can take full advantage of the amazing native features in iOS.

What does support for iOS externals mean?

The SDK included in LiveCode 4.6.2 allows you to call native iOS APIs and write your own added functionality for iOS apps. If there is a feature which LiveCode for iOS does not currently provide, you can now write that feature in C, C++, Objective C or Objective C++ and incorporate that feature into your LiveCode built app. 

The result is limitless support for iOS features... Anything you can write XCode can now be fully supported by your LiveCode app.

Don’t worry if this sounds daunting, our dev team have provided a great resource to show you how it’s done. Michael McCreary, LiveCode Tech Lead, have provided a video to explain the process in full - Michael walks you through the XCODE setup process, coding, compilation and integration of the final external in a LiveCode project, using the example of an external for monitoring battery levels in iOS. That example is just one of the sample externals we include with the SDK.

What sort of features can I add?

Anything you can think of! There is no limitation to the number of APIs you can include via the externals interface. One LiveCode developer is already working on externals for video recordings, another is preparing an external to access the iOS clipboard. Externals could be used image processing, barcode scanning, getting map data and even interfacing with iTunes. LiveCode built apps just got a whole lot more fun! 

Community involvement

We’re really keen to have as many iOS examples as possible available to the whole community. I’d love to hear about any projects you might be thinking of, or anything that you’re already working on. By sharing examples of externals we can save everyone the time of having to rewrite their own... and the whole community will benefit.

We have a dedicated iOS externals page which has everything you need to get started making and integrating iOS externals. As we get more examples of externals we’ll add them to this page. Please help us build up a resource for everyone - get in touch if you have any externals examples for us to add.

Elanor

About the Author

Mark Taoilinn is Sales and Marketing Manager for RunRev Ltd.

 

Main Menu

What's New

Marketplace three for two during July