Search results for

missing package product

51,071 results found

Post

Replies

Boosts

Views

Activity

Terminal command for XCode->File->Packages->Reset Package Cache
I am using XCode 13.1 and wondering a way to execute XCode->File->Packages->Reset Package Cache on terminal. I see my CI machine is failing every time not for specific package but some random package. And when manually do XCode->File->Packages->Reset Package Cache, it resolves the package graph properly. I already tried clearing DerivedData and also clearing /Users/bostonsamddv/Library/Caches/org.swift.swiftpm with no luck :( Any help will be appreciated.
1
0
2.7k
Oct ’21
Completion in Swift packages
I have a Swift Package that builds both an AppKit and a UIKit library, and code completion works great for AppKit code, but does not work in any of the UIKit files - regardless of the target selected on the top of the IDE.This Swift Package in turn is consumed by an AppKit sample, and a UIKit sample, code completion works just fine on both of those projects. It is just the shared Swift Package that fails to work with iOS APIs.I have tried removing mac as a platform in `Package.swift`, and wiping out my DerivedData for the project, but it does not make a difference, completion still is completely busted for code living inside the Swift Package.The code is open source, under the MIT license, if anyone wants to look at the setup:https://github.com/migueldeicaza/SwiftTerm
0
0
612
Apr ’20
Reply to Stapling ticket for Notarization
Thanks for the details.We do have a product build system where we do not want to modify the package by stapling the ticket for now. So as is understood Gatekeeper will require to be online in this case to validate by getting the ticket online from Apple notarisation server.
Topic: Code Signing SubTopic: General Tags:
May ’19
Issue with using Swift package with xcframework binaryTarget
Hi! I'm trying to create a target application that depends on multiple targets that all use the same Swift package that has xcframework binaryTarget. Each component can be successfully assembled individually, but when I try to create a core application that depends on these components, I get an error message on Prepare build stage: Multiple commands produce '/Users//Library/Developer/Xcode/DerivedData//Build/Products/Debug/Frameworks/.framework/Versions/A' Target '' has copy command from '/Users//Library/Developer/Xcode/DerivedData//SourcePackages/artifacts/...//.xcframework/macos-arm64_x86_64/.framework' to '/Users//Library/Developer/Xcode/DerivedData//Build/Products/Debug/Frameworks/.framework' Target '' has copy command from '/Users//Library/Developer/Xcode/DerivedData//SourcePackages/artifacts/...//.xcframework/macos-arm64_x86_64/.framework' to '/Users//Library/Developer/Xcode/DerivedData//Build/Products/Debug/Frameworks/.framework' – where is a name of the xcframework
0
0
392
Nov ’24
Unable to create a simple installable package
Hi, I am a newcomer in macOS development, and I am struggling to create a package with the XCode command line tools that is installable on other computers. In its minimal version, the package shall install a simple program to usr/local/: hello.c: #include int main(void) { printf(Hello Worldn); return 0; } distribution.plist: Hello World h1.pkg build.sh: #!/bin/sh cc -o hello hello.c mkdir -p local/bin cp hello local/bin/ codesign -s - -i net.world.hello local/bin/hello pkgbuild --identifier net.world.hello --root local --install-location /usr/local h1.pkg productbuild --distribution distribution.plist --resources . hello.pkg The build scrips produces a package hello.pkg. However, when I try to install it, I get : Product archive /Users/foo/hello.pkg trustLevel=100 : PKInstallRequest: failed to initialize. Error: Error Domain=PKInstallRequestErrorDomain Code=2 Specifier Description:: { URL = file:///Users/foo/h1.pkg; identifier = net.wo
2
0
898
Mar ’24
SwiftUI Preview don't work in Package with dependencies
Hi, I using packages to modularize my app's features, so my package contains Views. I'm unable to get the preview working in from any of my packages. SwiftUI preview is complaining that it couldn't find the dependency module. MessageSendFailure: Message send failure for send previewInstances message to agent ================================== | RemoteHumanReadableError | | LoadingError: failed to load library at path /Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups: Optional(dlopen(/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups, 0x0000): Library not loaded: @rpath/UIConvenience.framework/UIConvenience | Referenced from: /Users/karthik/Library/Developer/Xcode/DerivedD
2
0
5.0k
Jul ’21
Missing ModuleMap with Docbuild
When performing xcodebuild docbuild I'm getting an error that I'm missing a module map for one of my Swift Packages I've included in the project. This is because I want to build the docbuild for iOS only, but have the Swift Package as a macOS only import fatal error: module map file '/Users/administrator/Library/Developer/Xcode/DerivedData/AppName/Build/Intermediates.noindex/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/SQLite.modulemap' not found The docbuild is as follows xcodebuild docbuild -scheme XXX -derivedDataPath ${DD_LOCATION} -configuration Release -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES BUILD_DIR=${WORKSPACE}/build DEVELOPMENT_TEAM=XXX The Swift package mentioned is added as macOS only with an optional linkage and I have excluded the paths from source files which makes me able to run the app via xcode. Is there anything else I should be doing to exclude this from being added to the iOS side of our project? Thanks in a
1
0
1.7k
Feb ’24
String catalogs in packages
We have separated much of our UI into different packages to reduce complexity and compile time. When we recently tested using new .xcstrings string catalogs, we hit an unexpected problem. Strings extracted from SwiftUI components like Text or Button are extracted into the Localizable.xcstrings in the same package, but the default behaviour of Text(_ key:tableName:bundle:comment:) is to use Bundle.main. When the default behaviour of the string extraction isn't to extract to the main app target, this introduces a very fragile system where it's easy to add code that looks localised, but ends up failing lookup at runtime. I don't feel comfortable that we will always remember to define the correct module every time we create a Text. Also, other components like Button doesn't have an init that takes a Bundle, so we would also have to remember that Button(_ titleKey:action:) can now only be used in a package if we make sure that the main bundle contains a matching key. Is there a way for u
4
0
2.3k
Sep ’23
Building XCFrameworks from a hierarchy of Swift Packages
This post is meant to provide useful information on how to build a set of xcframeworks from a hierarchy of Swift Packages containing a mix of ObjC and Swift. If you only want to build a single xcframework from a Swift Package, as this is not obvious either, you should find some useful info too. Stuff that needs to be done for building an XCFramework from a Swift Package through xcodebuild set library type to .dynamic in Package.swift set SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_SWIFT_FLAGS=-no-verify-emitted-module-interface in xcodebuild command no need to use 'archive' xcodebuild command, xcodebuild alone is enough In generated framework : copy public headers (in case of ObjC package) copy (or create) module.modulemap file, or copy .swiftmodule file copy umbrella header FooPackage-Swift.h from derived data (use -derivedDataPath xcodebuild option to retrieve it) in case of Swift Package, otherwise won't be useable from ObjC copy resource bundle (if
3
0
3.5k
Nov ’23
Consumable Product Refund Abuse
Hello, We are a mobile game company, We have encountered an issue concerning the refunds of consumable products purchased through our app. The issue arises when some Apple users request refunds after purchasing these products, and Apple approves these refund requests even if our users have already consumed it. This situation leads to financial losses and creates an unfair experience among users. We are using App Store Server Notifications V2. So how can we prevent Refunding if user used already our product
3
0
1.5k
Mar ’24
Error Missing required module 'RxCocoaRuntime' in xcframeworks
Hi. I have a xcframework that has a dependency on 'RxSwift' and 'RxCocoa'. I deployed it using SPM by embedding it in a Swift Package. However when I import swift package into another project, I keep getting the following error: Missing required module 'RxCocoaRuntime How can I fix this? Below are the steps to reproduce the error. Steps Create Xcode proejct, make a dependency on 'RxSwift' and 'RxCocoa' (no matter doing it through tuist or cocoapods) Create XCFramework from that proejct. (I used commands below) xcodebuild archive -workspace SimpleFramework.xcworkspace -scheme SimpleFramework -destination generic/platform=iOS -archivePath ./SimpleFramework-iphoneos.xcarchive -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive -workspace SimpleFramework.xcworkspace -scheme SimpleFramework -archivePath ./SimpleFramework-iphonesimulator.xcarchive -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild -create-xcframe
0
0
249
Mar ’25
Can Swift Packages be optional?
I work with a number of enterprise clients and one thing we often do is have various frameworks that are optional depending on what type of build we are doing. A common example being to include a framework that contains an embedded server for testing, demo or debugging purposes. Prior to SPM we would link those frameworks as Optional and run a script phase after the build that removed them from the Frameworks directory of the app if it was a Release build. Now I have an Xcode project that includes a number of SPM package, one of which is an embedded server which in turns references several other packages I'd like to exclude form a Release build. But I cannot figure out how to do this. Can I make the inclusion of a package optional? Or somehow remove it after linking? In Swift I can write #if canImport(MockServer) but I cannot see how to actually make MockServer an optional include. Any ideas?
0
0
937
Jul ’22
Reply to Lock icon not visible in .pkg installer
My apologies, I didn't notice that packagesbuild was a third-party tool, I took over the project from a different developer, so I'm not a 100% familiar with the tooling yet. I had a look at the link you sent and managed to get it working by running the productbuild command on the .pkg file generated by packagesbuild. productbuild --sign Developer ID Installer: [...] --package com.optimidoc.cloudclientsigned.pkg com.optimidoc.cloudclient.distribution.pkg I suspect that the problem was in the fact that packagesbuild generates a component package (similar to pkgbuild) rather than a product archive like productbuild does, but I haven't done any testing to verify it. Thank you for pointing me in the right direction.
Topic: Code Signing SubTopic: General
Jun ’24