unity-branch-deep-linking-attribution: IOS App Crashes on launch when opened first by a Branch link

In the latest Unity Branch commit V0.3.24 “the one that fixed IOS @/# import bug”

When an App is being first opened by a Branch link in IOS, it crashes. When an App is being sent to foreground after being suspended, it functions correctly.

“OurApp” is the name of our game app //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////Error log////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////

Thread 0 (crashed)
0   libsystem_kernel.dylib      >>>>>        __pthread_kill 
1   libsystem_c.dylib        >>>>>           abort 
2   OurApp              >>>>>              -[UnityPLCrashReporter generateLiveReportWithThread:] 
3   OurApp           >>>>>                 UncaughtExceptionHandler(NSException*) 
4   CoreFoundation           >>>>>           __handleUncaughtException 
5   libobjc.A.dylib          >>>>>           _objc_terminate() 
6   libc++abi.dylib          >>>>>           std::__terminate(void (*)()) 
7   libc++abi.dylib          >>>>>           __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) 
8   libobjc.A.dylib          >>>>>           _objc_exception_destructor(void*) 
9   CoreFoundation         >>>>>             -[NSException initWithCoder:] 
10  OurApp                >>>>>            +[Branch setBranchKey:] 
11  OurApp               >>>>>             +[Branch getInstance:] 
12  OurApp            >>>>>                -[BranchUnityWrapper continueUserActivity:] 
13  OurApp            >>>>>                -[BranchAppController application:continueUserActivity:restorationHandler:] 
14  UIKit                >>>>>               -[UIApplication activityContinuationManager:continueUserActivity:] 
15  UIKit              >>>>>                 -[UIActivityContinuationManager _continueUserActivity:] 
16  UIKit               >>>>>                __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_3 
17  UIKit               >>>>>                -[_UIApplicationModalProgressController _callAndClearDismissalHandlerWasDismissedByUser:] 
18  UIKit              >>>>>                 -[_UIApplicationModalProgressController hideAfterMinimumUptimeWithDismissalHandler:] 
19  UIKit              >>>>>                 -[UIApplication activityContinuationManager:hideProgressUIWithCompletion:] 
20  UIKit              >>>>>                 -[UIActivityContinuationManager _endCurrentActivityContinuationWithCompletion:] 
21  UIKit               >>>>>                __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_2 
22  libdispatch.dylib       >>>>>            _dispatch_call_block_and_release 
23  libdispatch.dylib       >>>>>            _dispatch_client_callout 
24  libdispatch.dylib        >>>>>           _dispatch_main_queue_callback_4CF$VARIANT$mp 
25  CoreFoundation         >>>>>             __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 
26  CoreFoundation        >>>>>              __CFRunLoopRun 
27  CoreFoundation         >>>>>             CFRunLoopRunSpecific 
28  GraphicsServices      >>>>>              GSEventRunModal 
29  UIKit           >>>>>                    UIApplicationMain 
30  OurApp         >>>>>                   main 
31  libdyld.dylib       >>>>>                start 

//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////End of log////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////

The issue holds with Unity Branch Demo.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 40 (17 by maintainers)

Most upvoted comments

@mahdiRemal

  1. Open Unity3d project
  2. Make some changes in Branch prefab (for example: add symbol and then delete symbol)
  3. You will see two buttons “Update IOS Wrapper” and “Update Android Manifest”
  4. Tap both
  • "Update IOS Wrapper " will add branch key into _branchKey variable in BranchiOSWrapper.mm
  • “Update Android Manifest” will add changes into manifest or will create new (if you don’t have manifest at all)

All will work nice. Note: or you can add value into _branchKey manually