missing package product

42,921 results found

Post

Replies

Boosts

Views

Activity

Error: Missing package product only in XCode
I am encountering a strange Missing package product '(package name)' error that manifests only in XCode, but not in the command-line. I tried to isolate the problem into two new packages and it behaves the same with the new packages as it does with the original - I can replicate it. Having the following directory layout : SOME_ROOT/ MyTool/ Package.swift ... ProtoLib/ Package.swift Sources/ MyCore/ MyFlows/ ... The MyTool Package.swift looks like: // swift-tools-version: 5.9 import PackageDescription let package = Package( name: MyTool, platforms: [.macOS(13), .custom(linux, versionString: 1)], products: [ .library( name: MyTool, targets: [MyTool]), ], dependencies: [ .package(path: ../ProtoLib), ], targets: [ .target( name: MyTool, dependencies: [ .product(name: MyCore, package: ProtoLib), .product(name: MyFlows, package: ProtoLib), ] ), .testTarget( name: MyToolTests, dependencies: [MyTool]),
1
0
1.7k
Sep ’23
Xcode 13 "Missing package product" using local Swift Packages
I have a project I've been working off of for a few years now that makes use of local Swift Packages. In my workspace, I have a Kit project that generates a framework using several local Swift Packages as dependencies. In Xcode 12, the local Swift packages resolve correctly and compiles, but each beta of Xcode 13 gives me the error: [ProjectName].xcodeproj Missing package product '[LocalSwiftPackage]' Clearing the package cache, derived data, or restarting the application does not resolve the issue. Only Swift Packages that are remotely loaded from a URL are compiled correctly. Using local packages to separate module code, while still being able to edit in the same project, has been essential to my workflow and would hate to see Xcode 13 release with these breaking changes, and I have not seen this issue listed in the known issues for the Xcode 13 release notes. Has anyone else experienced this issue or found a workaround?
18
0
65k
Aug ’21
Xcode 15.4 - Missing package product "<package name>"
Hello, I'm having this issue that Xcode tells me it cannot find the Swift Packages I'm using within my App. When I first open Xcode, all the Package Dependencies are listed correctly in my project navigator. Also, building the app for the first time runs without any issues. But right after the first build is finished, the Package Dependencies are not listed any more and the build fails, telling me that all the packages are missing. I have to manually click on File -> Packages -> Reset Package Caches, after that it works again. But only for exactly one build. I basically have to do this step for every single build. I found out that there is this Package.resolved file which lists all the used packages with their respective version and some kind of hash. This file is located inside the .xcodeproj file, in my case it's this location: MyApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved This file is deleted after the
2
0
1.1k
May ’24
Xcode 15 "Missing package product" error when using local package path instead of url
I've got this SwiftPM project. It has a dependency that I needed to edit, so I forked it on github and checked it out locally. Then I referenced the local repo in the Package.swift file with package(path:) instead of package(url:). This caused it to report Package.swift: error: Missing package product 'WebAuthn' (in target 'App' from project 'server') I had to commit my changes, and re-reference the repo, to get it to see my updates. This problem has been around for some time, but seems to be related to how the path name differs from the built target name (it works fine in another project i have where the package directory and target have the same name). I've submitted FB13677717 about it, but is there a workaround?
0
0
1.7k
Mar ’24
Swift Macro: Missing package product 'MyMacroApple'
In Xcode 15.0.0 I have created a package using a template Swift Macro. I have named it 'MyMacroApple'. The template comes with #stringify macro so I have created an new app and named it 'MyMacroApp' then copy pasted the code from 'MyMacroApple' main.swift file import MyMacroApple let a = 17 let b = 25 let (result, code) = #stringify(a + b) then I have added Local package dependency to the app project and selected package product 'MyMacroApple' of Library kind to my 'pocMyApp' target. When I run the project I get the error: No such module 'MyMacroApple'
6
0
3k
Jun ’23
Reply to Xcode Cloud not working with local packages
For anyone running into this, in-case you have your app and local package together in the same Xcode workspace, make sure you select to run the Xcode Cloud workflow in the workspace (not app project). This was the issue for me that caused Missing package product 'MyPackageName' on Xcode Cloud builds. See this screenshot for the setting on the Xcode Cloud workflow:
Nov ’23
Reply to CoreNFC ISO7816 Tags
Hey AndyQ, thanks for the effort! As I''m trying to get your demo to work, I'm running into several problems during build:: the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try againx-xcode-log://AC508F87-ABC0-467C-9583-1C6B600C6FCD Missing package product 'NFCPassportReader', please fix package resolution errors before buildingWhat I see is that the Package.resolved file is being created everytime I am trying to run. And as for the second error messag: I didnt move any folders, so I'm not sure why it wouldnt find the Package.Any advice?Thank you!
Jun ’19
xcodebuild not resolving local swift package dependencies
My project has swift package dependencies hosted on GitHub, others that are local (on disk). Building the project from Xcode works fine, but building from the command line, e.g xcodebuild -project ../MyProj.xcodeproj -scheme MyScheme fails because the local swift packages fail resolve (while the GitHub-hosted packages are resolved with no issues). In other words, I get a flurry of errors like these: error: Missing package product 'MyLocalSwiftPackage' Running xcodebuild with -resolvePackageDependencies successfully resolves all the GitHub-hosted Swift Packages, but ignores the local ones. Does xcodebuild need explicit instructions for locating local Swift Package dependencies?
2
0
6.1k
Dec ’20