Xamarin iOS绑定构建没有错误,但是在启动时崩溃,没有任何输出

时间:2018-07-18 20:43:45

标签: xamarin xamarin.ios xamarin.ios-binding

我已经从Adobe的两个名为AccessEnabler的本地库(iOS和Android)中创建了一个统一的API。现在,Android绑定可以使用了,没问题。但是,iOS一个存在问题。绑定项目的构建和遵从没有问题,但是当我将其添加到示例(或任何示例)中时,测试应用程序就可以构建和编译。但是,当我启动该应用程序时,它在启动时崩溃而没有输出。我必须在Mac上挖掘控制台日志才能找到它:

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks

Dyld Error Message:
  Library not loaded: @rpath/AccessEnabler.framework/AccessEnabler
  Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/E4B4E1EE-EA10-4E82-AD1E-2E8F3FD5BB79/data/Containers/Bundle/Application/47241A8D-5E85-4E8A-990C-387A1FF4E493/AccessEnablerSample.iOS.app/AccessEnablerSample.iOS
  Reason: image not found

Binary Images:
       0x10cf84000 -        0x10d4e7ff3 +com.golfchannel.AccessEnablerSample (1.0 - 1.0) <EB64A6F8-4E10-352A-9E9E-C75EE2D5A7EF> /Users/USER/Library/Developer/CoreSimulator/Devices/E4B4E1EE-EA10-4E82-AD1E-2E8F3FD5BB79/data/Containers/Bundle/Application/47241A8D-5E85-4E8A-990C-387A1FF4E493/AccessEnablerSample.iOS.app/AccessEnablerSample.iOS
       0x10d8c0000 -        0x10d8f3757 +dyld_sim (551.1) <A356F82B-146B-353D-9FC1-250800B6B67C> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x1153d2000 -        0x11541cacf  dyld (551.4) <8A72DE9C-A136-3506-AA02-4BA2B82DCAF3> /usr/lib/dyld

我已经遍历了所有Xamarin文档的绑定过程以及此处和Xamarin论坛上无数的线程,但没有任何内容。大多数错误指向涉及iOS系统但未嵌入框架的内容。

要添加,ive尝试了两种方法(.framework和.a)以及手动添加或在“本机引用”部分中添加。更糟的是,有一个较早版本的SDK已被另一位同事捆绑使用,并且可以正常工作了。但是我需要使用最新版本,因为它们在内部添加并重组了一些内容。

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

一段时间后,我终于解决了这个问题。通用框架未使用Lipo正确完成。绑定项目和主项目没有建立任何问题,但是在运行时崩溃了。解决方案是适当地获得通用框架,然后简单地分别绑定每个切片(设备或模拟器)。