Opening the import file for the Swift module.

I am new to Xcode and fast. I was working on an iOS project on my macbook (while on vacation) and I used github version control, now I'm back home and now working on my mini mini. Currently works in Xcode 6.3.1, and the goal is for iOS 8.3

So, I cloned my project on mac mini, and when I open and try to build a project, I get an error message:

Opening import file for 'Swift' module: Permission denied

I look for errors, and this seems to be 4 problems, my AppDelegate.swift and 3 ViewController.swift files (at the moment I only have 3 of them)

I examined another question here: Opening an import file for the Swift: Permission denied module , but this does not apply to my problem.

A few things I noticed were

  • some of my frameworks, that is, parsing and bolts were highlighted in red, I pointed to their location on my mac mini (not sure if this was the right thing), but they are not highlighted anymore.
  • My .app and .xctest red files are highlighted in the product folder. Not sure how to fix this.

Has anyone come across this before? I would really appreciate the help from you guys.

Cheers Gareth

+6
source share
6 answers

SO, I realized what causes this problem. These were the “Search Paths” in the “Build Settings” section, which looked in the wrong place for my frameworks. Similar to fixing Apple Mach-O linker error

He looked for my framework for my macbook pro, I deleted "Path Search Path" and then re-added my Parse.framework, Bolts.framework and FBSDKCoreKit.framework.

The project now builds and works the same way as without any problems.

+2
source

In our case, the error was that some of the frameworks were built using Xcode 7.1 on OSX 10.10, and then the binary files downloaded into the dependency manager (Carthage).

The failed project was compiled from Xcode 7.1 on OSX 10.11 , and he pulled these frameworks from Carthage.

Apparently, the inconsistency in OSX versions was causing problems. Once all the frameworks have been recompiled in OSX 10.11, it stops working.

Please note that sometimes this failed with permission denied in one of our frameworks, sometimes with permission denied in CoreData. Replacing the framework binaries with binary files built with 10.11 fixed the problem. On the other hand, frameworks built since 10.11 work fine on 10.10.

+3
source

For those who still have problems, here is my solution:

I tried everything that was recommended: from deleting any user data to creating a project from scratch to reinstall Xcode - nothing worked for me.

In the end, it turned out that the frameworks I used depended on the library mentioned in the error message (opening the import file for the "FRAMEWORK" Permission denied module, in my case it was CoreLocation). I built several of them, and the project was built perfectly on another Mac. Pulling this version from Github, the built-in frameworks threw the above errors. Therefore, I built every structure from scratch and built these frameworks into my final project. This time everything worked like on another Mac.

Only my two cents, since everything that I have seen so far can be solved differently than this.

+2
source

I solved this problem by deleting the search path of another user's framework in Xcode Search paths in the Build Settings section, this error occurred when I try to move the project between two users, everything is working fine when deleting the path.

+2
source

For everyone who is faced with this problem, here is what I did to solve it. I tried everything that was offered above, without any success. Here is my setup:

  • MacOS Sierra 10.12.5
  • Xcode 8.2
  • The framework built by Carthage 0.22 on our CI infrastructure

I get a "Failure Resolution" error for the embedded environment.

If I replaced all the frameworks with the ones built using Carthage on my machine, everything would work. If I used the ones built from CI, I would see the "Permission Denied" error.

I double-checked that the OS versions are identical and the Xcode versions are identical. I compared the values ​​of the Info.plist structure that was built on my machine from the CI infrastructure. I double-checked the file permissions for all the built-in frameworks of Carthage and the internal frameworks under Xcode.

If I replaced the problematic internally built framework with the one I created locally, the error then moved and gave me the "Permission to Deny" error in the UserNotifications module, which is located from Apple. It made no sense.

I missed everything but reinstall MacOS.

It turns out that the problem started after I added a new administrator to my machine to check something else. This user used only git.

After I deleted this user, I was able to build again believe it or not.

+2
source

In my case, when I clone a project from git to a new Mac (macOS Sierra and Xcode 7.3). Here is my error message: "Opening import file for module" MobileCoreServices: Permission denied ".

I tried reinstalling Xcode, but nothing worked.

In the end, I solved this problem by reinstalling macOS Sierra.

Here is my suggestion: I create a new administrator account on the new Mac, switch to a new account, and then delete the old administrator account, maybe I should not delete the old administrator account.

-1
source

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


All Articles