XCode,Swift(域 = NSPOSIXErrorDomain,代码 = 22) [英] XCode, Swift (Domain = NSPOSIXErrorDomain, Code = 22)

查看:41
本文介绍了XCode,Swift(域 = NSPOSIXErrorDomain,代码 = 22)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友向我提出了一个创建视频作品集应用程序的小请求.我认为这是尝试 Swift 的好借口,我就是这样做的.(该应用不打算在应用商店发布,只能通过 Testflight 分发)

My friend came to me with a small request of creating a video portfolio app. I thought it was a good excuse to try out Swift, which is what I did. (The app is not intended for release on the app store, only to distribute via Testflight)

我遇到了一些麻烦,在尝试运行我的项目时出现以下错误:

I've run into some trouble where I'm getting the following error when trying to run my project:

An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 22)

将包含 .mp4 视频文件的目录添加到我的捆绑资源"中的项目后出现错误.它涉及 6 个 .mp4 文件,总共约 1.2GB.

The error appeared after adding a directory with .mp4 video files to my project in my "Bundle Resources". It concerns 6 .mp4 files at around 1.2gb in total.

由于一开始我不知道为什么会发生错误,所以我决定重新做我的整个项目(一点点地复制).该项目一直运行到我添加包含视频的文件夹的部分.

As I couldn't figure out why the error happened in the first place, I decided to re-do my entire project (copying over bits and pieces). The project ran just until the part where I added the folder containing the videos.

我尝试删除引用和文件夹,但错误仍然存​​在.我真的很想搞清楚这个问题的根源,这样我就不必创建新项目,而只需删除造成问题的任何文件即可.

I've tried removing both the reference and the folder, but the error consist. I really want to get to the bottom of this, so that I instead of having to create a new project, I can just remove whatever files are creating the problem.

提前致谢.

推荐答案

就我而言,我无意中创建了目录Resources"并将其添加为对我的项目的引用.重命名此文件夹、清理项目并删除派生数据 (~/Library/Developer/Xcode/DerivedData/) 为我修复了它.

In my case, I had created the directory "Resources" absentmindedly and added it as a reference to my project. Renaming this folder, cleaning the project, and deleting the derived data (~/Library/Developer/Xcode/DerivedData/) fixed it for me.

这篇关于XCode,Swift(域 = NSPOSIXErrorDomain,代码 = 22)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆