The Young Persons Guide...

...to Becoming a Mobile Developer!

Page 3 of 4

Google Maps API – Intro

I’ve gotten down to the nitty gritty of actually making an app that uses Google Maps, which means finally trying to get a map on the screen and at least pick up my location automatically.

To get a basic Google Maps app up and running, its surprisingly easy! Yes, to just have the app pinpoint your location using GPS, its shockingly simple! The reason for this is that Google have done all the hardwork for you. All we, as developers, have to do is call the javascript file on the Google servers and hey presto. For example: Geolocation test . Yes, its that easy, providing you have internet access, obviously! The source code, if needed, can be found here: Maps source

In case you’re interested, there are lots of examples on Googles website here: Google Map Examples

So, now we have a basic application that detects the users location and centres the map on it. However, as you can see in the first link above, the zoom level is a bit too high. Also, we will want to add markers on the street corresponding to the coordinates of the bike stations, or whatever place of interest you’re intending to map. This is more complicated and will be covered in the next section! 😀

Brains! Delicious Zombie Brains!!

When developing for the iPhone, you have to be aware of its memory limitations. For example, the original iPhone had 128mb of RAM, the iPhone 3GS has 256mb RAM and the iPhone 4 has 512mb RAM. Its all well and good to develop solely for the iPhone4 and use a lot of memory, but then that excludes anyone with an older handset.

Also, take into account that the iOS (iPhone Operating System) itself will use up a sizeable chunk of that memory too, and then you’re left with about the same amount of RAM that, say for example,  a Windows 98 PC would have had! iPhone4 specs are 1Ghz, 512mb RAM so maybe a high end Win98 machine! FYI, the iPad is similar specced to the iPhone4, eg same CPU but only 25mb RAM!!

So, what I’m trying to say is, Memory Management is important. Even more so with the limited resources found on mobile devices, like the above Apple products, and also Android phones and the new Windows Phone 7.

We saw in a previous chapter on Memory, Constructors, Destructors, new, alloc and init how to create objects, allocate space in memory, and initialise them, so you should be familiar with that concept.

Now, thats all well and good, but what the hell has that got to do with Zombie Brains???

When debugging, we can use a feature of XCode called “Zombies”. If we allocate space and release it, as we should since we’re such good programmers, then if we have a momentary lapse of concentration and continue coding somewhere else and try make a function call on this object, which has already been released, then we should expect and error. The problem here is, XCode will only give a very general error, eg “objc[123]: FREED(id): message release sent to freed object=0x213d2” or something similarly cryptic. If you are developing a large program with a lot of code, its pretty hard to pinpoint the exact object that you released earlier and subsequently made a call to.

With Zombies enabled, you will be able to find out what type the object was, so that will narrow down the search to a smaller area of code. It will tell you this with an error message similar to this:

NSInvocation: warning: object 0x1234f of class ‘_NSZombie_myClass1‘ does not implement….blah blah blah

The bolded part is the important part. You can focus your search on objects of that type only. It might not make a big difference on small apps, but on large ones, it will save a good chunk of searching!!

So, how do you enable Zombie mode?

On the left pane in XCode under “Groups & Files”, scroll down to “Executables” and expand. Double click on your app name (or right click-> Get Info) and when the new windows pops up, make sure you’re in the “Arguments” tab. Now, in the bottom box where it says “Variables to be set in the environment”, click the “+” button to add a new entry. Type in “NSZombieEnabled” and give it the uppercase value of “YES”.

Congratulations, you now have Zombie Brains in your code!!

SQLite – Database Intro

Since I finished my exams last week, I’ve began working on a little small personal project. In my research for that, I’ve come across SQLite.

For those of you not familiar with it, SQLite is basically a really light database, built in C, that doesnt require its own server, thus requires no installation of any kind. You can literally just include the database file and not have to worry about anything else.

Using Visual Studio 2010, you can do one of two things:

  1. Get the installer from sqlite.phxsoftware.com that automatically integrates with Visual Studio, or
  2. Download the SQLite DLL and add it as a reference in your Project Solution.

The first option is probably easiest, as you can use Visual Studio to create and edit the database through Server Explorer, eg right-click on Data Connections, select New Connection and select SQLite.

The second way, you will need to get 3rd party software to create and edit the database. Of course, you’ll probably be writing software that does edit your database, so you just really need the DB created initially. I’m not sure if it can be edited within Visual Studio, but I could be wrong, as I was using the first method in my testing.

SQLite is really handy for small projects, and portable projects, and in fact, is probably the most widely used database in the world!! Firefox uses SQLite, iPhones use SQLite, and probably a lot of other mobile platforms like Android might use it too! This isnt even taking into account all the private projects developers use it for, and a lot of other personal projects, like mine! With Firefox and iPhone alone though, it still covers a wide user base!

Anyway, to tie in with my college project, I’ve decided that SQLite will be the official database technology of the iPhone app. I’ve used mySQL before so have experience with using SQL statements and SQLite uses most of them, with the exception of GRANT and a few others that I won’t be using anyway!

Is there a better database solution than SQLite for lightweight, portable, speedy applications? Let me know…

Eoin

I’m taking a break due to exams

You may have noticed I havent made a post on here in a week or so.
this is because I’ve been hard at work studying for my end of semester exams, which started 2 days ago! I have a web design exam in less than an hour, and as part of my “procrastination plan” I am writing this blog post!

Anyway, just a heads up! I’ll post up another update when I get back into learning Objective-C next week after my exams! 😀

Eoin

Memory, Constructors, Destructors, new, alloc and init

Quite the catchy title, eh??

I have been looking into some memory management techniques in Objective-C. I’m used to the way C/C++ and many other languages do it, by using the “new” keyword.
In Objective-C, this is done differently.

While you CAN declare a class variable like this:

myClass *object = new myClass;

it is not the most common way. Instead, its more commonly seen like this:

myClass *object = [[myClass alloc] init];

The “new” keyword allocates a space in memory to hold the object. It then initialises it, probably with a constructor and can give variables a default value. So thats 2 things it does. Allocates and initialises. In Objective-C, these are done independantly.

Also, note the nesting of the square brackets. Its making 2 calls, but just doing it in a more readable way.

I mentioned constructors above, and I’ll show you now how to pass a variable to the “constructor”.  Note, I don’t think they’re actually called constructors and destructors outside C++, but just go with it anyway…. 😉

So, in C++, you would create an object and initilise some string/variable like so:

myClass *myObj = new myClass(“Hello World”);

In Objective-C:

myClass *myObj = [[myClass alloc] initWithString:@”Hello World”];

See how we are initialising with a string? This can also be done with contents of a file or URL, as well as many other options (In XCode, press ESC to see a list when it prompts for auto-completion). For example,

myClass *object = [[myClass alloc] initWithFormat:@”Hello, my name is %@ and I am %d years old”,name, age];

Obviously you also need the back-end to handle these initialisations.

Autorelease Pools

Lets say you create an object that contains a method which in turn creates a new object called myAddress, assigns it a value, then return this value, eg “return myAddress”. You will obviously have to release this object to obey proper memory management rules. Since you need to do your tidy up before calling the “return”, how can you destroy the object but still use it on the next code line without getting a compile error? In Objective-C, we use [myObject release] instead of “delete myObject” like in C++. For example, in C++ pseudocode:

main
{
myClass *obj1;
myClass *obj2 = obj1.returnAddress();
}

myClass obj1::returnAddress
{
myClass *myAddress = new myClass("123 City Road");
delete myAddress;
return myAddress;   // Will cause error
}

So, instead of delete myAddress, Objective-C would read [myAddress release]. Now, stay with me here for a minute while I explain the answer to this problem! Objective-C has the “Pool”, which is like a queue of objects that need to be deleted. When you release an object, it gets deleted straight awat. Now, if you use the “autorelease” keyword in place of “release“, you’ll see some magic happening. You see, autorelease puts the object into the pool for deletion but indicates that its still needed for the moment. The Pool will simply wait a few milliseconds and then just go ahead and delete it. The thing here that I am uncertain about is if it just takes a guess and deletes it whenever, or if it watches the object to wait until it goes out of scope. I’d imagine the latter is how it happens, but I’ll need to look into it. Here’s the corrected code in Objective-C(note the return type in the brackets):

-(myClass) returnAddress
{
myClass *myAddress = [[myClass alloc] initWithString:@"123 City Road"];
//[myAddress release];    // Will cause the return statement to crash
[myAddress autorelease];  // Works fine
return myAddress;
}

Destructors

We saw above how to initialise data types in constructors, using the initi keyword. Now I want to quickly show you destructors.

The default destructor is always called “dealloc” and is also always predefined, in case you don’t supply your own. Since its already defined in the header file “Foundation.h”, in Objective-C we need to tell the compiler which one we want to use, so it doesnt get confused. This is done with the “super” keyword. See below:

-(void) dealloc {

// Clean up

[super dealloc];

}

And there you go!

My second attempt at a hackintosh: HP NC4200 laptop

With the knowledge I gained from putting Mac OSX Snow Leopard on my MSI K9AGM3/AMD Athlon64 X2, I decided to put it on my laptop as well, so I can bring it into college with me and work from there.

The specs of my laptop are as follows:

  • HP NC4200
  • Intel Centrino 1.8Ghz
  • Intel 900 series motherboard (I think)
  • 1GB RAM
  • Intel 2200bg wireless (iwi2200)
  • Intel VGA 915GM GMA 900 (could also be GMA950, not sure)
  • AC97 audio
  • Broadcom BCM5751M Eternet

I had originally tried to copy exactly the method for my first Hackintosh, but this gave me problems. On every boot, I got “Waiting for DSMOS“. I looked up some possible fixes, including replacing FakeSMC.kext and disabler.kext but nothing I seemed to do would work(EDIT: I found a fix for this. Don’t use mach_kernel!!)

I then looked into getting a different distribution of Mac Snow Leopard. The first one I came across was called iPortable OSX86. This is a USB loading version promising to work out of the box on any Intel machine, no questions asked! Quite the promise, and I was a bit skeptical, but I gave it a go anyway. I used Mac Leopard from VMWare to prepare the USB stick, and to my surpise…Kernel panic on first boot! This distro is actually designed to boot off a USB stick, not to install from USB. On first boot, it takes you through the process of setting up a new user account, as a normal Mac would, after a fresh install, and then it loads up the desktop directly off the USB stick!!! So you can go to any Intel PC, stick in the USB drive and you’ll have your personal Snow Leopard desktop in a minute or so!

So, intially I was getting a kernel panic on boot relating to ElliottForceLegacyRTC.kext. Simply removing this solved the kernel panic and then I could load up Snow Leopard without any problems!! Success! Almost. There was a few problems, mainly that there was no system clock, or Real-time Clock (RTC – Remember the kext I removed?). Also, when I tried to install anything, it would take maybe 5 attempts for the install to go through. It would either hang on “examining additional disks” or hang on “Preparing for installation“. Another problem was that it would not unmount drives a lot of the time, which is possibly related to the install issues.

Anyway, what I decided to do was, from the USB sticks desktop, prepare my laptop hard drive as if it was a USB stick that I was preparing for iPortable OSX86. So in other words, I was installing a portable version on a non-portable hard drive….makes sense?? 🙂

So I formatted the hard drive, making sure to check the MBR option. Used CopyCatX (included with iPortable OSX86) to apply the included image to the hard-drive and also used iPortable BootFix to make the drive bootable. This gave me the same ElliotForceLEgacyRTC.kext kernel panic so I just booted up into Windows 7 (Oh ye, did I neglect to mention I was dual-booting?) and removed the kext from System/Library/Extensions. I should point out, you will need MacDrive8 to access Mac OSX drives from Windows.

So, now I had a laptop dual-booting with Windows7 and Mac Snow Leopard. The only problem was I still had the above mentioned issues on the Mac. Not to mention no sound, video acceleration and no trackpad clicking (you know you tap the trackpad and it counts as a left-click?). I solved the audio problems with the AppleAC97Audio.kext, which can be found easily enough. I also enabled graphics acceleration (QE/CI) with these GMA900 kexts. The main problem I’m worried about is getting the RTC working. If I manually set the clock, it resets the CMOS so next time I boot into Windows, the clock is also reset. Its a bit of a pain, especially since if your clock is set before the date Snow Leopard was released, it warns you that Applications will behave erratically!

For fixing the RTC issues, apparently you need to patch your DSDT. This basically extracts stuff from your motherboard and changes it to suit the Mac. There is a DSDT patches that comes with iPortable, that I used to generate a dsdt.aml file, which is supposed to fix everything! I tried this but I couldnt get it working so I’m still stuck with no clock, and that issue with installing software. Also, I have a hunch that using this dsdt.aml file somehow helped me get QE/CI working, but I’m not sure.

For my wireless, apparently there’s no support for iwi2200, but luckily I had a USB wifi card with the RTL8187 chipset. This does come with manufacturer support so works perfect with the installer that you can get from their website. I never did manage to get my onboard (BCM5751M) ethernet card working.

So, as it stands, I have Snow Leopard booting fine with the chocolate_kernel (one of 5 included with iPortable OSX86), I have audio, wireless, QE\CI,no clock (RTC) and no ethernet. I also managed to install the latest iPhone SDK, after about 10 attempts and it runs and compiles seemingly fine. I was getting a problem when trying to load Interface Builder though. It just used to hang on load, with its icon jumping around in the Dock. This resolved itself after I installed the proper kexts for my graphics card, and enabled QE/CI. I have no idea if they are related or not, since I don’t have Quartz enabled on my other hackintosh and Interface Builder works fine on that!

I should also point out another thing. I kept getting a Kernel Panic every time I went into System Preferences. During one such Kernel panic, I managed to corrupt my boot sector and succumbed to the dreaded “Boot0: Done” error. For this, I had to eventually switch the active partition to the Windows “System Reserved” partition, and edit the Windows Boot menu using BCD-Edit. The bootloader that came with iPortable just died so was unusable. When you use BCDEdit in Windows, it uses Chameleon bootloader, which I was able to boot the mach_kernel with. However, since that causes a “Waiting for DSMOS” error, I had to boot from that USB stick, run OSX86Tools, click “Install Kernel”, select the “Chocolate_kernel” and install that. OSX86Tools just renames the kernel to mach_kernel, so now I have chocolate_kernel just renamed to mach_kernel and it works fine now. 😀

So now you’ve got a Mac, what are you gonna do with it?

Finally, we can now get onto the reason I created this blog! Learning Objective-C!

I’m doing some online tutorials to get the basics right. Since I’m coming from a C and C++  background, I was expecting a lot of similarities. However, there seems to be some fundamentals differences in syntax.

For example, lets take Hello World in a few languages:

printf(“Hello World”);  // C

cout << “Hello World”; // C++

NSLog(@”Hello World”); // Objective-C

First thing,  why the hell is there an @ symbol there??? Secondly,what the hell is NSLog???

Well, the @ symbol is there to tell Objective-C to expect a string. Thats just how it works.

Secondly, NSLog comes from back in the 80’s before Steve Jobs took over Apple. He was working on the NextStep language (NextStep => NS, see?) so when he did become boss in Apple, he rather biasedly (is that a word???) used the NextStep platform to build Mac OSX. So even though its evolved to use Objective-C, they still use the foundation classes from NextStep. FYI, don’t mind the capitalisation of NextStep. It can be written as any of NeXTSTEP, NeXTstep, NeXTStep, or NEXTSTEP.

So anyway, from my first lesson in Objective-C, I have spotted another oddity. This time to do with calling methods in classes. See below:

myClass.doFunction(); // C++

myClass.doFunction(myValue); // C++

[myClass doFunction]; // Objective-C

[myClass doFuction:myValue]; // Objective-C

Thats for calling methods with zero or one parameters. I’m currently trying to get my head around sending 2 parameters in Objective-C! I need to find some example code….

Success: My first Mac!

If you read my previous post about the Hackintosh, you will have noticed I was trying to work up a solution on my own AMD PC so that I could run  MacOS Snow Leopard. Well, I have finally managed to get it working, for the most part.

My Specs:

MSI K9AGM3 motherboard FD/F

AMD 690G chipset MS-7367

AMD Athlon 64 X2 Dual Core 4000+ 2.10Ghz

2GB RAM

VGA: Onboard ATI X1200

Sound1: SB600 chipset ALC888

Sound2: Creative Audigy 4

NIC: Realtek RT8111B

Now, nothing there is the same, or even similar, to any hardware shipped in a Mac, so I’ve had to trawl the internet for kexts (Mac Drivers) to support my hardware. Also, as its not an Intel, I cannot use the default “Vanilla” kernel and Snow Leopard DVD. Because of this, I have employed the use of my trusty Imation Nano Pro 16GB USB stick to do the job for me!

Here’s how I did it:

Step1: Prepare the USB Stick.

For this, you need either a working Mac, or a VMWare image of a Mac. So, boot up the Mac, or VMWare image, and open Disk Utility, which is located in System-> Applications Folder. Insert the USB stick and select it from the left column. Go to “Erase”. Under “Volume Format” you need to select “Mac OS Extended (Journaled)”, name it whatever you want and click “Erase”. This will make your USB stick compatible with the Mac, and allow reading and writing to it.

I’ll assume you have an .iso image of Snow Leopard handy, which you made yourself somehow, or downloaded. So while still working with the USB stick, select “Restore” from the top right of Disk Utility. You will now need to drag your iso into the text box for “source”, and drag the USB partition1 into “Destination”. Click restore and wait half an hour  or so for this to complete.

Actually, while its restoring, you can search for, and download a tool called OSX86Tools. Its needed for this next bit.

Step 2: Make the USB stick bootable.

When the Restore is complete, open up OSX86Tools and click on “Install EFI/Run FDISK”. A little black box will pop up. Select the USB stick from the top drop-down menu, leave the rest, and click “Install EFI”. This will make the USB stick bootable. You can now reboot.

Step 3: Preparing your PC

You need to decide if you want to Dual Boot with your existing operating system, ie Windows, or if you want to just have a dedicated hard drive for Mac. Either way, there’s gonna be some formatting involved! For a dedicated hard-drive, you can do the formatting later during install (you know formatting deletes everything on your hard drive, by the way, yeah?). For dual boot, go into Windows and split your disk in two. I’m not going to tell you how to do this, because I don’t want to take responsibility if you mess it up! 😀 But you can Right-Click “My Computer”, select “Manage” and then “Disk Management”. You can play around in here with resizing and creating new partitions, or else get a dedicated Partition Program (AVOID PARTITION MAGIC. SERIOUSLY!!). Initially you want to format the chosen partition to FAT32, and Mac isn’t the biggest fan of NTFS. You’ll be formatting it again to Apples format during install anyway, but the Mac installer can just handle FAT32 better. So just do it!

Step 4: Installing Mac OS Snow Leopard.

This is the tricky part. If your computer is not set up to boot from USB, go into the BIOS and set this up (Google if you don’t know how).When it starts to read off the USB stick, you will see a “Darwin/X86”  screen. From here it will hopefully boot. If not, you can press either Escape or F8 and it will take you to a menu where you can put in special boot parameters (eg arch=i386 -v) to make it boot. If its working though, don’t bother with that. You should now be on the main Install screen. From here just select your language, and keep clicking through until it prompts for a hard drive to install to (“Select Destination”). DO NOT SELECT YOUR WINDOWS HARD DRIVE if you are dual booting. If you have the dedicated hard drive then you won’t see anything there. Click on “Utilities” up the top of the screen and select “Disk Utility”. This is the same program you used earlier with the USB stick (unless you burned the .iso to a DVD of course). Select the partition that you intend to use with Mac OS and click on “Erase”. As before, select “Erase”. Under “Volume Format” you need to select “Mac OS Extended (Journaled)”, name it whatever you want and click “Erase”. You can now close “Disk Utility” either by clicking the Red X button up the top left, or selecting “Disk Utility” from the very top left of the screen and quitting in there. This will now take you back to the “Select Destination” screen, and hopefully your hard drive should appear  there now. Select it and click Next.

Step 5: Customising the install

This bit will make or break your install!!

Every install is different for each motherboard, processor, audio chips, video chips, network cards  etc etc etc. Assuming you have decided not to install the original Apple install DVD, and have instead opted for one of the customised installs such as Hazard, kalway, or iDeneb, then the following part will look different. You see, the releaser of each of those editions has customised the installer to include different kexts (drivers) and different patches. They shouldnt stray too far from each other, but still, they’ll look different.  I can tell you what I selected but unless you have identical hardware to me, you will need to select different options. Simple as that.

So, I selected the Mobdin Kernel for AMD, VoodooHDA audio, LegacyAppleIntelPIIXATA and all the other AMD patches. (The chameleon loader comes with the AMD patch. If you are Intel, don’t forget to select a bootloader!)

Depending on which patches you choose for your own machine, you will get errors and crashes. If you get any problems, you just need to go back and select different options. Most new machines should be almost compatible these days so most people will have no problems. And even people who do have problems, can get them fixed with a bit of tinkering. If you can get the install completed and are having boot problems, press F8 before the chameleon loader starts and type “-x -v -f”. The -x loads in safe mode, the -v loads in verbose mode, ie outputs lots of text so you can see where the problem occurs, and -f forces the Mac to load kexts directly from the hard drive, ignoring the cache. Don’t worry about that for now….;)

There is one more thing. On my PC, when I booted up for the first time, it got me to create a new user account, which is all normal. However, once I filled in the details, it either hung indefinately, or it brought me through an infinite loop of asking me to fill in my details over and over again. The fix for this, is to boot into single user mode, by typing “-s” at the boot prompt. It should load up in under a minute and you’ll see some stuff above it relating to “fsck -fy”. Type in the few lines that it provides and now you’re into single user mode. From here, you will have to manually create your user account. Google it! 😉

So, with a bit more tinkering, you may get yourself an acceptably working substitute for a Mac, that you can finally run XCode and the iPhone SDK on sufficiently. At present, my machine is working OK, but because Hackintosh’s are relient on non-Apple employees making kexts to work with non-standard hardware, you can either get lucky and have kexts available to you, or you’ll never have support for certain devices, eg graphics card/sound cards/network cards.

I could get my ATI Radeon X1200 onboard graphics working to basic levels, but it looks like it will never get support for QE/CI. I managed to get a kext for it called EVOenable_X1800.kext, which got System Profiler to pick it up, but thats about it. No resolution change, no Quartz etc etc…

I also had to search high and low for a kext for my network card so I could just go online with it! I found a generic Realtek one which seems to have worked (RealtekR1000SL.kext).

So, thats it for now. I hope you enjoyed literally my longest ever blog post! If you have any questions, feel free to leave a comment!

Cheers.

Enter: THE HACKINTOSH!!

As you may have realised by now, I don’t actually own a Mac, or even have easy access to one. Sure, we have the lab computers in college, but with my coursework and studying and stuff taking up most of my day, I resort to doing my coding at night! And Macs in a lab several miles away are not exactly ideal.

So….what am I gonna do about it???

Well, after a little bit more research, I have stumbled into the dark, murky underworld known as HackintOsh!! So what exactly is it…?

Well, as you may or may not be aware, Apple used to run their Macs on IBM PowerPC CPUs. The MacOS was then built around this type of chip, which is incompatible with your standard PC chips, like Intel Pentiums, and AMD Athlons etc etc. Recently (in 2006), Apple decided to move over to Intel chips in their new Macs. This opened up the world to Hackintosh. You see, by Apple moving over to Intel based processors, they now share a common architecture with your standard PC. So now, if someone changes a few things in the Mac operating system and tweaks it a little, in theory, it should work fine alongside a regular PC. Whereas previously, when Macs were IBM based, that would be impossible!

So in a nutshell, a hackintosh is basically a PC running MacOSX. This also means that anything you can run on a Mac, you can run on your own bog-standard PC….including the iPhone SDK.

Of course, the legality of this is in question. I’m not sure Apple appreciate losing potential customers, who don’t need to splash out on a Mac anymore, either! I managed to find a MacOSX Leopard DVD for roughly €30, so it’s not a bad start to development on a budget.

EDIT: I have run into some trouble with this. I forgot that my current PC actually has an AMD processor. According to a few sites online this is manageable, though, with some different drivers, or “kexts”.

Further research, and alternatives to writing apps on MAC OSX

After writing the previous post, I decided to do some research to see if there was other ways, on a student budget, to write iPhone apps without a Mac and Apple developer account.

Well, the good news is that its possible to write the apps without going over budget. The bad news is, theres no other way to submit them to the app store without purchasing the $99 subscription. Sure, you can give them to someone else to submit, but then they get the credit…and we don’t want that! 😉

With regards the actual coding, this bits a bit tricky.

Now, while it is definitely possible to actually write code, and compile it on Windows, it is not exactly ideal. The reasons behind this are as follows:

  1. Some IDEs actually facilitate HTML5/javascript coding. This is then “wrapped” in an app and the built in browser is used to render it. While it works, its still not native code so you may suffer from a performance hit. I did find an IDE that lets you write your own Objective-C, but you then have to upload your code to their own server, which is Mac based. It then compiles, converts to an app, and provides a download link to the compiled app. If you’re worried about people stealing your source code, you may want to avoid these!
  2. The compilers that natively compile Objective-C do not support the Foundation classes, which give the iPhone its look and feel. Remember, Objective-C was around long before the iPhone, and even Mac OSX. You can perhaps somehow copy over the foundation classes from XCode and compile a fully-fledged iPhone app, but then you get this problem….
  3. Testing. There are 2 ways to test an iPhone app. 1: Copy it via USB directly to the iPhone, or 2: Use the iPhone simulator/emulator. First of all, to transfer the app to the iPhone, you need the developer account, and you also need the iPhone SDK…on a Mac. Secondly, the simulator/emulator only works on the iPhone SDK…on a Mac.

If you are interested, I’ll list the software I came across and you can test them yourselves. Note, I havent tested any of these myself as I am only at the early stages myself!

  • AirPlay (probably the closest you’ll get, compiles to Obj-C)
  • Appcelerator Titanium (HTML/javascript)
  • Flash CS5 (HTML/javascript)
  • Unity 3D (for games, needs Mac to compile)
  • StoneStrip S3D (for games, needs Mac to compile)
  • Genuitec MobiOne (HTML/Javascript)
  • Dragonfire SDK (code in Obj-C, upload to THEIR server, which compiles your code.  Then you download the app)

Also, I should point out that you still need to have the Apple Developer Account for these pieces of software, like Adobe CS5, since you will need to transfer the app to the iPhone, and this is only done by provisioning it with your Developer Code!!

So there you have it. Not the greatest of options on Windows, for a change. Although I hear Mac Minis are going for about €800/$600 these days…;)

« Older posts Newer posts »