The file * couldn't be opened because you don't have permission to view it

The file * couldn't be opened because you don't have permission to view it. 

最近,经常在接收别人的代码时出现,出现的原因的可能性也有很多,现在我列举一部分:

 第一种:查看工程中警告,发现需要更新旧工程的设置:

          

        双击警告,在弹出的更新,更新设置。

       

 第二种:Project---Build Setting中 修改这一项,变成Default Compiler(Apple LLVM X)            

       

 第三种:直接product -clean一下就ok.

 第四种:清除缓存

          Xcode->Preferences->

 第五种:把info.list的Executable file 与building set 中的product_name改成一致,例如都为$(PRODUCT_NAME)

   

 第六种:编译文件是否添加,或添加完毕。

原文地址:https://www.cnblogs.com/fmdxiangdui/p/7607706.html