我尝试在iOS13 Beta上测试应用。当我在欢迎屏幕上点击按钮以选择另一个屏幕时,应用程序冻结,然后终止。当我在Xcode 11中进行调试时,我在控制台日志中看到以下警告行
[framework] CoreUI: RunTimeThemeRefForBundleIdentifierAndName() couldn't find Assets.car in bundle with identifier: '(null)'
[framework] CoreUI: RunTimeThemeRefForBundleIdentifierAndName() couldn't find Assets.car in bundle with identifier: '(null)'
Run Code Online (Sandbox Code Playgroud)
然后几秒钟后,应用程序终止并显示日志条目:
Message from debugger: Terminated due to memory issue
Run Code Online (Sandbox Code Playgroud)
在iOS 12上没有这样的问题。我用几个资产文件创建了简单的测试应用程序,并在单击按钮时进行筛选工作正常。我也将目标版本更改为iOS 13,更改了包标识符,进行了清理和重建-但问题并没有消失
尽管进行了try?施工,我还是在我的应用程序中发现了一些崩溃。记录的 firebase crashlytics
Fatal Exception: NSInvalidArgumentException
Invalid number value (infinite) in JSON write
Run Code Online (Sandbox Code Playgroud)
这是一个测试示例
let avgSpeed = 0.1 / 0
print(avgSpeed)
let data = ["average_speed" : avgSpeed]
if let body = try? JSONSerialization.data(withJSONObject: [data]) {
print("success")
} else {
print("unable to make body for call")
}
Run Code Online (Sandbox Code Playgroud)
为什么会这样?
iOS 13,快速 4