background preloader

Mobile Developing

Facebook Twitter

Writing a component for iOS using Delphi XE2 and FireMonkey. This article assumes that you are familiar with the basics of writing components for Delphi. It also assumes that you have downloaded and played with my Accelerometer demo for iOS. As you can see in the current demo, the code has a whole bunch of $IFDEFs in it. All of the accelerometer stuff is on the main form. What if you wanted to take it to a different demo? For instance, the main form contains this: procedure TForm1.FormCreate(Sender: TObject); begin UIAccelerometer.sharedAccelerometer.setUpdateInterval(1.0 / kAccelerometerFrequency); AccDelegatVar := AccDelegate.alloc; UIAccelerometer.sharedAccelerometer.setDelegate(AccDelegatVar); end; We shouldn't have to deal with setup code like this in project after project!

Here is the code for the accelerometer in its entirety. Let's break it down and go through each piece. Type TAccelerateEvent = procedure(x,y : Double) of object; Now, the class itself. Next up, our delegate. We need an instance of it: var AccDelegatVar: AccDelegate; That's it. Snippets | Corona™ Project Manager. Mobile App Examples | Sample Code. Learning Corona: A List of Corona SDK Tutorials, Resources & Tools. Ludicrous Software: Corona Textmate Bundle. The Corona Bundle for TextMate is designed to help TextMate users code their Corona apps more quickly. It contains a large number of autocomplete terms, commands, and snippets that make it that much easier to access the various Corona APIs using the standard TextMate keyboard/menu shortcuts. Getting the Bundle The bundle is hosted on GitHub.

You have two options for downloading/installing the bundle: If you use Git for version control, then you can checkout the bundle into your ‘~/Library/Application Support/TextMate/Bundles’ directory. Using the Bundle Once the bundle is installed, TextMate should automatically recognize .lua files when they’re opened.

If you’re not sure if there’s a snippet available for a particular method, you can either browse the bundle via the TextMate Bundles menu, or by typing the method name and hitting the ‘tab’ key. Here’s a short demo of how to use the bundle: What’s the Cost? The bundle is completely free. Latest changes 9 November 2011 24 September 2011.

Apple

Ansca Mobile's cross-platform mobile app development tool. BasicBuild your games or apps in record time and start monetizing with in-app purchases or ads.BUY $16/monthProPro adds advanced graphics, all Corona Plugins, analytics and much more.BUY $49/monthEnterpriseCall any native library (C++/Objective-C/Java) from your Corona app and do offline builds.CONTACT US Download Corona and you are automatically a Corona SDK Starter. You can build and publish your apps for free.Upgrade to Basic, Pro or Enterprise when you are ready for more functionality. Do you have existing apps? CoronaCards lets you take Corona’s richness and ease-of-use to any native app. Read on to learn why Corona SDK is the leader for 2D apps and games… Publish to all major platforms Corona SDK allows you to publish for iOS, Android, Kindle Fire and NOOK from a single code base. We’ll take care of the heavy lifting related to device and platform fragmentation, allowing you to focus on creating exceptional mobile content.

Build on industry standards. iOS development using FireMonkey: Working with the GPS and the Compass.