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
Search results for
missing package product
51,805 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Dear colleagues No matter how hard I try I can’t get large files ~20Gb to be processed correctly by the productbuild At least that’s what I think. I use —large-payload option Product build actively complains with warnings about 12,0 as min version of macOS. The issue here is that in app plist 12.4 is set as min version. PRE-INSTALL REQUIREMENTS PROPERTY LIST should apparently be used for this but no possible combo of options can fix this warning. The warning have far reaching consequences. More on this later All the utilities even Apple ones like Trandporter unpack the pkg absolutely wrong. When I check temporary expanded archive my 20gb file turns into 8Gb! i still have to check installer way whether it unpacks correctly. AppStore submission immediately rejects the pkg because lsmin key is 12.4 while package min is 12.0. The thing is I never ever used 12.0 anywhere. so to summarize. Cant submit large payloads archive Can’t extract it either what to do ? Best regards
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
When using Swift Packages in Xcode, is there a way to exclude files conditionally (in DEBUG or similar)? I know I can exclude files but I want them while in development. I have a package that contains developments resource/assets (used to seed a Core Data database for the simulator + for Previews, with images and files), but I don't want to include these files in the package used by the real app when archiving. Can we achieve that?
Hello, I have a repo with only packages (includes snapshot tests). Is there a possibility to add package to the Xcode Cloud (package does not contain a application - it's only design system)
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
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.
Hi, I am looking for information on how to setup a ModelContainer for a Swift app when the SwiftData model is located in a Swift package. Let's say the model code resides in a package called DomainModel. That package was added target's embedded content and the model types are used to init the model container using the modelContainer(for:) view modifier on the ContentView of the app. This crashes the app on startup with a EXC_BAD_ACCESS code=2. When copying the model code from the package directly into the app, the app starts just fine. I kindly ask for a code sample or any information about how to setup the model container when using a model from a Swift package. Thanks in advance and I am looking forward to replacing CoreData 🙂
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
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
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:
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
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Swift Packages
Xcode
Command Line Tools
DocC
Thank you for bearing with me! This was key missing information. I can reproduce the problem in a small sample project using a package structure like you described here. I'll update the feedback and see what we can do with the build system and linker teams to figure this out.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
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
I am trying to create installer package for Mac using productbuild and pkgbuild . while installing everything looks good but .app file is not getting copied to install-location. Commands: /usr/bin/pkgbuild --install-location /Applications/MyAppFolder --identifier com.xxx.xxx --component Content/MyApp.app --scripts Script --version 1.0.1 Build/MyPackage.pkg In the above command, I have copied signed .app file in the content folder all my scripts in scripts folder. I tried using root arg too. While using root, all the other files available in the Content folder are getting copied at the install-location but not the .app file. /usr/bin/pkgbuild --install-location /Applications/MyAppFolder --identifier com.xxx.xxx --root Content --scripts Script --version 1.0.1 Build/MyPackage.pkg I tried using productbuild command too but no luck. App file is missing post install. /usr/bin/productbuild --identifier com.xxx.xxx --package Build/MyPackage.pkg Final/MyPackage.pkg