Skip to content

*-apple-watchos target doesn't reflect SDKROOT path #147223

@setoelkahfi

Description

@setoelkahfi

I'm trying to cross compile a Rust uniffi crate to watchOS 9.4 SDK target and export it to a Swift package using cargo swift package.

Initially I used Xcode 16.4 to compile the crate and got warnings because my minimum deployment target for my watchOS app is watchOS 9 and Xcode 16.4 comes with SDK 11.5. That makes sense.

Now, I downloaded Xcode 14.3 that comes with watchOS SDK 9.4 and xcrun --sdk watchos --show-sdk-path shows the right SDK version:

setoelkahfi@Heighliner1 wallet-kit-v3 % xcrun --sdk watchos --show-sdk-path
/Applications/Xcode-14.3.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS9.4.sdk

I compiled the crate using cargo swift package and it succeded. When I run the watchOS app Xcode project, I still got warnings saying I built the XCFramework library with SDK 26. That couldn't be true, could it?

Image

The strange part is I don't even have Xcode 26 installed.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-crossArea: Cross compilationC-bugCategory: This is a bug.O-appleOperating system: Apple (macOS, iOS, tvOS, visionOS, watchOS)O-watchosOperating System: watchOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions