Xamarin debugger terminates the app when using Branch.io

116 views Asked by At

I am using the Branch.io Xamarin SDK in my iOS app.

From my FinishedLaunching method on the AppDelegate, I call this code as advised in the Branch documentation (https://github.com/BranchMetrics/Branch-Xamarin-SDK)

    BranchIOS.Init(BranchKey, url, true);
    Branch branch = Branch.GetInstance();
    branch.InitSessionAsync(this);

If I run my code using the debugger (both on iPhone and iPhoneSimulator), the app terminates shortly afterwards, without any sort of error or exception printed in the logs. (There is an exception logged by Crashlytics in a log file, but I can't read it.) It is indeterminate when exactly the app terminates.

If I start the app without the debugger, Run -> Start Without Debugging, the app runs fine and does not terminate. Of course, if I remove the above 3 lines, the app runs fine under the debugger as well.

How do I go about getting a stack trace or some other log to find out why the app is terminating, and what is causing the app to terminate only while debugging?

1

There are 1 answers

2
Alex Austin On

I've read reports that when you switch between targets or toggle debugger on/off, you need to clean and rebuild before trying to run it. Otherwise, the pre-built files aren't applicable after switching. Have you tried this?