Swift:iOS 12.2应用启动时崩溃 [英] Swift: iOS 12.2 Crash of the app on launch

查看:105
本文介绍了Swift:iOS 12.2应用启动时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在更新Xcode和Swift 5之后,在iOS 12.2上启动模拟器后,我的应用程序在启动时崩溃了。但是在早期版本的ios(例如12.0)中,该应用程序可以正常运行。我在真实设备ios 12.0.1上启动了该应用程序,并且该应用程序正常运行,然后在iOS设备12.2上启动了该应用程序,并且该应用程序崩溃了。

after updating Xcode and swift 5, after launching the simulator on iOS 12.2 my application crash on launch. But in earlier versions of ios (like 12.0) the application works correctly. I launched the application on a real device ios 12.0.1 and the app is working properly, then launched the application on an iOS device 12.2 and the app crash

我不知道它是否相关,但是在控制台中我收到以下消息:

I do not know if it's related but in the console I have this message:


objc [39432]:Swift类扩展和Swift类$ b上的类别$ b不允许使用+ load方法

objc[39432]: Swift class extensions and categories on Swift classes are not allowed to have +load methods

然后将Xcode重定向到 0_abort_with_payload

Then Xcode redirects to 0_abort_with_payload:

    libsystem_kernel.dylib`__abort_with_payload:
    0x11365200c <+0>:  movl   $0x2000209, %eax          ; imm = 0x2000209 
    0x113652011 <+5>:  movq   %rcx, %r10
    0x113652014 <+8>:  syscall 
->  0x113652016 <+10>: jae    0x113652020               ; <+20>
    0x113652018 <+12>: movq   %rax, %rdi
    0x11365201b <+15>: jmp    0x113634457               ; cerror_nocancel
    0x113652020 <+20>: retq   
    0x113652021 <+21>: nop    
    0x113652022 <+22>: nop    
    0x113652023 <+23>: nop    


推荐答案

问题已解决;我使用了Swinject CocoaPod,因此在Podfile中,我用以下方法更新了该Pod的相应行:

The problem is solved; I use the Swinject CocoaPod so in the Podfile I updated the corresponding line for that pod with:

pod 'SwinjectStoryboard', :git => 'https://github.com/mdyson/SwinjectStoryboard.git', :branch => 'master'`

这篇关于Swift:iOS 12.2应用启动时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆