Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Binding native framework to Xamarin.iOS project causes app crash on launch with no output

$
0
0

Hello guys,

my task is to bind a native iOS framework into a Xamarin.iOS app and consume some of its features. I followed the official guide for creating a binding via a Xamarin iOS binding project and Objective Sharpie. I am at a very early stage such that my API definition files just contain a very few classes and methods for testing purposes. Later, I wanted to include more methods and classes that I need.

I followed several links and tried to find help by Google to get the binding work but for some reason, my app crashes on launch without any output in the output window of Visual Studio and without any useful device log entries.

I tried binding via binding project, linkwith attribute exposed in .cs files and GCC flags. I also included the required libswift....dylib libraries via the corresponding NuGet packages Xamarin.Swift3.Core etc.

Important information:

  • I am developing on Visual Studio for Mac on a MacOs machine.
  • I use the latest iOS SDK (iOS 11) and latest Xamarin updates.
  • For debugging, I use an iPhone 7 plus device.
  • As the native framework is provided by another partner, I cannot alter the framework. It is compiled for ARMv7 and ARM64 but not for x86 and x64 such that I cannot use an iPhone simulator to test the binding.
  • The native framework is a Swift framework written in Swift 3 !!!

Here are some links that I followed:

Do you have any idea why the app crashes on startup? Importantly, the app does not crash if there is no line of code that would consume any exposed method of the native framework but as soon as I have such a line of code even it is not executed, the app crashes on launch. I guess it is because only if having such a line of code, the framework is being loaded causing the app to crash maybe due to a false configuration or the framework not being included in the final app assembly?

Thank in advance for any help!

Raphael


Viewing all articles
Browse latest Browse all 204402

Trending Articles