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

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

问题描述

我是一名在Xcode和swift中工作的新手。
我正在使用我的Macbook上的iOS项目(假期时),并且我一直在使用github版本控制,现在我已回到家中,现在正在使用我的mac mini。
目前在Xcode 6.3.1中工作,目标是iOS 8.3



因此,我已经在mac mini上克隆了我的项目,并且在打开并尝试构建项目我收到错误:
$ b


打开模块Swift的导入文件:Permission denied


我正在查看错误,它似乎是4个问题,我的AppDelegate.swift和3个ViewController.swift文件(我只有3个瞬间)



我看过这里的另一个问题 - 打开模块'Swift'的导入文件:Permission denied ,但与我的问题无关。



我注意到的一些事情是


  1. 我的一些框架,即解析和螺栓以红色突出显示,
    i指向它们这些在我的Mac mini上的位置(不知道是否
    是c但是它们不再被高亮显示

  2. 在产品文件夹下,我的.app和.xctest文件高亮显示
    red。不知道如何解决这个问题

有没有人遇到过这个?我非常感谢你们的帮助。



干杯
加列斯

解决方案

所以我想出了导致这个问题的原因。这是'Build Settings'下的'搜索路径',它在我的框架中查找错误的位置。类似于Apple Mach-O链接器错误修复程序

它正在搜索我的macbook pro上的框架,我删除了框架搜索路径,然后重新添加我的Parse.framework,Bolts.framework和FBSDKCoreKit.framework。



该项目现在可以毫无问题地构建和运行。

I'm a newbie at working in Xcode and swift. I was working on a iOS project on my macbook (while on holiday), and i've been using github version control, i've now returned to home and now working on my mac mini. Currently working in Xcode 6.3.1 and the target is for iOS 8.3

So i've cloned my project on the mac mini, and when opening and trying to build the project i get the error:

Opening import file for module 'Swift': Permission denied

I'm looking at the errors and it seems to be 4 issues, my AppDelegate.swift, and 3 ViewController.swift files (i only have 3 of these at the moment)

I've had a look at another question on here - Opening import file for module 'Swift': Permission denied but it's not relevant to my issue.

A couple things i noticed were

  1. some of my frameworks i.e. parse and bolts were highlighted in red, i pointed them to the location of these on my mac mini (not sure if that was the correct thing to do), but they aren't highlighted anymore.
  2. Under the products folder, my .app and .xctest files are highlighted red. Not sure how to fix that

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

Cheers Gareth

解决方案

SO i figured out what was causing this issue. It was the 'Search Paths' under 'Build Settings' that was looking in the wrong location for my frameworks. Similar to the Apple Mach-O linker error fix

It was searching my for the frameworks on my macbook pro, I deleted the 'Framework Search Path' and then re-added my Parse.framework, Bolts.framework and FBSDKCoreKit.framework.

The project now builds and runs just as it should without any issues.

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

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