title: Xamarin Forms error - 'You MUST call Xamarin.Forms.Init(); prior to using it' - TestFlight (iOS) only
body: <p>I've seen several other posts on SO and elsewhere about this error (<code>System.InvalidOperationException: You MUST call Xamarin.Forms.Init(); prior to using it.  at Xamarin.Forms.Device.get_PlatformServices</code>), but none of them shed any light on my particular situation.</p>
  
  <p>I've created a Xamarin.Forms application that works great on Android (emulators and device, including when distributed through Google Play), and works fine both on the iPhone simulator and when provisioned to the iPhone.  And when I say 'works fine', I mean 'is able to get to the MainPage without error.'  </p>
  
  <p>However, when I use Ad-Hoc deployment and upload it to Apple so it can be distributed with TestFlight, the TestFlight-downloaded version shows the splash screen as expected, and then crashes without ever showing the MainPage.  In looking at the device logs, the above error appears, and in doing some Internet research, it's become apparent that my AppDelegate needs to have <code>global::Xamarin.Forms.Forms.Init();</code> as the first line in the <code>FinishedLaunching()</code> method.  </p>
  
  <p>So I went to take a look and put that line in that method in that file, and lo and behold, it's already there.  This is not unexpected, given the fact that <em>the app works on the sim, and on the iPhone when deployed directly from Visual Studio</em>.</p>
  
  <p>So my question is 'Why does Ad-Hoc deployment fail when all other deployment types do not, and what can I do to overcome this problem and get the app to actually distribute through TestFlight in a runnable fashion?'</p>