打开模块'Swift'的导入文件:权限被拒绝 [英] Opening import file for module 'Swift': Permission denied

查看:209
本文介绍了打开模块'Swift'的导入文件:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所示,我目前正面临一个问题,即我正在尝试将Swift文件添加到我的ObjC项目中。生成桥接标头,一旦我尝试构建,它就会因错误而停止:

As the title shows, I'm currently facing a problem in which I'm trying to add a Swift file to my ObjC project. The bridging header is generated and as soon as I'm trying to build, it stops with the error:

<unknown>:0: error: opening import file for module 'Swift': Permission denied

这只发生在1特定项目(这是一个每年都会收到一次更新的旧应用程序)。一个较新的项目可以实现swift文件并构建没有任何问题。我已经比较了构建设置,但找不到任何差异(以及那些差异,最终没有导致错误)。

This only happens with 1 specific project (which is an old app that has been receiving updates once every year or so). A newer project can implement the swift file and build without any problems. I've compared the build settings but couldn't find any differences (and the ones that were there, eventually didn't cause the error).

我尝试过删除应用程序中的所有Swift相关数据,让它再次生成,这不起作用。我也尝试在iOS8和8.1上构建,但无济于事。

I've attempted to remove all the Swift related data in the app and let it get generated again, which didn't work. I've also tried to build on both iOS8 and 8.1, but to no avail.

我目前没有关于导致它的原因的想法,我没有到目前为止,能够在StackOverflow或Google上找到关于它的任何内容。

I'm currently out of ideas on what can cause it and I haven't been able to find anything on StackOverflow or Google in general about it so far.

推荐答案

我找到的唯一方法,最终使用的是创建一个全新的Xcode项目并重构/导入旧文件。我在这个项目上花了一张Apple票,但他们也没能帮我解决这个问题。

The only method I've found and eventually have used is by creating a completely new Xcode project and restructuring/importing the old files. I've spent an Apple ticket on this project, but they haven't been able to help me out with this problem either.

所以,我对此的答案是;创建一个新的Xcode项目,如果它太过时而无法实现Swift。

So, my answer to this is; Create a new Xcode project if it's too outdated to implement Swift.

这篇关于打开模块'Swift'的导入文件:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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