应用程序在操作系统版本为15及以上的iOS模拟器上立即崩溃



我正试图在操作系统版本为15.2的iOS模拟器上运行一个应用程序,该应用程序会立即崩溃。我还试着在操作系统版本为13.7的模拟器上运行,一切都正常。我还想指出,在操作系统为15.0.1的真实设备上进行测试效果良好——只有操作系统为15及以上的模拟器才有问题。(不过我没有在操作系统14上尝试(。

我看到的例外是:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL URLByAppendingPathExtension:]: component, components, or pathExtension cannot be nil.'

我还在日志中看到以下错误

2022-01-23 22:17:56.420470+0200 ********[99005:556023] [Assert] failed to get type for URL (file:///Users/**********/Library/Developer/CoreSimulator/Devices/70A52D90-4707-4CF8-9804-D2F030583E8D/data/Containers/Data/Application/97394EA4-CEB7-45FC-B624-41389A934FC0/Library/MyDocument.md) error: The file “MyDocument.md” couldn’t be opened because there is no such file.

它要找的MyDocument.md是什么?

这里还有调用堆栈:

0   CoreFoundation                      0x000000010b5f6ba4 __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00000001097f4be7 objc_exception_throw + 48
2   Foundation                          0x00000001092a2fe8 -[NSURL(NSURLPathUtilities) URLByDeletingPathExtension] + 0
3   UIKitCore                           0x000000011ae3d46b -[UIDocument saveToURL:forSaveOperation:completionHandler:] + 270
4   FLOTelematicsSDK                    0x0000000109fb4b75 _Z35FLOEncryption_streamBlockEnryptDataP20FLOEncryptionContext17Uint32PointerData + 11764
5   FLOTelematicsSDK                    0x0000000109fb65e1 _Z35FLOEncryption_streamBlockEnryptDataP20FLOEncryptionContext17Uint32PointerData + 18528
6   libdispatch.dylib                   0x0000000109a0565a _dispatch_call_block_and_release + 12
7   libdispatch.dylib                   0x0000000109a0683a _dispatch_client_callout + 8
8   libdispatch.dylib                   0x0000000109a13c88 _dispatch_main_queue_callback_4CF + 1075
9   CoreFoundation                      0x000000010b56484d __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
10  CoreFoundation                      0x000000010b55f0aa __CFRunLoopRun + 2772
11  CoreFoundation                      0x000000010b55e0f3 CFRunLoopRunSpecific + 567
12  GraphicsServices                    0x000000010ed0dcd3 GSEventRunModal + 139
13  UIKitCore                           0x000000011b548f42 -[UIApplication _run] + 928
14  UIKitCore                           0x000000011b54db5e UIApplicationMain + 101
15  SDKSandbox                          0x000000010081b60b main + 80
16  dyld                                0x0000000108fadee9 start_sim + 10
17  ???                                 0x0000000200ad34fe 0x0 + 8601285886
18  ???                                 0x0000000200ace000 0x0 + 8601264128
)

有人面对过这样的事情吗?

旁注:

  1. 我的应用程序使用第三方SDK,可能是SDK有问题吗
  2. xCode版本为13.2.1
正如matt在评论中指出的,问题确实出在SDK上。

最新更新