During testing of the latest version of my app I encountered a last minute bug that required me to make a one line change. I use the DropBox Sync component and needed to make sure I closed the file with the .Close method on the DBFile class.
I made this change and it ran fine on all devices using the debugger.
I then produced a Ad-Hoc build for use with TestFlight and this crashed immediately after showing the startup / splash screen with an internal Mono exception. I took the line back out, recompiled, and it worked. Put it back in - it crashed.
I started to suspect the linker so built a "Don't Link" version and this worked fine. I then put this (back) to Link SDK Assemblies only and it crashed again. I then selectively did a don't link on the Dropbox DLL and this worked.
I carried on testing using the Ad-Hoc build and eventually submitted the app to Apple for review. It was approved and went live but unfortunately it's gone live with no testing by Apple and the build that went on to the App Store has exactly the same problem.
I've checked and rechecked that the build and linker settings are exactly the same for the Ad-Hoc and App Store builds are the same and they are.
My immediate, short term, solution has been to pull the app from the store, rebuild without linking, and resubmit as a new version that I hope will be quickly approved by Apple. However it's left me with a number of support requests (fortunately all friendly so far) and presumably a bunch of users yet to discover the problem.
Has anybody else come across this? I've not had an issue like this in many years of native iOS app development and I'm hoping(!) I've done something stupid as its somewhat shaken my confidence in the Xamarin tools.