如何调试 "Failed to install" 消息?
How can I debug a "Failed to install" message?
我目前正在尝试使用 Xamarin.forms 开发跨平台移动应用程序。作为此应用程序的一部分,我需要在我的 Xamarin.iOS 项目中包含一个第三方 .framework。我已成功创建 Xamarin.iOS 绑定库 .dll 并将其包含在我的项目中。我能够引用该库并在没有错误的情况下进行编译,但是当我尝试将应用程序部署到 iPhone 模拟器时,该应用程序将启动,然后崩溃并显示“安装失败”消息。
Error Message
如果我删除任何引用此 .dll 的代码行,应用程序将 运行 正常。
有没有人知道如何解决这个问题?
可能有用的信息:
我正在 Visual Studio 开发 Windows
Xamarin 版本:16.7.000.440
Xamarin.iOS版本:13.20.2.2
XCode版本:12.0.1
iOS版本:14.0
设备崩溃日志:
Incident Identifier: 882D82AB-5511-48C1-AFCD-4B86933B2A5C
CrashReporter Key: 1cc59f0bc819c0d806e2c1ccdf7b24a413699a4f
Hardware Model: iPad7,11
Process: MyApp.iOS [452]
Path: /private/var/containers/Bundle/Application/A31E102C-4BB8-431A-ABDF-E17A503E1778/MyApp.iOS.app/MyApp.iOS
Identifier: com.Crossroads.MyApp
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.Crossroads.MyApp [614]
Date/Time: 2020-10-16 09:46:53.9542 -0500
Launch Time: 2020-10-16 09:46:53.9106 -0500
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, dependent dylib '@rpath/MyFramework.framework/MyFramework' not found for '/private/var/containers/Bundle/Application/A31E102C-4BB8-431A-ABDF-E17A503E1778/MyApp.iOS.app/MyApp.iOS', tried but didn't find: '@rpath/MyFramework.framework/MyFramework' '/System/Library/Frameworks/MyFramework.framework/MyFramework'
Highlighted by Thread: 0
Backtrace not available
Unknown thread crashed with ARM Thread State (64-bit):
x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016b701390 x3: 0x00000000000000c7
x4: 0x000000016b700f90 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x6f4d706163617461 x11: 0x656b6f54656c6962
x12: 0x6f77656d6172662e x13: 0x63617461442f6b72 x14: 0x656c69626f4d7061 x15: 0x0020276e656b6f54
x16: 0x0000000000000209 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x000000016b700f90 x21: 0x00000000000000c7 x22: 0x000000016b701390 x23: 0x0000000000000001
x24: 0x0000000000000006 x25: 0x0000000106cd4000 x26: 0x0000000000000001 x27: 0x0000000106cd4000
x28: 0x0000000000000000 fp: 0x000000016b700f60 lr: 0x0000000106cbbee8
sp: 0x000000016b700f20 pc: 0x0000000106cb4f68 cpsr: 0x00000000
esr: 0x00000000 Address size fault
Binary images description not available
Error Formulating Crash Report:
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯
EOF
来自 apple document,错误意味着您链接了框架,但没有 ember 它。
The app crashes at launch, because the dynamic linker can’t locate the
missing framework.
所以你需要做的是ember框架,这里是你可以参考的文档:
我目前正在尝试使用 Xamarin.forms 开发跨平台移动应用程序。作为此应用程序的一部分,我需要在我的 Xamarin.iOS 项目中包含一个第三方 .framework。我已成功创建 Xamarin.iOS 绑定库 .dll 并将其包含在我的项目中。我能够引用该库并在没有错误的情况下进行编译,但是当我尝试将应用程序部署到 iPhone 模拟器时,该应用程序将启动,然后崩溃并显示“安装失败”消息。
Error Message
如果我删除任何引用此 .dll 的代码行,应用程序将 运行 正常。
有没有人知道如何解决这个问题?
可能有用的信息:
我正在 Visual Studio 开发 Windows
Xamarin 版本:16.7.000.440
Xamarin.iOS版本:13.20.2.2
XCode版本:12.0.1
iOS版本:14.0
设备崩溃日志:
Incident Identifier: 882D82AB-5511-48C1-AFCD-4B86933B2A5C
CrashReporter Key: 1cc59f0bc819c0d806e2c1ccdf7b24a413699a4f
Hardware Model: iPad7,11
Process: MyApp.iOS [452]
Path: /private/var/containers/Bundle/Application/A31E102C-4BB8-431A-ABDF-E17A503E1778/MyApp.iOS.app/MyApp.iOS
Identifier: com.Crossroads.MyApp
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.Crossroads.MyApp [614]
Date/Time: 2020-10-16 09:46:53.9542 -0500
Launch Time: 2020-10-16 09:46:53.9106 -0500
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, dependent dylib '@rpath/MyFramework.framework/MyFramework' not found for '/private/var/containers/Bundle/Application/A31E102C-4BB8-431A-ABDF-E17A503E1778/MyApp.iOS.app/MyApp.iOS', tried but didn't find: '@rpath/MyFramework.framework/MyFramework' '/System/Library/Frameworks/MyFramework.framework/MyFramework'
Highlighted by Thread: 0
Backtrace not available
Unknown thread crashed with ARM Thread State (64-bit):
x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016b701390 x3: 0x00000000000000c7
x4: 0x000000016b700f90 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x6f4d706163617461 x11: 0x656b6f54656c6962
x12: 0x6f77656d6172662e x13: 0x63617461442f6b72 x14: 0x656c69626f4d7061 x15: 0x0020276e656b6f54
x16: 0x0000000000000209 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x000000016b700f90 x21: 0x00000000000000c7 x22: 0x000000016b701390 x23: 0x0000000000000001
x24: 0x0000000000000006 x25: 0x0000000106cd4000 x26: 0x0000000000000001 x27: 0x0000000106cd4000
x28: 0x0000000000000000 fp: 0x000000016b700f60 lr: 0x0000000106cbbee8
sp: 0x000000016b700f20 pc: 0x0000000106cb4f68 cpsr: 0x00000000
esr: 0x00000000 Address size fault
Binary images description not available
Error Formulating Crash Report:
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯
EOF
来自 apple document,错误意味着您链接了框架,但没有 ember 它。
The app crashes at launch, because the dynamic linker can’t locate the missing framework.
所以你需要做的是ember框架,这里是你可以参考的文档: