Swift - Unable to open file in target Xcode 10

前端 未结 15 961
独厮守ぢ
独厮守ぢ 2020-12-30 23:06

I am trying to run Aplication which I have downloaded from GitHub.

When I run get error unable to open file in target, I have Xcode 10.

I already searched f

15条回答
  •  -上瘾入骨i
    2020-12-30 23:42

    A solution I found to work for me was

    Inside the project root directory

    root
      |- 
      |- .xcodeproj
      |- .xcworkspace
      |- Tests
      |- Podfile
      |- Podfile.lock
      |- Pods
    

    Delete the following files. Ensure you have copied the contents of Podfile.

    1. Podfile
    2. Podfile.lock
    3. Pods Folder

    Open your .xcodeproj using Xcode or using terminal command

    open .xcodeproj
    

    Inside Xcode, locate the "Pods" folder which should contain something along the lines of...

    Pods
    |- Pods-.debug.xconfig
    |- Pods-.release.xconfig
    

    Delete those references and select "move to trash" when prompted.

    Close Xcode

    Now run the following:

    pod init && pod install
    

    Open your Podfile and paste in your previously copied old Podfile that was deleted earlier.

    run the following command:

    pod install
    

    In terminal open Xcode again with the following command

    open .xcworkspace
    

    Note: that I opened the xcworkspace file NOT the xcodeproj file.

    At this point for me I was able to compile my code as normal without having to change back to the Legacy Build System.

提交回复
热议问题