0

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?

Kostub Deshmukh
  • 2,852
  • 2
  • 25
  • 35

1 Answers1

0

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?

Alex Austin
  • 1,142
  • 8
  • 11
  • My issue was that I was linking with ParseCrashReporting and that was messing up all my async calls, not just this one. After I removed it it started working. Though I have no idea why it fails. – Kostub Deshmukh Jun 29 '15 at 04:46
  • Can you answer the question and accept it? Make sure to explain the details as I'm sure other folks will benefit. – Alex Austin Jun 30 '15 at 01:08