DYLD,没有名称为(@ rpath / libswiftCore.dylib)的缓存图像]]

问题描述 投票:0回答:1

我在tvOS 12.2上崩溃,并包含以下详细信息:

Incident Identifier: 57DC9DA3-536C-438E-91A0-2A3BF5290302
CrashReporter Key:   336395bb8937c2da230441e7d0f77cf6ce5d29e2
Hardware Model:      AppleTV5,3
Process:             yospace-tvos-test [535]
Path:                /private/var/containers/Bundle/Application/8D86BE15-0069-48A0-A6CC-AF32ABCB718B/yospace-tvos-test.app/yospace-tvos-test
Identifier:          com.x..yospace-tvos-test
Version:             1 (1.0)
AppStoreTools:       11C504
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.x..yospace-tvos-test [856]


Date/Time:           2020-02-06 09:25:36.5008 +0000
Launch Time:         2020-02-06 09:25:36.2246 +0000
OS Version:          Apple TVOS 12.2 (16L5201d)
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, no cache image with name (@rpath/libswiftCore.dylib)
Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                            0x00000001009b63b8 __abort_with_payload + 8
1   dyld                            0x00000001009b59f8 abort_with_payload_wrapper_internal + 100
2   dyld                            0x00000001009b5a28 fcntl + 0
3   dyld                            0x00000001009788fc dyld::fastBindLazySymbol+ 18684 (ImageLoader**, unsigned long) + 0
4   dyld                            0x000000010097b6e8 dyld::_main+ 30440 (macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 5396
5   dyld                            0x0000000100975044 _dyld_start + 68

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000009   x2: 0x000000016f56a980   x3: 0x0000000000000014
    x4: 0x000000016f56a580   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000420
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x0000000000000001  x11: 0x0000000100a34000
   x12: 0x0000000100a34000  x13: 0x0000000000000007  x14: 0x6172462f7070612e  x15: 0x00736b726f77656d
   x16: 0x0000000000000209  x17: 0x0000000000000010  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016f56a580  x21: 0x0000000000000014  x22: 0x000000016f56a980  x23: 0x0000000000000009
   x24: 0x0000000000000006  x25: 0x000000000000002f  x26: 0x00000001009cf5e0  x27: 0x00000001009cf000
   x28: 0x00000001009cfa00   fp: 0x000000016f56a550   lr: 0x00000001009b59f8
    sp: 0x000000016f56a510   pc: 0x00000001009b63b8 cpsr: 0x40000000

EOF

如果我通过Xcode运行该应用程序,那很好,但是当我将其导出为IPA并将其安装在Apple TV上时,它会在启动时立即崩溃。在tvOS 13和iOS 11-13上的IPA上运行良好。我猜想这与tvOS 13中的Swift ABI稳定性有关,因此它不需要13的Swift库,而12则需要Swift库,即使我说过它应该始终嵌入要努力解决的Swift标准库,找到它们,或者基于崩溃日志结尾处列出的二进制映像中缺少Swift库而根本不包含它们(由于体长限制,以上未包括在内)。

Apple TV的控制台报告以下内容:

尝试添加ID信息不足的应用,信息{BKSApplicationStateAppIsFrontmost = 1;BKSApplicationStateExtensionKey = 0;SBApplicationStateDisplayIDKey =“ com.x..yospace-tvos-test”;SBApplicationStateKey = 8;SBApplicationStateProcessIDKey = 535;SBMostElevatedStateForProcessID = 8; }

该应用程序是用ObjC编写并使用Swift框架可能(或可能不相关)。>>

我已经看到很多关于libswiftCore未被加载的帖子,但是这种情况是在与Xcode连接而不是从IPA安装时发生的。我没有运气找到任何收到此崩溃消息的人,也没有运气获得“尝试添加ID不足的应用程序”消息(尽管人们似乎经常点击它)。

我在tvOS 12.2上崩溃,具有以下详细信息:事件标识符:57DC9DA3-536C-438E-91A0-2A3BF5290302 CrashReporter密钥:336395bb8937c2da230441e7d0f77cf6ce5d29e2硬件模型:...

ios objective-c swift xcode tvos
1个回答
0
投票

我已经找到解决此问题的方法。只需将一个虚拟Swift文件(其中包含虚拟类)添加到ObjC应用程序项目即可解决此问题。不需要桥接头,也不需要实际在任何地方引用伪类。

它没有回答为什么会发生的问题,但是Xcode中可能存在问题,这只会迫使它包括Swift标准库。

© www.soinside.com 2019 - 2024. All rights reserved.