title: Using MvvmCross with Xamarin.Mac
body: <p>I tried to implement an OSX application using <strong>Xamrin.Mac</strong> and <strong>MvvmCross v6.2.3</strong>.</p>
  
  <p>I successfully realized a basic example as described in <a href="https://www.mvvmcross.com/documentation/getting-started/mvvmcross-overview" rel="nofollow noreferrer">official documentation</a> and in the <a href="https://github.com/MvvmCross/MvvmCross/tree/develop/ContentFiles" rel="nofollow noreferrer">instructions</a> provided with the MvvmCross library.</p>
  
  <p>I published my example on <a href="https://github.com/riversx/MvvmCrossExample" rel="nofollow noreferrer">github.com/riversx/MvvmCrossExample</a></p>
  
  <p><a href="https://i.stack.imgur.com/zWlZa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zWlZa.png" alt="enter image description here"></a></p>
  
  <p>In this example the HomeViewModel works correctly but is presented in a separate window (Home.storyboard).</p>
  
  <p>I would like to know if it is possible to link the HomeViewModel directly to the Main.storyboard/ViewController.</p>
  
  <hr>
  
  <p>More details </p>
  
  <p>In the 'Core' library project there is a class called HomeViewModel which contains the "business logic".</p>
  
  <p>In the 'Mac' project there are two storyboards: Main.storyboard &amp; Home.storyboard.</p>
  
  <p>Main.storyboard is the one created while adding a new project from 'Cocoa App' template; Home.stotyboard is the one I created from scratch following the MvvmCross basic instructions for a Xamarin.Mac project.</p>
  
  <p>Main.storyboard has a controller named ViewController which inherhits from NSViewController.</p>
  
  <p>Home.storyboard has a controller named HomeView which inherhits from MvxViewController &lt; HomeViewModel > (this is what I mean as 'link directly')</p>
  
  <p>At startup both Views are presented.</p>
  
  <p>To avoid the visualization of the empty window for Main.storyboard i tried to change the application main interface option.
  But, if in Info.plist I set 'Home' as main interface I get an ArgumentNullException in HomeView.ViewDidLoad()</p>
  
  <hr>
  
  <p>Thanks in advance </p>