iPhone World

Development

.NET Comes To iPhone Development!!

by Vaelek on Sep.14, 2009, under Development

I don’t know how I didn’t know about this sooner, but it appears the long wait is [sort of] over. .NET has come to iPhone development. Yes, you heard me, the ability to write for the iPhone in C# is here.

This changes everything.

First, the bad news.. It’s not free. The personal edition will set you back $400. There was a beta test program but 1.0 was released today so there will be no more of that. I’m sure it will eventually show up on torrent sites but for now there doesn’t seem to be anything out there.

MonoTouch is the Mono edition for Apple’s iPhone and Apple’s iPod Touch devices.  MonoTouch allows developers to create C# and .NET based applications that run on the iPhone and can take advantage of the iPhone APIs as well as reusing both code and libraries that have been built for .NET as well as existing skills.

To purchase a copy, you need to head over to Monotouch. It seems this was also just posted to Slashdot, and the site already seems to be suffering, so I am reposting the following from the FAQ which is what most of you will be interested in.

What is MonoTouch?

MonoTouch is a software development kit for Mac OS X that lets you use .NET programming languages to create native applications for Apple iPhone and Apple iPod Touch devices. MonoTouch allows developers to use the .NET framework and more efficient programming languages, such as C#, to create applications that run on the iPhone and can take advantage of native iPhone APIs. Developers can test MonoTouch applications on the iPhone simulator, as well as physical hardware, and can distribute MonoTouch applications on Apple’s App Store.

What is included in the MonoTouch SDK?

MonoTouch is delivered as a static compiler that turns .NET executables and libraries into native applications. There is no JIT or interpreter shipped with your application, only native code. In addition to the core Base Class Libraries that are part of Mono, MonoTouch also ships with bindings for various iPhone APIs to allow developers to create native iPhone applications with Mono.

Do I need a Mac to use MonoTouch?

MonoTouch requires a Mac and Apple’s iPhone SDK to test on the emulator and deploy on the device. And you will need to be an Apple iPhone developer to deploy on the device.

How is MonoTouch Licensed?

MonoTouch is a commercial product based on the open source Mono project and is licensed on a per-developer basis.

With which version of .NET is MonoTouch compatible?

MonoTouch is based on a hybrid .NET 2.0 and Silverlight 2 API profile. If you want to use existing C# code, you will need to compile it from scratch using our compiler and tools to make sure that the proper assemblies are referenced.

What .NET features does MonoTouch support?

MonoTouch supports garbage collection, multi-threading, and many features of .NET 3.5, including C# 3.0 and LINQ, with some exceptions due to the security system in the device. See Limitations for more information about the limitations of MonoTouch.

Does MonoTouch support running Silverlight /Moonlight applications?

No.MonoTouch does not currently include Moonlight or Silverlight functionality.

What is the difference between MonoTouch Personal Edition and MonoTouch Enterprise Edition?

A MonoTouch Personal Edition license is non-transferable, entitles the owner to one year of MonoTouch updates, and allows distribution of applications built with MonoTouch on Apple’s App Store.

A MonoTouch Enterprise Edition license is owned by a legal entity for use by one developer at any given time, entitles the owner to one year of MonoTouch updates, and allows enterprise deployments of MonoTouch applications, as well as the distribution of applications built with MonoTouch on Apple’s App Store.

Soooo. If anyone decides to pony up the cash for MonoTouch, or happens to find it by some other means, let’s hear about it in the comments. How does it stand up? Is it the biggest thing since sliced bread?

Leave a Comment :, more...

A message from Saurik to all Winterboard themers

by Vaelek on Aug.22, 2009, under Development, Tips & Tricks

Being physically unable to upgrade anything, ever, without first reading the change log, I noticed a message from Saurik in the latest Winterboard update. Given that the message is 2 taps from the package screen I’m guessing most folks have not and will not ever see it so I am re-posting it here in an attempt to spread the word.

A Word on Remapping Files

I have gotten a flood of questions from users asking why SMS themes “don’t work”. The answer is: the applications changed, and the people making the themes refused to upgrade them.

WinterBoard is designed to be very flexible: it can theme nearly anything. With such power comes responsibility. In essence, the process of making a theme for WinterBoard requires an understanding of the application you are theming and knowing what files it loads, so you know what to replace.

This, in turn, means that when the themed program changes, such as from 2.x to 3.x, the themes may also have to get upgraded to still match.

No one seems to get this fact. :(

Instead, theme developers complain to me to “fix WinterBoard” so that, for example, SMS themes work again.

That is simply not reasonable: every time I add code to WinterBoard to remap old filenames I slow down a performance critical component. In this case, what happened is that the SMS application got broken up into the actual application and a new 3.x framework called “ChatKit”.

Most of the images people had been theming are now part of ChatKit: if you want to keep theming them, you need to start theming that bundle, not the SMS application. I don’t think a single theme has been updated to account for this change in the last two months.

OK: I did it. I added a remapping for the SMS application. If I am loading an image for ChatKit that isn’t themed, I check to see if a file with the same name from the SMS application was themed, and take it instead. In practice this is not a big deal, as it is a single remapping and most of the cost is going to come from the SMS application, but if something similar to this were ever done for UlKit it would be downright devastatingly painful.

So, this is the last time I want to do something like this, and I even consider this ChatKit remapping “deprecated”, even in the first version of WinterBoard that includes it: people really need to upgrade their themes to theme the right files going forward. (Note: this has nothing to do with SMSBackground.png, which is a WinterBoard-specific feature that simply had to get rewritten for 3.x.)

Leave a Comment :, more...

iPhone OS 3.0.1 Advisory (For developers only)

by Vaelek on Aug.05, 2009, under Development, Tips & Tricks

This is straight from the horse’s mouth. This is a very simple step but has the potential to have a big impact if you’re unaware of it and are now on 3.0.1.

iPhone OS 3.0 SDK and iPhone OS 3.0.1 software release for Mac OS X v10.5.7

To continue development with iPhone SDK 3.0 on your iPhone, iPhone 3G and iPhone 3GS running iPhone OS 3.0.1 will need to perform the following:

1. Log into your Mac with an Admin account and launch the Terminal application
(/Applications/Utilities)

2. Copy and paste the following line into Terminal:
ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ \(7A341\)/ /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1

Note: If you installed iPhone SDK 3.0 somewhere other than the default /Developer
location, replace the "/Developer" directory as appropriate.

*I am seeing a lot of hits to this page from folks searching for iphone 3.0.1 advisory. This is somewhat confusing to me as I would think if you are aware of the advisory, then you know what it is. So what’s up? Are you finding what you’re looking for here? If not, please do post a note in the comments as to what you are actually trying to find out and I will be happy to update the post with whatever the answer might be.

5 Comments :, more...

Using the 3.0 SDK without paying for the priviledge

by Vaelek on Jul.11, 2009, under Development

Don’t forget to check out our current contest to win a Google Wave invite!
In the next round, we will be giving away Google Voice and Ribbit Mobile invites!

**EDIT**
This is really 2 topics in one post
#1: Using 10.5.7 with VMWare
#2: Using the 3.0 SDK without a $99 license
**EDIT**

Develop on Windows – VMWare

It’s here folks! After trying 57 different ways using way too many different disk images, method, etc, I *FINALLY* have the 3.0 SDK installed in 10.5.7 inside VMware, and able to build for the device without having that damn $99 certificate. This is a bit of a hot topic right now as people are trying to make the move to 3.0 but crApple decided to shun an entire platform of developers, so to them I say THPTPTPTPTPTPTPT! Here’s the steps to get this for yourself:

Download this torrent

After a few reports that the torrent is dead I have decided to provide an alternate means to download the VM. These are the same files from the torrent.

Part 1, Part 2, Part 3, Part 4, Part 5, Part 6

*Edit* If when you boot the VM, it hangs on the gray boot screen, download this darwin.iso and mount it at boot time. It will automatically un-mount itself during the boot so don’t worry about that.

I am using VMWare Workstation 6.5.2 for all of this, it may or may not work in previous versions. The VM is already pre-installed in this torrent, along with the 3.0 SDK.

Use the 3.0 SDK without a $99 certificate

To enable it to build for the device simply create a self signed certificate using these steps. Be sure to name the certificate ‘iPhone Developer’. Follow the guide on that link from just above the first screen shot, to just before it starts talking about plist files.

Next, you need to edit /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/SDKSettings.plist and change CODE_SIGNING_REQUIRED from YES to NO.

Finally, simply run this script and you’re golden! Yep that’s all there is to it! Just make sure to have XCode closed for this step.

#!/bin/bash
cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/

dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255
printf "\x8f\x2a\x00\x00" >> working
dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504
/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
/bin/mv working iPhoneOS\ Build\ System\ Support
chmod a+x iPhoneOS\ Build\ System\ Support

Please post your success or failure with this in the comments forums.

148 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...