Open import file for Swift module: permission denied

As the name implies, I encountered a problem when I try to add a Swift file to my ObjC project. The bridge header is created and, as soon as I try to build, it stops with an error:

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

This only happens with 1 specific project (which is an old application that receives updates once a year or so). A newer project can quickly implement a fast file and build without any problems. I compared the build settings, but could not find the differences (and those that were there did not ultimately cause an error).

I tried to delete all the data related to Swift in the application, and let it be created again, which did not work. I also tried using both iOS8 and 8.1, but to no avail.

Currently, I have no idea what could lead to this, and so far I have not been able to find anything on StackOverflow or Google at all.

+1
source share
1 answer

The only method I found and ultimately used was to create a completely new Xcode project and restructure / import the old files. I spent an Apple ticket on this project, but they also could not help me with this problem.

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

+1
source

Source: https://habr.com/ru/post/987075/


All Articles