Opening import file for module 'Swift': Permission denied

杀马特。学长 韩版系。学妹 提交于 2019-12-18 09:39:12

问题


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

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).

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.

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.


回答1:


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.

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



来源:https://stackoverflow.com/questions/26258264/opening-import-file-for-module-swift-permission-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!