title: Could not create an native instance of the type 'FWSImageRepo'. the native class hasn't been loaded
body: <p>I'm trying to link a native iOS framework that uses <code>AFNetworking</code> internally, I'm building it initially as a prototype to move some of my company's ObjC IP over to be linkable with Xamarin as well in the future.</p>
  
  <p>I started by making a simple class that loads kittens using AFNetworking into an UIImageView</p>
  
  <p>Header file:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface FWSImageRepo : NSObject
  +(UIImageView *)imageViewFromURLString:(NSString *)urlString;
  @end
  </code></pre>
  
  <p>Implementation</p>
  
  <pre><code>@implementation FWSImageRepo
  
  +(UIImageView *)imageViewFromURLString:(NSString *)urlString{
  
      UIImageView *imageView = [[UIImageView alloc] init];
  
      NSURL *imageUrl= [NSURL URLWithString:@"http://www.pets4homes.co.uk/images/articles/1334/large/6-health-issues-to-watch-for-in-young-kittens-52f62cff5cabb.jpg"];
  
      if(imageUrl != nil) {
          [imageView setImageWithURL:imageUrl];
      }
  
      return imageView;
  }
  
  @end
  </code></pre>
  
  <p>I created a framework compiler target and I've copied the framework over to the Xamarin iOS project. I used Objective Sharpie to generate the bindings below</p>
  
  <pre><code>// @interface FWSImageRepo : NSObject
  [BaseType(typeof(NSObject))]
  interface FWSImageRepo
  {
      // +(UIImageView *)imageViewFromURLString:(NSString *)urlString;
      [Static]
      [Export("imageViewFromURLString:")]
      UIImageView ImageViewFromURLString(string urlString);
  }
  </code></pre>
  
  <p>All of these are linked as instructed in a <code>binding project</code>, the framework is linked as a native reference and the bindings project is referenced by a single page Xamarin iOS app.</p>
  
  <p>now a mere initialization of the class <code>var fwrepo = new FWSImageRepo();</code> indicates to me that the framework isn't liked to the project at all. the error doesn't change even if I don't link the frameworks in the bindings project </p>
  
  <pre><code>Could not create an native instance of the type 'FWSImageRepo': the native class hasn't been loaded. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
  </code></pre>
  
  <p>Any reason to check what's going on? I've tried everything and exhausted my search online. theres no example of this requirement anywhere as far as I've searched and barely any direction with this. I've tried the solutions from the others facing the same issues. how do I look for where I've gone wrong?</p>
  
  <p>Here's a link for the projects I've created <a href="https://drive.google.com/open?id=0B2f9RlRxZKoZcElIRkpLZnF6WVU" rel="nofollow">https://drive.google.com/open?id=0B2f9RlRxZKoZcElIRkpLZnF6WVU</a></p>