Xcode error build input files cannot be found

I am getting the following error when building in Xcode 10.0 with swift 4.2:

Update for Projects w/ Swift Packages

How did the errors happen?

I ran into this issue when I had imported Swift Packages into my project but later cleaned DerivedData to fix an unrelated app caching issue. My existing project was not a local Swift Package but an iOS app project.

Note that we can still encounter the same issue in local Swift Package projects.

What is the reason for the errors?

Swift Packages are checked out into DerivedData and are not referenced from the ModuleCache.noindex subfolder. Thus, cleaning the app’s folder in DerivedData or DerivedData itself breaks dependency resolution within Xcode for Swift Packages.

This is a misleading build error since there may be nothing wrong with the app code you’ve written or your dependency resolution graph. The only thing required is to refresh the dependencies.

How can I resolve the build errors?

Xcode now has nice options within the IDE itself to resolve Swift Packages. These options trigger a new checkout into DerivedData:

enter image description here

We can use three options, as shown in the image above depending on our use case:

  1. Reset Package Caches: Trigger a re-install of your existing Package dependencies w/ same versions.
  2. Resolve Package Versions: Use this option for updating Package checkouts when fixing Package Versions for cross-compatibility (in Project Settings).
  3. Update to Latest Package Versions: Use this to update all Swift Package dependencies to the latest versions. This option may be a local breaking change if the API changes.

NOTE: Apple’s documentation recommends to use Xcode for dependency resolution when working with Xcode projects excluding CLTs.

Other solutions

  1. We can also fix the error by restarting Xcode, but I find this step breaks my workflow and is tedious.

  2. If we are running from the command line (local Swift Package executable), we can stick with a swift build variant without jumping to Xcode at all (Source). swift build doesn’t work as easily out of the box in other projects, however.

  3. Use xcodebuild:

    xcodebuild -resolvePackageDependencies
    

I prefer staying in Xcode for simplicity but YMMV.

Build input file cannot be found: ‘/path/to/some/of/your/file1’, ‘/path/to/some/of/your/file2’, ….

There might be several reasons that cause this error. I will share one solution that fixes the one that happened to me the most.

Cause of the problem

For me, I got this error when I try to solve merge conflict that happen on project.pbxproj. When there is changes in project structure I have to figure out conflict that look like this:

A000701D256E5ADF009F48A4 /* UsageDetailViewModelTests.swift in Sources */,
17E973942505E3EA0084D10D /* MainTabBarViewModelTests.swift in Sources */,
174BF411251C9C1E00FE6214 /* CommonNotificationIconViewTests.swift in Sources */,
=====
NOT_A000701D256E5ADF009F48A4 /* UsageDetailViewModelTests.swift in Sources */,
NOT_17E973942505E3EA0084D10D /* MainTabBarViewModelTests.swift in Sources */,
NOT_174BF411251C9C1E00FE6214 /* CommonNotificationIconViewTests.swift in Sources */,

There might be a better way to resolve this, but I always solve it quick and dirty by accepting one of them, or sometimes I take both of them. Manual manipulates of project structure like this can cause corrupted project structure, which is the cause of the error we will solve today.

«Build input file cannot be found» error

Solution

  1. Open «Project Navigator» (Menu View > Navigators > Project ⌘ - command + 1).
  2. You will see a group name «Recovered References» that Xcode generated for you. If you have a large project, you can filter it out by type «Recovered References» at the very bottom of the project navigator.

Recovered References

Recovered References
If you have a large project, you can filter it out by type
If you have a large project, you can filter it out by type «Recovered References» at the very bottom of the project navigator.
  1. Inside the group, you should see a list of files mentioned in the «Build input file cannot be found» error.
  2. Next step might vary based on your situation. Normally, you will need to delete all red color files, which dictate that Xcode can’t find their reference in the destination paths.
  3. You need to add them back so Xcode knows where it should look for those files.
  • Xcode Release Notes

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.

@CuongNguyenV

I was able to build different environments using Xcode 13, but after updating to Xcode 14, I got this error:
error build: Build input file cannot be found: '/Users/user/Library/Developer/Xcode/DerivedData/.../Build/Products/GeneratedInfoPlistDotEnv.h'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

Any ideas? Thanks in advance!!

Xcode version: 14.0
react-native: 0.67.4
react-native-config: 1.4.6

@albat

Same issue on my side, project is working fine on XCode 13 and get the same error with XCode 14.
Tried to upgrade to 1.4.7 but doesn’t changed anything.
Also tried to build with legacy build settings, doesn’t helped neither :/

@CuongNguyenV

Same issue on my side, project is working fine on XCode 13 and get the same error with XCode 14. Tried to upgrade to 1.4.7 but doesn’t changed anything. Also tried to build with legacy build settings, doesn’t helped neither :/

My workaround is back to Xcode 13, hope it helps your case @albat

@victor-gil

Same problem here, any idea how to solve it?

@anhquan291

Facing the same issue. Any solutions yet guys? Thanks

@SYoder1

I am facing the same issues too. I really don’t want to revert back to XCode 13

@derrh

We were able to work around this issue. In our case, because the .podspec file doesn’t list $BUILD_DIR/GeneratedInfoPlistDotEnv.h as an output_file in its [CP-User] Config codegen Run Script phase, Xcode was not building react-native-config early enough. This caused our app target to fail because the header file had not been generated yet. Adding an output_files entry to the .podspec fixes this issue.

Here is a patch if you’re using patch-package:

$ cat patches/react-native-config+1.4.6.patch

diff --git a/node_modules/react-native-config/react-native-config.podspec b/node_modules/react-native-config/react-native-config.podspec
index 54985dd..854bfe7 100644
--- a/node_modules/react-native-config/react-native-config.podspec
+++ b/node_modules/react-native-config/react-native-config.podspec
@@ -25,7 +25,8 @@ HOST_PATH="$SRCROOT/../.."
 "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig/BuildDotenvConfig.rb" "$HOST_PATH" "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig"
 ),
     execution_position: :before_compile,
-    input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb']
+    input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb'],
+    output_files: ['$BUILD_DIR/GeneratedInfoPlistDotEnv.h']
   }
 
   s.requires_arc = true

We also had updated from a previous version of react-native-config which was generating the header file in a different location. As a result, we also had to update our Info.plist Preprocessor Prefix File build setting to point to the new location $(BUILD_DIR)/GeneratedInfoPlistDotEnv.h
image

@matrixyf

From my case, since we din’t use the feature of Availability in Build settings and Info.plist, we just removed the INFOPLIST_PREFIX_HEADER and it works, just like this solution

@anhquan291

@derrh
Update:
Thank you so much. It works. However, I cannot get the the variable from env in XCode any more :'(.

@sunweiyang

I have applied the patch recommended by @derrh but it does not resolve this issue for me.

Xcode version: 14.0
react-native: 0.68.2
react-native-config: 1.4.6

@xgenem

Experienced the issue today but didn’t really do anything other than try to Archive again and it went away.

@ajaykumar97

After spending hours of debugging, I ended up downgrading to the Xcode 13. It was the only solution for me as of now. When I compared the file changes since the last time the build was successfully archived, I observed that there were some code changes made by the Xcode 14(when I ran the build in it) in the file ios/<project_name>.xcodeproj/project.pbxproj something like:

/* ReactNativeConfig.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeConfig.xcodeproj; path = "../node_modules/react-native-config/ios/ReactNativeConfig.xcodeproj"; sourceTree = "<group>"; };

and

/* libReactNativeConfig.a in Frameworks */,

There were a couple more related to ReactNativeConfig.xcodeproj.

I reverted those, downgraded to Xcode 13, deleted Derived Data, tried archiving again and this time, it was successful.

1 more thing, I recently switched to the M2 Mac from Intel-Based Mac(last successful Archive was on Intel-Based Mac). I am not sure if that has anything to do with this issue.

I hope it will be helpful for someone.

@naheed-shamim

For me, in ios/.xcodeproj/project.pbxproj,

EXCLUDED_ARCHS = arm64 ;
which I removed, then started working

@luancurti

Working in 1.4.11 version

@Drckk

Switching the scheme works for me

I upgraded my Xcode SDK to version 10 last night and then find I cannot build.

I’m getting this error:

Build input file cannot be found:
‘/Users/call01/Library/Developer/Xcode/DerivedData/Comp-Lite-Apps-gytvmossqptokeafrddvvmnlzadk/Build/Products/Debug-iphoneos/SG11.app/SG11

which did not exist before my upgrade and I’m tempted to revert back but would like to stick with version 10 if I can resolve this issue.

1) Solution

Try to switch back to the Legacy Build System (File > Project Settings > Workspace Settings > Legacy Build System)

2) Solution

For Swift files or files that belong to the project such as:

Build input file cannot be found: PATH/TO/FILE/FILE.swift

This issue can happen when files or folders have been removed or moved in the project.

To fix it:

  1. Go in the project-navigator, select your project

  2. Select Build Phasestab

  3. In Compile Sources section, check for the file(s) that Xcode is complaining of

  4. Notice that the file(s) have the wrong path, and delete them by clicking on the minus icon

  5. Re-add the file(s) by clicking the plus icon and search in the project.

  6. Product > Clean Build Folder

  7. Build

You generally find these missing files in the Recovered References folder of Xcode in the project tree (look for the search bar at the bottom-left of Xcode and search for your complaining file):

Deleting them from this folder can also solve the error.

3) Solution

For me In Xcode 10, this solution worked like a charm. Just go to the Recovered References folder and remove all files in red color and add it again with proper reference.
If Recovered References folder was not found: Check for all missing files in the project (files in red colour) and try to add files references again.

enter image description here

4) Solution

Just check the path to .plist file in Build Settings of your target

enter image description here

5) Solution

Funnily, closing Xcode and reopening it might also be enough.

6) Solution

This worked for me in Xcode 10:

  • Click Project icon/name in your Xcode project
  • Go to General tab
  • Click [Choose info.plist File] under Identity section
  • Select the info.Plist file
  • Check Info tab to see if info.plist was loaded successfully
  • Build and run
7) Solution

The above solution eventually works for me; however, I need to do some more extra steps to finally make it to compile successfully. (These extra steps were required even on Xcode 9.)

  1. Xcode: File -> Workspace Settings -> Build System: Legacy Build System
  2. Xcode: Product -> Clean
  3. Rotate to compile thru different emulator types, such as «iPhone 8», «iPhone 8 Plus», etc. (They might fail or might not.)
  4. Eventually compile on «Generic iOS Device»
8) Solution

This is an architecture problem. Do not change to legacy build system!

I got the same error, but what solved it for me was this:

You see at the top?

The top says architectures in VALID_ARCHS are also excluded in EXCLUDED ARCHS. I was messing around with them to get a Swift Package to compile in Xcode 12, and have spent hours on this.

It would compile on the simulator and not on a device.

The Solution:

  • Go to Build Settings
  • Ensure «Architectures» contains 1 entry : $(ARCHS_STANDARD)
  • Ensure there is nothing in «Excluded Architectures»

Build Settings

  • Now scroll right to the bottom of Build Settings.
  • Make sure the VALID_ARCHS is exactly the same as this screenshot.
  • The arm stuff is $(ARCHS_STANDARD) again.
  • If VALID_ARCHS doesn’t exist, add it with the + button.

Add button for VALID_ARCHS

VALID_ARCHS

  • Clean (cmd-shift-K)
  • Your project should now build perfect on both the simulator and device!
  • If it doesn’t work, you need to make sure all these settings are the same both in your target build settings and the project build settings.
  • Note, if you have a Mac with Apple silicon, you may not need to do any of this.
9) Solution

I fixed this issue this way: go to your project’s Build Phases (click on project icon at the top, and then click on Build Phases). Search for your file there. If it’s there (it’ll be grayed out), delete it. Then clean (shift + alt + command + k), and run! Hope it helps.

10) Solution

If the error says it can’t find Info.plist and it’s looking in the wrong path, do the following:

  1. Select your project from the navigator, then select your target
  2. Select «Build Settings» and search «plist»
  3. There should be an option called Info.plist File. Change the location to the correct one.
11) Solution

None of the above worked for me, but this did:

  1. Open project in Finder, right click on your .xcodeproj file and show package contents
  2. Open project.pbxproj in a text editor
  3. Find the reference to your missing file
  4. Edit path = "path/to/file.swift" to the actual location on disk and save the file.
  5. Rebuild the project
12) Solution

In my case I had a build script that generated the .app binary (Buck).
The Buck build script ran in parallel with Swift Embed build step. Because the .app binary was not generated yet the Swift step would fail.

In my build script I added "$BUILD_PRODUCTS_DIR/$EXECUTABLE_PATH" under "Output Files".

This tells Xcode’s New Build System that this script will output the app Binary and in turn Xcode will make sure to synchronize any build steps that depend on this artifact.

enter image description here

13) Solution

I ran into this error after renaming a file. Somehow Xcode didn’t correctly rename the actual file on disk.

So it wasn’t able to find the file. Sometimes the files gets highlights with a red text color. At other times the Swift icon in front of the file was getting a gray overlay.

The fix was simple.

  • Look into the error and see exactly which file it’s unable to find.
  • Select the file that can’t be found.
  • Go to the ‘File Inspector’. It’s on Xcode’s right navigation pane.
  • Click on the folder icon.
  • Select the correct file.
  • Clean build and run it again.
14) Solution

Open the right navigation pane where your project files exist
OR JUST click on cmd + 1. Then search for «Recovered References» folder. Open it and delete all red files, then everything will work so fine.

15) Solution

I had a similar issue after upgrading to a new swift version recently.
Moving files around caused my xcode project to reference items that were no longer in the project directory giving me the Error Code Build Input File Not Found.

In my situation I somehow had multiple files/images that were being referenced as described below:enter image description here

In the image above.

  • Navigate to your Targets page.
  • Then Click on the Build Phases tab on the top.
  • Scroll Down to Copy Bundle Resources
  • Find the affected files and remove them. (hit delete on them or select them and hit the minus button )

It was in here that I somehow had multiple files and images that were being referenced from other folders and the build would fail as they could no longer find them. And I could not find them either! or how Xcode was still referencing them

I hope this helps someone else !

16) Solution

I had this happen for building my unit tests. This may have happened because I deleted the example tests.

I removed the Unit test bundle then re-added it as shown in the pictures below and all was well again.

enter image description here

enter image description here

17) Solution

This worked for me

  1. try deleting the red colored files
  2. delete the files in derived data
  3. clean the build folder
  4. then try building by using «new build system» from file->workspace settings
18) Solution

I had the same issue. The problem was that I didn’t have any file under the Target > Build Phases > Compile Sources. The problem was solved after I added at leas one file to Compile Sources.

19) Solution

Not that I did anything wrong, but I ran into this issue for a completely different reason and kinda know what caused this.

I previously used finder and dragged a file into my project’s directory/folder. I didn’t drag into Xcode. To make Xcode include that file into the project, I had to drag it into Xcode myself later again.

But when I switched to a new branch which didn’t have that file (nor it needed to), Xcode was giving me this error:

Build input file cannot be found:
‘/Users/honey/Documents/xp/xpios/powerup/Models
Extensions/CGSize+Extension.swift’


I did clean build folder and delete my derived data, but it didn’t work until I restarted my Xcode.

20) Solution

In my case, the file (and the directory) that XCode was mentioning was incorrect, and the issue started occurring after a Git merge with a relatively huge branch. To fix the same, I did the following steps:

  • Searched for the file in the directory system of XCode.
  • Found the errored file highlighted in red (i.e, it was missing).
  • Right clicked on the file and removed the file.
  • I tried building my code again, and voila, it was successful.

I hope these steps help someone out.

21) Solution

What Xcode was complaining about was a XIB file I got it working by going to Project -> Build Phases -> Copy Bundle Resources, removing the «problematic» XIB, cleaning (CMD+Shift+K), building and adding it back again.

22) Solution

There is also one possibility that sometimes when you move your files to different folder and especially when you move your info.plist to other folder, you need to define the location of that file. To solve this problem, simply click on your project blue icon on the top, and you will see a button in place of project name and bundle id, click on it and locate the info.plist file there, clean and compile happily.

23) Solution

I ran into this problem soon after upgrading to Xcode 10, but that was not the issue.

I tried changing the build system, but that gave me a separate error that meant the same thing. Generally saying «File X can not be found».

There are multiple things to check when a file can not be found.

  1. Recovered references Folder
    Apple does this nice thing where if it detects a reference to a file that doesn’t exists it will add this reference into a group called «Recovered References»

That is nice of Apple but it doesn’t always work.

  1. Build Phases Compile Sources
    In this list, there could be meta data for a file that the project is suppose to compile, but the file does not actually exists and it’s attempting to find the file at the given path. In this list it will be dimmed out, delete them and re-add them by toggling the file’s target dependencies or manually removing it and dragging it in.

  2. File’s Path
    Double check the file path that the error is printing out and the file path for the file in finder. You can easily see this by clicking on the file in Xcode and checking the «Show the file inspector» tab (the left most tab). If these paths are correct then you are good!

  3. Dimmed out files in your project that are not in recovered references or red
    This one pissed me off because it’s not obvious about what happened, but basically if you go into finder and move a file to a different location with out updating the reference in the project it will throw the error as the file no longer exists there. The only indication I have found for that is that the file in the «Project Navigator» tab (left most tab) is very slightly dimmed, but when you go to delete this file Xcode doesn’t prompt you to delete the reference or send to trash. You can fix this by deleting the file and re-adding it to the project or going to the «File Inspector» tab and click the folder icon next to the path and change it to the proper location.

Either way, the error indicates that it can’t find a file, switching to the old build system is a bandaid for a more concrete issue. We as developers understand that a compiler just wants an artifact to be listed at the end of a file path. Somewhere the path is not correct! We have to find where that is!

My issue was resolved with item 4 listed above. Hope this helps somebody.

24) Solution

In my case I accidentally deleted one third-party xcodeproj folder I used in my app.

25) Solution

If you tried profiling, and then it didn’t work, and now you cannot build, go into your Target pane (via the Project Icon), Switch to the Build Settings tab, search for PROFILE — and set CLANG_USE_OPTIMIZATION_PROFILE to «No».

26) Solution

In my case, I had created a new test target and deleted the default swift file so it was left with just the info.plist. Adding a new file fixed this.

27) Solution

The «Legacy Build System» solution didn’t work for me. What worked it was:

  1. Clean project and remove «DerivedData».
  2. Remove input files not found from project (only references, don’t delete files).
  3. Build (=> will generate errors related to missing files).
  4. Add files again to project.
  5. Build (=> should SUCCEED).
28) Solution

I know that this is an old subject, but I found the issue with xcode 12.3 and was related to an error while doing the CopyPlist of the main.Storyboard during compilation.

Actually, changing the build settings to «Legacy Build Setting» worked, but it is deprecated, so I discarded it because is a short term solution.

Check this:

enter image description here

With that setting, worked for me. Before I had «Copy plist».

29) Solution

After struggling with this issue for about 45mins, here is a super easy solution that worked for me.

  1. On the project explorer, click on the file/folder that is in red colour (means project is not able to locate the file)
  2. Look at the details tab in the file inspector (generally to the right of the screen — see the attached screenshot)
  3. Click on the folder icon and locate the real file/folder in your local machine.

That is it. This should do the trick. Basically help your xcode locate the directories and update the reference cache.

enter image description here

30) Solution

Random, for Cocoapods: I hadn’t added my test target to my Podfile.

Comments Section

Nice. But I am still wondering what is going to happen later? We need to fix our project but how?

@schmidt9 hats off, thank you very much you’re a life saver. secondly, I CANNOT believe this new build system was the issue. I’ve been struggling with this for days. after updating to iOS 12 and XCode 10, automatic signing was broke. I tried everything and even revoked and recreated all certs. and profiles. signing was fixed but the provisioning profile was always NONE. I COULD manually sign the app and it worked, but then the iCloud container and other entitelements were missing from the published app. anyway, fixed my issue. good lord how apple frustrates me with each update. cheers!

This fixed my issue with automatic signing and profiling. but I’m still having trouble with iCloud containers. when I install the app directly to my phone it works fine. I have an iCloud container and use iCloud documents to attaching files from the iCloud storage. but when I release the app to TestFlight, it doesn’t work. fails silently, as if the iCloud container is not even present in the distributed app’s profile. incredibly frustrating.

@Nexus this problem with new build system persists since Apple has launched it (xcode 8 or 9). Sorry did not deal with iCloud containers, cannot say what the problem may be there

@schmidt9 thanks anyway, switching back to Legacy Build System fixed my issue with the automatic signing. but I’m still stuck with my iCloud container T_T

I needed to go through some of these steps to get it working too.

I cannot find «Recovered References» on my project

What do you mean by «add it again with proper reference» after we’ve removed the red files?

@PrimeTimeTran I meant that You can add those file references again in your project, with drag and drop or copy paste. Just like adding a new file in the project.

@davidmlee I think what this guy means in other words is: «open all of your folders in the project, delete the red stuff, and add it in again.» There doesn’t need to be a recovered references folder.

I also deleted derived data, but simply closing/re-opening might have been enough.

I thought this was a Visual Studio way of fixing things… but it worked for me.

This answer is also applicable if you rename your app folder/structure. Thanks @keverly

Yep — I’d moved the plist into a separate folder. I think the folders used to be virtual and now they’re real (the old blue/yellow folder thing). Either way your answer was spot-on :-)

Sometimes when I rename from within XCode, the file in ‘Finder’ still holds the old name. Locate the file in ‘Finder’ and rename it to the new name.

in my case i changed my project folder name and it could not found my info.plist. This worked for me. cheers

How to add VALID_ARCHS in Xcode 12? I cannot find any + button to add it

@PersianBlue It’s the + button at the top — not very intuitive! I’ve added a screenshot to the original post.

I have mac with Apple Silicon. If I try to build the app I am getting the error as Showing All Errors Only Build input file cannot be found: ‘/Users/name/Library/Developer/Xcode/DerivedData/helloapp-dhdivlzaazbnhtguhlgnkkglsibo/Build/Products/Debug-iphonesimulator/Hello App.app/Hello App’. Any work around for this?

no way worked for me

This should be the top answer! Thank you!

XCode 13 started showing me the error for the missing Info.plist file and turned out to be this. I had to update the location of the file in the Project’s Build settings. Thank you.

I had added arm64 to excluded archs for simulator because it wouldn’t work on M1 otherwise, but this seems to be the solution that actually works both simulator and device now. Thank you!!

Related Topics
xcode
upgrade

Mentions
Vlad
Konchog
David M Lee
Sabiland
Danielhadar
Cloud
Arka Mukherjee
Xskxzr
Julian Silvestri
Sampath
Keverly
Mfaani
Oriol Roma
Ricardo Barroso
Ahmed Samir
Tomas Ward
Krishna Kumar Thakur
Tikhonov Aleksandr
Asa Dickens
Declan Mc Kenna
Mile Dev
Anthony R
Anastasiia Staiko
Derbs
Ben Gomm
Egabor
Fredy
Syed Azeem Ahmed
Kwaku Eshun
Amit Gupta
Dan Rosenstark

References
stackoverflow.com/questions/52401856/problems-after-upgrading-to-xcode-10-build-input-file-cannot-be-found

Update for Projects w/ Swift Packages

How did the errors happen?

I ran into this issue when I had imported Swift Packages into my project but later cleaned DerivedData to fix an unrelated app caching issue. My existing project was not a local Swift Package but an iOS app project.

Note that we can still encounter the same issue in local Swift Package projects.

What is the reason for the errors?

Swift Packages are checked out into DerivedData and are not referenced from the ModuleCache.noindex subfolder. Thus, cleaning the app’s folder in DerivedData or DerivedData itself breaks dependency resolution within Xcode for Swift Packages.

This is a misleading build error since there may be nothing wrong with the app code you’ve written or your dependency resolution graph. The only thing required is to refresh the dependencies.

How can I resolve the build errors?

Xcode now has nice options within the IDE itself to resolve Swift Packages. These options trigger a new checkout into DerivedData:

enter image description here

We can use three options, as shown in the image above depending on our use case:

  1. Reset Package Caches: Trigger a re-install of your existing Package dependencies w/ same versions.
  2. Resolve Package Versions: Use this option for updating Package checkouts when fixing Package Versions for cross-compatibility (in Project Settings).
  3. Update to Latest Package Versions: Use this to update all Swift Package dependencies to the latest versions. This option may be a local breaking change if the API changes.

NOTE: Apple’s documentation recommends to use Xcode for dependency resolution when working with Xcode projects excluding CLTs.

Other solutions

  1. We can also fix the error by restarting Xcode, but I find this step breaks my workflow and is tedious.

  2. If we are running from the command line (local Swift Package executable), we can stick with a swift build variant without jumping to Xcode at all (Source). swift build doesn’t work as easily out of the box in other projects, however.

  3. Use xcodebuild:

    xcodebuild -resolvePackageDependencies
    

I prefer staying in Xcode for simplicity. Your mileage may vary.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Xcmg коды ошибок
  • Xclock error can t open display
  • Xbox ошибка подключения к live xbox
  • Xbox ошибка mtu
  • Xbox ошибка 0xa3e80004

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии