繁体   English   中英

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

[英]App crashes immediately on iOS Simulator with os version 15 and up

我正在尝试在操作系统版本为 15.2 的 iOS 模拟器上运行应用程序,应用程序立即崩溃。 我还尝试在操作系统版本为 13.7 的模拟器上运行,一切正常。 我还想指出,在 os 15.0.1 的真实设备上进行测试可以正常工作,只有 os 为 15 及更高版本的模拟器才有问题。 (虽然我没有在 os 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

正如马特在评论中指出的那样,问题确实出在 SDK 上。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM