title: Problems getting TestFlight to work with Monotouch app
body: <p>Am struggling to get TestFlight working with my MonoTouch app (Monotouch 5, IOS5) and have not found any MonoTouch documentation for TestFlight.</p>
  
  <p>Here is what I tried so far.</p>
  
  <ol>
  <li><p>Downloaded TestFlight bindings from <a href="https://github.com/mono/monotouch-bindings/tree/master/TestFlight" rel="nofollow">https://github.com/mono/monotouch-bindings/tree/master/TestFlight</a> -- after adding this as a reference it seemed that the TestFlight methods were actually not exposed at all, so I looked for another set of bindings.</p></li>
  <li><p>Downloaded ayoung's TestFlight bindings from <a href="https://github.com/ayoung/monotouch-testflight" rel="nofollow">https://github.com/ayoung/monotouch-testflight</a>. Built monotouch-testflight.dll with Make, copied it to the project and added to References -- this time the TestFlight methods were all visible.</p></li>
  <li><p>Added libTestFlight.a to the Lib folder in my MonoTouch project with BuildAction set to Nothing. (I also have RedLaser in there).</p></li>
  <li><p>Per ayoung, I enabled LLVM compiler (with ARMv7); ayoung states it is required. In Project Options -> iPhone Build my additional mtouch arguments  are: </p>
  
  <p>-cxx -nosymbolstrip -nostrip -gcc_flags "-lgcc_eh -framework SystemConfiguration -framework CFNetwork -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework OpenGLES -framework Security -L${ProjectDir}/Lib -ltestflight -RedLaserSDK -ObjC"</p></li>
  </ol>
  
  <p>Note: The app worked ok with RedLaser before TestFlight was added to the project.</p>
  
  <p>Here -lgcc_eh is as per ayoung -- I have not been able to find out what it is or what it is for. Perhaps I should have a gcc_eh.dll (?) but I don't AFAIK, and I don't know where I could find such a thing.</p>
  
  <ol>
  <li><p>In Main.cs I added</p>
  
  <p>using TestFlightSdk;</p></li>
  </ol>
  
  <p>and In FinishedLaunching I added</p>
  
  <pre><code>TestFlight.TakeOff( "(downloaded team token is here)" );
  </code></pre>
  
  <ol>
  <li><p>Compiled and installed with no error (Release|iPhone).</p></li>
  <li><p>When I now run the app on the device, it exits immediately with no diagnostic that I can discover.</p></li>
  <li><p>The app also exits immediately if compiled to Debug|iPhone. In this case, however, if I turn off LLVM despite ayoung's strictures then in Application Output I see the following:</p>
  
  <p>TestFlight: Started Session
  TestFlight: Crash Handlers are installed
  Thread started: 
  Thread started: 
  TestFlight: Team Token is recognized
  TestFlight: End of Session
  TestFlight: Communication with TestFlight is currently disabled, check earlier in your log for details</p></li>
  </ol>
  
  <p>This might be because I have not yet uploaded the app's .ipa file to TestFlight?? (The app does launch in this case however.)</p>
  
  <ol>
  <li>I am trying to find out how to generate a .ipa file. TestFlight documentation shows how to do this from XCode but my app is code-only with no .xib so that option seems to be out? TestFlight documentation also shows how to generate a .ipa from the .app file. Here my problem is, how do I lay my hands on the .app file for a device build?</li>
  </ol>
  
  <p>Any help with these issues would be so much appreciated.</p>