我不能再在模拟器上运行我的应用程序了。Online建议我编辑我的项目。Pbxproj,但这似乎不起作用。如何恢复在模拟器上运行项目的能力(并在设备上仍然能够这样做)?我正在开发另一个项目,该项目使用了许多相同的框架,但它运行在模拟器上。什么会导致类似的框架在一个项目中工作,而在另一个项目中不工作?


当前回答

如果你是Xcode的新手,使用Xcode只是为了启动模拟器来运行appium工具,以上步骤可能会比较复杂。对于初学者来说,使用小于11的xcode版本即可。

此链接有助于下载xcode 10.3

Xcode10.3

如果你尝试从AppStore下载,我们需要有高达40gb的空闲存储空间,上述' xip文件将不会导致存储错误。

你可以稍后感谢我,如果这工作!!

其他回答

No doubt that the fix in case of Xcode 12.3 is to setup the Validate Workspace property in the target's build setting. However if you check the diff after this change, the reason of the build error is the missing parameter (VALIDATE_WORKSPACE) from the project file, not the value of the parameter. So you don't need the value to be YES. You need to add the value to the project settings and you can leave it on the default value (NO). At the first time, it shows up in the Build Settings with NO, but only because that is the default value of the missing parameter.

TLDR; 在不更改项目设置的情况下,转到目标的构建设置,找到“验证工作区”,将其设置为YES,然后设置回NO。

当我将我的自定义框架添加到项目中时,在我更新Xcode后,我遇到了同样的问题。

解决方案:在项目的构建设置下搜索验证工作区 更改为yes,默认设置为no

Xcode 12.3

在我的案例中,我通过在Build Settings选项卡中简单地将Validate Workspace设置为Yes来解决这个问题

如果你是Xcode的新手,使用Xcode只是为了启动模拟器来运行appium工具,以上步骤可能会比较复杂。对于初学者来说,使用小于11的xcode版本即可。

此链接有助于下载xcode 10.3

Xcode10.3

如果你尝试从AppStore下载,我们需要有高达40gb的空闲存储空间,上述' xip文件将不会导致存储错误。

你可以稍后感谢我,如果这工作!!

我在Xcode v12.3和Universal(fat) Framework(.framework)上运行了这个错误

Building for iOS Simulator, but the linked and embedded framework was built for iOS + iOS Simulator.

解决方案1:是Toggle/Toggle验证工作区(不是默认)

方案二:使用XCFramework[About]