Swift - Unable to open file in target Xcode 10

前端 未结 15 882
独厮守ぢ
独厮守ぢ 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条回答
  • 2020-12-30 23:42

    A solution I found to work for me was

    Inside the project root directory

    root
      |- <ProjectName>
      |- <ProjectName>.xcodeproj
      |- <ProjectName>.xcworkspace
      |- <ProjectName>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 <ProjectName>.xcodeproj
    

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

    Pods
    |- Pods-<ProjectName>.debug.xconfig
    |- Pods-<ProjectName>.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 <ProjectName>.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.

    0 讨论(0)
  • 2020-12-30 23:44

    For me it works, update the version of CocoaPods and reinstall the pods

    sudo gem install cocoapods
    
    0 讨论(0)
  • 2020-12-30 23:44

    delete file name "Podfile.lock" and try pod install again.

    0 讨论(0)
提交回复
热议问题