Skip to content

Xcode Previews break immediately after adding this package as package dependency #9

Open
@kemalcany

Description

Hi PS Team! Thank you for this new repo, it's an exciting start!

There is however a problem with this package dependency in a way that I couldn't figure out but it is very easy to reproduce:

  • If you start a new Swift project the Xcode preview work as normal, with a HelloWorld view
  • If you add the powersync-swift dependency (with the details below, from main branch) the previews break. The bug report is too complicated
  • If you remove the dependency then the Previews are back. 🤷🏽‍♂️

Please check! Thank you!

import PackageDescription
let packageName = "PowerSync"

let package = Package(
    name: packageName,
    platforms: [
        .iOS(.v13),
        .macOS(.v10_13)
    ],
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
        .library(
            name: packageName,
            targets: ["PowerSync"]),
    ],
    dependencies: [
        .package(url: "https://github.com/powersync-ja/powersync-kotlin.git", exact: "1.0.0-BETA11.0"),
        .package(url: "https://github.com/powersync-ja/powersync-sqlite-core-swift.git", "0.3.1"..<"0.4.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .target(
            name: packageName,
            dependencies: [
                .product(name: "PowerSyncKotlin", package: "powersync-kotlin"),
                .product(name: "PowerSyncSQLiteCore", package: "powersync-sqlite-core-swift")
            ]),
        .testTarget(
            name: "PowerSyncTests",
            dependencies: ["PowerSync"]
        ),
    ]
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions