Run executable in iOS Simulator
<p>I want to try an experiment based on this article: <a href="http://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art024" rel="nofollow">http://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art024</a></p>

<p>I managed to compile the example:</p>

<pre><code>#import &lt;Foundation/Foundation.h&gt;
#import &lt;UIKit/UIKit.h&gt;

@interface MyDelegate : UIResponder&lt; UIApplicationDelegate &gt;
@end

@implementation MyDelegate
- ( BOOL ) application: ( UIApplication * ) application
           didFinishLaunchingWithOptions: ( NSDictionary * ) launchOptions {
  UIWindow *window = [ [ [ UIWindow alloc ] initWithFrame: 
    [ [ UIScreen mainScreen ] bounds ] ] autorelease ];
  window.backgroundColor = [ UIColor whiteColor ];
  UILabel *label = [ [ UILabel alloc ] init ];
  label.text = @"Hello, World!";
  label.center = CGPointMake( 100, 100 );
  [ label sizeToFit ];
  [ window addSubview: label ];
  [ window makeKeyAndVisible ];
  [ label release ];

  return YES;
}
@end

int main( int argc, char *argv[ ] )
{
  UIApplicationMain( argc, argv, nil, NSStringFromClass( [ MyDelegate class ] ) );
}
</code></pre>

<p>With a Makefile:</p>

<pre><code>XCODE_BASE=/Applications/Xcode.app/Contents
SIMULATOR_BASE=$(XCODE_BASE)/Developer/Platforms/iPhoneSimulator.platform
FRAMEWORKS=$(SIMULATOR_BASE)/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/
INCLUDES=$(SIMULATOR_BASE)/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include

window: window.m
    clang \
        -arch i386 \
        -mios-simulator-version-min=9.2 \
        -fobjc-abi-version=2 \
        -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk \
        -o window window.m -framework Foundation -framework UIKit
</code></pre>

<p>But I'm struggling with running generated example in an iPhone Simulator. The method mentioned in the article doesn't seem to work anymore:</p>

<pre><code>...Contents/MacOS/Simulator -SimulateApplication ./window
</code></pre>

<p>Any ideas how is this possible with current version? Thanks</p>