I'm trying to create a project that has the following structure:
When I add Package Parser to Package Posts as dependency to be able to use its Resources, I can build, test and run the App, but the Preview on Posts stop working.
The message from diagnostic is:
Here are the packages definitions:
Is it possible to Preview a Swift Package that has a dependency? How?
Thanks and regards, Cassio
Package Parser (a library and Resources)
Package Posts (a library with SwiftUI and Resources)
App itself
When I add Package Parser to Package Posts as dependency to be able to use its Resources, I can build, test and run the App, but the Preview on Posts stop working.
The message from diagnostic is:
Code Block ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/SharedFrameworks-iphonesimulator' Undefined symbols for architecture x86_64: "nominal type descriptor for Parser.XMLPost", referenced from:
Here are the packages definitions:
Code Block let package = Package( name: "Parser", platforms: [.iOS(.v14)], products: [ .library(name: "Parser", targets: ["Parser"]) ], targets: [ .target(name: "Parser", resources: [.process("Resources")]), .testTarget(name: "ParserTests", dependencies: ["Parser"]) ] )
Code Block let package = Package( name: "Posts", platforms: [.iOS(.v14)], products: [ .library(name: "Posts", targets: ["Posts"]) ], dependencies: [ .package(path: "../Parser") ], targets: [ .target(name: "Posts", dependencies: ["Parser"]), .testTarget(name: "PostsTests", dependencies: ["Posts"]) ] )
Is it possible to Preview a Swift Package that has a dependency? How?
Thanks and regards, Cassio