0

I need to bind library for Xamarin.iOS which has many dependencies, such as Firebase/Core and Firebase/Messaging.

Following that doc, I have created a proxy project, generated the fat release, used sharpie to create the ApiDefinitions, generated the dll with a Binding Project in Visual Studio for Mac, and finaly used it in a Xamarin.iOS project that successfully built.

But, the app crashes on startup, on any simulator or real iPhone, with the following logs :

-CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.maxim.myapp2 with pid '372' is now Foreground Running. Background entitlement: NO ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO
-CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Sending EndInterruption to com.maxim.myppev2 with pid '372' because client moved to ForegroundRunning and is not allowed to play in the background
[application<com.maxim.myappev2>:372] Death sentinel fired!
...
[application<com.maxim.myappev2>:372] Process exited: <RBSProcessExitContext; specific: <RBSProcessExitStatus; domain: signal (2); code: SIGSEGV (11)>>.

I think it comes from the Enable Bitcode option, which is not supported by Xamarin. Indeed, the library I am binding has not this option, but one of its dependencies has :

iMac:Release-fat maxim$ otool -l FirebaseCore/FirebaseCore.framework/FirebaseCore | grep __LLVM
  segname __LLVM
   segname __LLVM
  segname __LLVM
   segname __LLVM
iMac:Release-fat maxim$

Is there any chance I can remove this native dependency library of Firebase and use the already binded one https://github.com/xamarin/GooglePlayServicesComponents/ ?? How could I do please ?

Maxime Esprit
  • 705
  • 1
  • 8
  • 29
  • Just add a NuGet reference to firebase, instead of binding it yourself? https://www.nuget.org/packages/Xamarin.Firebase.iOS.Core/ – Cheesebaron Sep 27 '21 at 14:06
  • Hi Cheesebaron thank you ! You mean in the binding project instead of adding a native reference ? Or in the Xamarin.iOS project ? I tryied quickly but I had nativ linking errors, so I thought it was not possible – Maxime Esprit Sep 27 '21 at 15:20
  • In the binding project itself. That should usually work. – Cheesebaron Sep 27 '21 at 16:16
  • Thx @Cheesebaron, I've replaced native references with corresponding nuget packages but unfortunately it still crashes at startup :( Can't understand what is going wrong – Maxime Esprit Sep 28 '21 at 14:31
  • Same error? Do you have more log to add? Seems a bit sparse. – Cheesebaron Sep 28 '21 at 15:02
  • Hello @Cheesebaron , same error yes, the app crash at startup (splashscreen appear 1sec and crash). And the Visual Studio debugger doesn't stopped, like if the app was still running... Nothing in the output windows, and nothing more in the device console through xCode. Can't understand and I have no idea how to find the issue.. Would you have any idea ? – Maxime Esprit Sep 30 '21 at 08:28
  • Try to rolled back from Catalina to Mojave with Xcode. – Wen xu Li Oct 04 '21 at 09:19
  • Thx @WenxuLi-MSFT I'm running on Big Sure. I'll try to rollback to Mojave if you ask me to do. But I would like to understand why it could help ? – Maxime Esprit Oct 04 '21 at 13:57
  • I searched for a similar problem to you, and someone solved it by this method, so I suggest you try it. – Wen xu Li Oct 05 '21 at 00:39

0 Answers0