Skip to content

VisionOS support broken for SwiftPackage #2809

Description

@saugs

Copilot Usage Confirmation

  • I have tried using GitHub Copilot to resolve this issue.

MSAL Version

2.7.0

Description

While adding this MSAL library to a SwiftPackage embedded in a VisionOS project, I am unable to build it. The Package.swift needs to support .visionOS() platform, and built xcframeworks as well.

Maybe also add xcodebuild -sdk xros ... here?

Error Details

Error message: While building for visionOS Simulator, no library for this platform was found in MSAL.xcframework.

Full error:
/Users/.../Library/Developer/Xcode/DerivedData/MSAL_Vision_Test-adzzafqagycdlrbiprjonsffptge/SourcePackages/artifacts/microsoft-authentication-library-for-objc/MSAL/MSAL.xcframework:1:1 While building for visionOS Simulator, no library for this platform was found in '/Users/.../Library/Developer/Xcode/DerivedData/MSAL_Vision_Test-adzzafqagycdlrbiprjonsffptge/SourcePackages/artifacts/microsoft-authentication-library-for-objc/MSAL/MSAL.xcframework'.

Reproduction Steps

I created a minimal reproducible project here : https://github.com/saugs/msal-visionos-test

  1. Clone this project
  2. Try to build : you'll get error MSAL.xcframework:1:1 While building for visionOS Simulator, no library for this platform was found in '.../SourcePackages/artifacts/microsoft-authentication-library-for-objc/MSAL/MSAL.xcframework'.

Otherwise you can just create a new VisionOS project in Xcode, and add MSAL dependency to Package.swift :

// swift-tools-version:6.2

import PackageDescription

let package = Package(
    name: "RealityKitContent",
    platforms: [
        .visionOS(.v26),
    ],
    products: [
        .library(
            name: "RealityKitContent",
            targets: ["RealityKitContent"]
        ),
    ],
    dependencies: [
        .package(url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc", .upToNextMajor(from: "2.7.0")),
    ],
    targets: [
        .target(
            name: "RealityKitContent",
            dependencies: [
                .product(name: "MSAL", package: "microsoft-authentication-library-for-objc"),
            ]
        ),
    ]
)

Expected Behavior

Project should build with MSAL library for visionOS platform.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions