title: iOS App Won't start on Testflight Ad Hoc Distribution
body: <p>I'm developing an application that works perfectly well on my phone when I run it through Xcode. But when I distribute a beta through TestFlight, none of the users can run it - <strong>NOTE</strong>: They can install the app on their phones without any problem. The application just closes before it launches and there are no crash logs on TestFlight.</p>
  
  <p>I can connect any of my testers' phones to my computer and run the app on them (using Xcode) just fine. I thought maybe this is a problem with provisioning profiles, but on my phone, I can delete the relevant profile from Settings app then install the app from the TestFlight link, and it still runs fine. </p>
  
  <p>From things I've read on Stack Overflow, this must be because of some difference in "Release" and "debug" settings of the app, but I'm totally lost as to how to debug it. I can't run the app in release mode while it's connected to Xcode, and I can't debug when it's not connected to Xcode. </p>
  
  <p>Any suggestions?</p>
  
  <p><strong>Update - Resolved</strong></p>
  
  <p>I did end up "solving" this problem. SO user Cliff Ribaudo had the same problem (apparently he was the only other person) and he posted about it <a href="https://stackoverflow.com/questions/10262733/ios-app-with-static-lib-crashes-only-on-launch-of-archive-build-loaded-ad-hoc-c">here</a> and finally found the solution <a href="https://stackoverflow.com/questions/10300800/ios-app-with-static-lib-always-crashes-on-launch-of-ad-hoc-archive-build-cant-r/10302012#10302012">here</a>. The solution turned out to be setting two linker flags: <code>STRIP LINKED PRODUCT = NO</code> &amp; <code>STRIP STYLE = DEBUGGING SYMBOLS</code>. I have no idea why this fixed it, and I don't know why it was broken in the first place. But we haven't had this crash since I made these changes. </p>