Search results for

missing package product

50,271 results found

Post

Replies

Boosts

Views

Activity

How to preview with package
How do you get previews working in a swift package? This talk shows this working, however the following steps do not work. Using Xcode 13.2.1 create a new Swift Package Add a simple view with a preview to that swift package (See code below) Attempt to run the preview. code: import SwiftUI @available(iOS 14.0, *) public struct TestView: View { public init() { } public var body: some View { Text(Hello World) } } @available(iOS 14.0, *) struct NoDataView_Previews: PreviewProvider { static var previews: some View { TestView() } } #endif See errors: ================================== | RemoteHumanReadableError | | LoadingError: failed to load library at path /Users/fishycx/Library/Developer/Xcode/DerivedData/MyLibrary-cwtaivijrddzbkeegisudpueggjw/Build/Intermediates.noindex/Previews/MyLibrary/Products/Debug-iphonesimulator/PackageFrameworks/MyLibrary_-71ED4B7C0CDEC55C_PackageProduct.framework/MyLibrary_-71ED4B7C0CDEC55C_PackageProduct: Optional(dlopen(/Users/fishycx/Library/Deve
1
0
610
Feb ’22
How to use dependencies in a Swift Package
I created a new Package with Xcode and incorporated a dependency, however when I try to use it, I get a No such module error. How do I use the dependency in the Package sources? In a normal project, I can easily import and use AgileDB. Here's the Package: // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: DBCore, products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: DBCore, targets: [DBCore]), ], dependencies: [ .package(url: https://github.com/AaronBratcher/AgileDB, from: 6.4.0) ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package
1
0
1k
Apr ’22
Reply to Stapling is not working for a package installer and hence user receives "Apple cannot check it for malicious software."
A few notes here: You mentioned that you were Notarizing your app and your pkg installer. In this case you just need to Notarize your pkg installer since this is the outer container. You mentioned that you were creating a pkg installer with a 3rd party product; what happens if you create your pkg installer with a native tool like productbuild? Does this improve the situation any? There are example at the bottom of the man page. Matt Eaton DTS Engineering, CoreOS meaton3@apple.com
Topic: Code Signing SubTopic: Notarization Tags:
Aug ’21
Reply to Swift Package can be MAKE_MERGEABLE?
Unfortunately, it's NO. Currently, building and distributing the XCFramework is the only way to make your package as mergeable. When you try to configure the linkerSettings to enable MAKE_MERGEABLE, it will failed building w/ error saying The package product cannot be used as a dependency of this target because it uses unsafe build flags. even though the product was defined as .dynamic If someone has any good solution, please let me know!
Dec ’23
Stapling flat pkg and gatekeeper
Hi. I have an archive package that contains multiple packages. One of the pkg has a network extension app. I normally notarized the top archive package and staple it. However, when I tried to install pkg, I keep encountering gatekeeper. I notarize and stape each of the pkg inside of the archives then create achieve package again and notarize/staple it. But again, I still see the same issues. Keeps seeing the gatekeeper. Am I missing something?
1
0
715
Mar ’22
Reply to Use Xcode for Server Side Development
I had the same problem, i solved it like this: First, change the package.swift like this: (In fact, this is the same as WWDC Session) // swift-tools-version: 5.7 import PackageDescription let package = Package( name: MyServer, platforms: [.macOS(12.0)], products: [ .executable( name: MyServer, targets: [MyServer]), ], dependencies: [ .package(url: https://github.com/vapor/vapor.git, .upToNextMajor(from: 4.0.0)), ], targets: [ .executableTarget( name: MyServer, dependencies: [ .product(name: Vapor, package: vapor) ]), .testTarget( name: MyServerTests, dependencies: [MyServer]), ] ) Second, Find Executable menu with action Edit Scheme -> Run -> info, open the menu, you will find the target you added in Package.swift. Hope this helps !
Jun ’22
How to make a Swift Package, which has a binary dependency, dependent on another Swift Package?
I've put together a Swift Package which has a binary dependency. The xcframework contained within depends on another xcframework which is in another package. I can't get the first Swift Package to bring in the second Swift Package as a dependency beyond the .testTarget. In the WWDC 2020 video Distribute binary frameworks as Swift packages - https://developer.apple.com/videos/play/wwdc2020/10147/ it shows code that looks like this: import PackageDescription let package = Package( tt name: Emoji, tt products: [ ttttt.library( ttttttt name: package, ttttttt targets: [Emoji]), tt ], tt dependencies: [ ttttt.package(url: https://github.com/JohnnyAppleSeed2020/BinaryEmoji, from: 1.0.0), tt ], tt targets: [ ttttt.target( ttttttt name: package, ttttttt dependencies: [Emoji]), tt ] ) The presenter says, If you want to use that same library as a package dependency, it also works the same way you are used to. In the package
0
0
1.4k
Sep ’20