我不能再在模拟器上运行我的应用程序了。Online建议我编辑我的项目。Pbxproj,但这似乎不起作用。如何恢复在模拟器上运行项目的能力(并在设备上仍然能够这样做)?我正在开发另一个项目,该项目使用了许多相同的框架,但它运行在模拟器上。什么会导致类似的框架在一个项目中工作,而在另一个项目中不工作?
当前回答
可能的原因是
framework which you are using may not be built for simulator architecture(x86_64), you can check the compatibility by going to framework folder (framework_name.framework --> modules --->framework_name.swiiftModule-->) in this path you should see arm/i386/x86_64 support files if you have updated to new Xcode, the frameworks you are using are not compatible to the newer compiler version, so vendor needs to share the recent compatible one, in this case you will not be able to run on both device and simulator
其他回答
我想你所链接的框架只是为arm架构而构建的。你不能在模拟器中运行它。您将需要框架的作者来构建一个“通用框架”。
我在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]
如果使用Carthage,请确保使用copy-frameworks脚本,而不是使用Embed & Sign作为嵌入内容。我得到了同样的错误,因为我忘记了。
当我将我的自定义框架添加到项目中时,在我更新Xcode后,我遇到了同样的问题。
解决方案:在项目的构建设置下搜索验证工作区 更改为yes,默认设置为no
可能的原因是
framework which you are using may not be built for simulator architecture(x86_64), you can check the compatibility by going to framework folder (framework_name.framework --> modules --->framework_name.swiiftModule-->) in this path you should see arm/i386/x86_64 support files if you have updated to new Xcode, the frameworks you are using are not compatible to the newer compiler version, so vendor needs to share the recent compatible one, in this case you will not be able to run on both device and simulator
推荐文章
- Xcode 4 -在新的Macintosh安装上的配置文件上“没有找到有效的签名标识”错误
- Xcode +删除所有断点
- 在iPhone上确定用户是否启用了推送通知
- 是否有可能禁用浮动头在UITableView与UITableViewStylePlain?
- Swift:理解// MARK
- 错误ITMS-9000:“冗余二进制文件上传。火车1.0版本已经有一个二进制版本上传。
- Swift -转换为绝对值
- 从父iOS访问容器视图控制器
- 自定义dealloc和ARC (Objective-C)
- 调整UITableView的大小以适应内容
- 在代码中为UIButton设置一个图像
- NSRange从Swift Range?
- UICollectionView中的单元格间距
- 我如何在我的iOS应用程序中每n分钟得到一个后台位置更新?
- 你常用的Xcode快捷键有哪些?