Quantcast
Channel: Package Manager - Swift Forums
Viewing all articles
Browse latest Browse all 180

How to exclude RealityKitContent from Swift package for iOS

$
0
0

I've created an app for visionOS that uses a custom package that includes RealityKitContent as well (as a sub-package). I now want to turn this app into a multi-platform app that also supports iOS.

When I try to compile the app for this platform, I get this error message:

Building for 'iphoneos', but realitytool only supports [xros, xrsimulator]

Thus, I want to exclude the RealityKitContent from my package for iOS, but I don't really know how. The Apple docs are pretty complicated, and ChatGPT did only give me solutions that did not work at all.

So I am trying my luck with the real guys instead :slight_smile:

Here's my Package.swift file:

// swift-tools-version: 5.10

import PackageDescription

let package = Package(
    name: "Overlays",
    platforms: [
        .iOS(.v17), .visionOS(.v1)
    ],
    products: [
        .library(
            name: "Overlays",
            targets: ["Overlays"]),
    ],
    dependencies: [
        .package(
            path: "../BackendServices"
        ),
        .package(
            path: "../MeteorDDP"
        ),
        .package(
            path: "Packages/OverlaysRealityKitContent"
        ),
    ],
    targets: [
        .target(
            name: "Overlays",
            dependencies: ["BackendServices", "MeteorDDP", "OverlaysRealityKitContent"]
        ),
        .testTarget(
            name: "OverlaysTests",
            dependencies: ["Overlays"]),
    ]
)

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 180

Latest Images

Trending Articles



Latest Images