我已经反复显示下面的日志。 在 MacOS Catalina 版本 10.15.4 中安装 Xcode 12 后发生此崩溃
任何人请帮我解决这个崩溃。
Process: Spotlight [3454]
Path: /Applications/Xcode 12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications/Spotlight.app/Spotlight
Identifier: Spotlight
Version: 1.0 (1)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [3294]
Responsible: SimulatorTrampoline [2445]
Date/Time: 2020-09-26 07:23:36.460 +0530
OS Version: Mac OS X 10.15.4 (19E266)
Report Version: 12
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/jitendra/Library/Developer/CoreSimulator/Caches/dyld/19E266/com.apple.CoreSimulator.SimRuntime.iOS-14-0.18A372
DYLD_ROOT_PATH=/Applications/Xcode 12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
Time Awake Since Boot: 1800 seconds
System Integrity Protection: disabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGKILL)
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: …Run Code Online (Sandbox Code Playgroud) 首先免责声明:我使用 Mac Mini 和 Apple Silicon M1。
由于 Xcode 12 中的已知错误,我在 Excluded Architectures 中设置了 arm64:
链接的框架“XXXXXX”缺少此目标所需的一个或多个架构:arm64。
因为我改变了模拟器的控制台(仅在 iOS 14 中)在启动时打印大量错误,关于错误的哈希模拟器:
[db] LSSchemaConfigureForStore 失败,错误错误域=NSOSStatusErrorDomain 代码=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xc853fe2e 5309ad0b 85774b3404e7df374b3404e7df34b304e7df35c535c5c535c54c535c535c , WrongSimulatorHash={length = 32, bytes = 0x762c6c62 f729dcd9 f2ce6d7b bb9aec8d ... d11ece5a 5fc731a0 }}
还有其他人有这个问题吗?问候。
通过 using 将 TabView 用作 pageviewer.tabViewStyle(PageTabViewStyle())工作正常,但试图通过应用让它从边缘运行到边缘edgesIgnoringSafeArea似乎不起作用。
我在这里缺少什么?
struct ContentView: View {
let colors: [Color] = [.red, .green, .blue]
var body: some View {
TabView {
ForEach(0...2, id: \.self) { index in
Rectangle()
.fill(colors[index])
}
}
.tabViewStyle(PageTabViewStyle())
.edgesIgnoringSafeArea(.all)
}
}
Run Code Online (Sandbox Code Playgroud)
将另一个添加 .edgesIgnoringSafeArea(.all)到RectangleorForEach也不起作用。
请注意,所有这些问题都不同,因为它们不使用 use PageTabViewStyle():
在我的应用程序中,我将 VNImageRequestHandler 与自定义 MLModel 一起用于对象检测。
该应用程序适用于 14.5 之前的 iOS 版本。
当 iOS 14.5 到来时,它打破了一切。
try handler.perform([visionRequest])抛出错误时(Error Domain=com.apple.vis Code=11 "encountered unknown exception" UserInfo={NSLocalizedDescription=encountered unknown exception}),pixelBuffer内存被保留并且永远不会释放,它使 AVCaptureOutput 的缓冲区满然后新帧没来。由于内存泄漏,应用程序在一段时间后崩溃。
请注意,在 iOS 14.5 版本之前,检测工作完美,try handler.perform([visionRequest])永远不会抛出任何错误。
这是我的代码:
private func predictWithPixelBuffer(sampleBuffer: CMSampleBuffer) {
guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else {
return
}
// Get additional info from the camera.
var options: [VNImageOption : Any] = [:]
if let cameraIntrinsicMatrix = CMGetAttachment(sampleBuffer, kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix, nil) {
options[.cameraIntrinsics] = cameraIntrinsicMatrix
} …Run Code Online (Sandbox Code Playgroud) 是否可以在 Xcode 12 中创建 Xcode 小部件但不使用 SwiftUI,而是使用 XIB 文件来构建小部件 UI?
我已将 iPhone 设备升级到 iOS 14 测试版和 Xcode 12 测试版。然后我的 React Native 项目上的所有 Image/Fast Image 都无法显示(在以前的 iOS 13 和 Xcode 11.5 上运行良好)。
我有一个UIDocumentPickerViewController只选择图像。这在 iOS 13 中运行良好:
let supportedTypes: [String] = ["public.image"]
let documentPickerViewController = UIDocumentPickerViewController(documentTypes: supportedTypes, in: .import)
Run Code Online (Sandbox Code Playgroud)
我正在尝试在 iOS 14 中实现相同的目标。
但是,init(documentTypes:in:)在 iOS 14.0 中已弃用。
所以我假设我必须使用这个初始化程序: init(forOpeningContentTypes:asCopy:)
该forOpeningContentTypes参数需要一个UTType.
我不确定如何使用/导入它。
像[UTType.Image]吗?
let supportedTypes: [UTType] = [UTType.Image]
self.viewController = UIDocumentPickerViewController(forOpeningContentTypes: supportedTypes, asCopy: true)
Run Code Online (Sandbox Code Playgroud)
这甚至不会编译,因为Cannot find type 'UTType' in scope.
我也试过import MobileCoreServices甚至import CoreServices,但这没有帮助。
文档初始化为新的文件选择器指向此UTTypeReference -所以我试图用,但它也不能被发现。
我如何才能UIDocumentPickerViewController在 iOS 14 中只选择图像?
更新
这有效(感谢@Warren):
import UniformTypeIdentifiers …Run Code Online (Sandbox Code Playgroud) 由于我将 Xcode 更新为 Xcode 12,因此在构建时出现此错误:
Check dependencies
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)
Run Code Online (Sandbox Code Playgroud)
我尝试了很多东西:
pod installBuild Active Architecture Only为No或Yes进行调试和发布不知道该怎么办。当我想在 iOS 14 上启动时会出现此错误,但在 iOS 13.7 中,此操作完美无缺。
- 编辑 -
我通过在“MyProject”和“MyProjectTest”中添加arm64 arm64e armv7 armv7s x86_64到 来解决我的问题,VALID_ARCHS现在它可以工作了。
我的应用程序使用 GeometryReader 和一些填充来设置 NavigationView 内的视图框架尺寸。
从 iOS 14 开始,我收到以下错误消息:
无效的框架尺寸(负或非有限)
下面是一些要测试的示例代码:
import SwiftUI
struct ContentView: View {
let padding:CGFloat = 16.0
var body: some View {
NavigationView {
GeometryReader { p in
Text("Hello, world!")
.frame(width: p.size.width - padding)
.padding()
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Run Code Online (Sandbox Code Playgroud)
删除 NavigationView 解决了这个问题,但我需要 NavigationView 中容器视图的当前宽度和高度。
有什么建议吗?
ios14 ×10
xcode12 ×6
ios ×5
swift ×3
swiftui ×3
react-native ×2
xcode ×2
coreml ×1
image ×1
ios-vision ×1
macos ×1
memory-leaks ×1
widget ×1
widgetkit ×1