问题:

我正在尝试在Xcode中生成UItest。 当我尝试刷UIview时出现错误:

Timestamped Event Matching Error: Failed to find matching element

错误窗口

在此输入图像描述

如果我尝试点击UIView,也会发生这种情况。

I’m trying to generate a UItest in Xcode.When I try to swipe UIview I get an error:error windowThis also happens if I try to tap UIView.

问题:

尝试在xcode 6 beta 6 OSX Swift项目中打印对象( po命令)会导致出现此错误消息:

(lldb) po managedObject
error: Error in auto-import:
failed to get module '__ObjC' from AST context

在这种情况下,有问题的对象是NSManagedObject一个实例。

关于如何帮助自动导入将__ObjC module转换为LLVM抽象语法树上下文的任何建议?

An attempt to print object ( po command) in xcode 6 beta 6 OSX Swift project results in this error message:In this case the object in question is an instance of NSManagedObject .Any advice on how to help auto-import in getting __ObjC module into LLVM Abstract Syntax Tree context?

问题:

我有一个非常简单的应用程序,只有一个视图,包含几个UILabel。 在Simulator中运行时,Xcode控制台返回错误:

libMobileGestalt MobileGestalt.c:875:此平台不支持MGIsDeviceOneOfType。

模拟器本身只显示一个白色屏幕。 我也尝试在具有相同白屏的开发者设备上运行它。 我搜索过文档,但找不到任何对MGIsDeviceOneOfType引用。 该应用程序是在Mac OS 10.14上的Xcode 10 beta版中用Swift编写的。 我试图在iPhone 7-X模拟器以及开发iPhone 7上运行它,所有这些都运行目标软件(12.0)。

I have a very simple application with a single view, containing several UILabels.Upon running in Simulator, the Xcode console returns the error:libMobileGestalt MobileGestalt.c:875: MGIsDeviceOneOfType is not supported on this platform.The Simulator itself just shows a white screen.I’ve also tried running it on a developer device with the same white screen.I’ve searched documentation but can’t find any reference to MGIsDeviceOneOfType .The application is written in Swift in Xcode 10 beta on macOS 10.14.I am attempting to run it on the iPhone 7-X Simulators, as well as a development iPhone 7, all running the target software (12.0).

问题:

我已经声明了一个Swift协议:

protocol Option {
    var name: String { get }
}

我声明了这个协议的多个实现 – 一些类,一些枚举。

我有一个视图控制器,其属性声明如下:

var options: [Option] = []

当我尝试将此属性设置为在另一个VC的prepareForSegue中实现Option协议的对象数组时,我收到运行时错误:

fatal error: array cannot be bridged from Objective-C

为什么这不起作用? 编译器拥有它需要的所有信息,而且我不明白Objective-C与它有什么关系 – 我的项目只包含Swift文件,并且这些数组不会进入或退出任何框架方法需要他们与NSArray

I have declared a Swift protocol:I declare multiple implementations of this protocol—some classes, some enums.I have a view controller with a property declared as so:When I try and set this property to an array of objects that implement the Option protocol in another VC’s prepareForSegue , I get a runtime error:Why doesn’t this work?The compiler has all the information it needs, and I don’t understand what Objective-C has to do with it at all—my project contains only Swift files, and these arrays aren’t coming in or out of any framework methods that would necessitate them being bridged to NSArray .