Swift toolchain for iOS?

I'm hoping to get an early start with Swift 3 renamification and related language changes by trying to compile my iOS projects under a toolchain, but it appears from https://github.com/apple/swift that "The Xcode IDE can be used to edit the Swift source code, but it is not currently fully supported as a build environment for SDKs other than OS X". And indeed, when using the toolchain, I can build a new OS X application project but not a new iOS project. Is there any way that I can do this, or am I just out of luck for now?

Answered by mattn in 131596022

Solved this by commenting out `@UIApplicationMain` and inserting a _main.swift_ file with these contents:


import UIKit
UIApplicationMain(
    Process.argc, nil, nil, NSStringFromClass(AppDelegate)
)


It isn't strictly right, but it's enough to prevent the compiler from crashing, and presto, we're running in the Simulator on the toolchain.

I have the exact same problem. Jordan Rose at Apple replied to my inquiry thusly:


Drat, that's me. I was hoping to get out of the business of knowing UIApplicationMain's exact signature, but I guess that doesn't always work? I'll ask around for a better solution.

My apologies,

Jordan


There was no indication given as to when a new development build fixing this would be posted.


Regards,

Chuck Lane

Thanks, I've filed a bug report on that basis. You give me hope, in an odd way...

Accepted Answer

Solved this by commenting out `@UIApplicationMain` and inserting a _main.swift_ file with these contents:


import UIKit
UIApplicationMain(
    Process.argc, nil, nil, NSStringFromClass(AppDelegate)
)


It isn't strictly right, but it's enough to prevent the compiler from crashing, and presto, we're running in the Simulator on the toolchain.

Cool! It works (mostly).


By the way, if you're the mattn that I think you are, thanks for writing the books on Swift & ios9, they've helped me tremendously.


Regards,

Chuck Lane

I am, and thanks! — Yes, I think I know what you mean by "mostly". The compiler / parser still keeps falling over. But that's okay; my goal is just to experience first-hand things like renamification and the new function parameter rules, and so far, that's working. This could allow me to get a head start on rewriting the books...

We are now back in business with the latest toolchain (April 25 2016).

Yes, it's great that we don't have to use your little 'trick' anymore to build the app. However, it seems to be....how to put this....'crashier' than the last version!

Yes, now it falls over and it can't get up. 🙂

Well, they sure fixed _that_ problem! The toolchain release of May 9 is really solid.

Swift toolchain for iOS?
 
 
Q