title: Unable to initialize iOS AppDelegate.cs with XFormsApplicationDelegate
body: <p>I am creating an iOS application using Xamarin.Forms.Labs.iOS library. </p>
  
  <p>I followed the steps as presented in this link <a href="https://github.com/XLabs/Xamarin-Forms-Labs/wiki" rel="nofollow">https://github.com/XLabs/Xamarin-Forms-Labs/wiki</a></p>
  
  <p>and replaced </p>
  
  <pre><code>UIApplicationDelegate 
  </code></pre>
  
  <p>with</p>
  
  <pre><code>XFormsApplicationDelegate 
  </code></pre>
  
  <p>in my AppDelegate.cs.</p>
  
  <p>Here is my AppDelegate.cs :</p>
  
  <pre><code>[Register("AppDelegate")]
  public partial class AppDelegate : XFormsApplicationDelegate
  {
      UIWindow window;
  
      public override bool FinishedLaunching(UIApplication app, NSDictionary options)
      {
          Forms.Init();
  
          window = new UIWindow(UIScreen.MainScreen.Bounds);
  
          window.RootViewController = App.GetMainPage().CreateViewController();
  
          window.MakeKeyAndVisible();
  
          return true;
      }
  }
  </code></pre>
  
  <p>and my Main.cs file has</p>
  
  <pre><code>public class Application
  {
      // This is the main entry point of the application.
      static void Main(string[] args)
      {
          // if you want to use a different Application Delegate class from "AppDelegate"
          // you can specify it here.
  
          UIApplication.Main(args, null, "AppDelegate");
      }
  }
  </code></pre>
  
  <p>Is there anything wrong in my implementation ? I added all the assemblies and the code compiles without any errors. The app won't start and crashes with the following exception.  </p>
  
  <p><strong>Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.</strong></p>
  
  <p>Kindly, guide me in the right direction.</p>
  
  <p>Thanks.</p>