Skip to content

Migrate macOS project to official Microsoft.Maui.Platforms.MacOS packages#165

Open
jfversluis wants to merge 1 commit intoRedth:mainfrom
jfversluis:migrate-official-macos-packages
Open

Migrate macOS project to official Microsoft.Maui.Platforms.MacOS packages#165
jfversluis wants to merge 1 commit intoRedth:mainfrom
jfversluis:migrate-official-macos-packages

Conversation

@jfversluis
Copy link
Copy Markdown

Migrate macOS project to official Microsoft.Maui.Platforms.MacOS packages

Replaces the community Platform.Maui.MacOS packages (v0.3.0) with the official Microsoft packages (v0.1.0-preview.8.26256.5).

Package changes

Before After
Platform.Maui.MacOS 0.3.0 Microsoft.Maui.Platforms.MacOS 0.1.0-preview.8.26256.5
Platform.Maui.MacOS.BlazorWebView 0.3.0 Microsoft.Maui.Platforms.MacOS.BlazorWebView 0.1.0-preview.8.26256.5
Platform.Maui.MacOS.Essentials 0.3.0 Microsoft.Maui.Platforms.MacOS.Essentials 0.1.0-preview.8.26256.5
Microsoft.Maui.Controls 10.0.31 Microsoft.Maui.Controls 10.0.41 (required by official package)

Namespace changes

The official packages use Platforms (plural) instead of Platform:

  • Microsoft.Maui.Platform.MacOS -> Microsoft.Maui.Platforms.MacOS.Platform
  • Microsoft.Maui.Platform.MacOS.Hosting -> Microsoft.Maui.Platforms.MacOS.Hosting
  • Microsoft.Maui.Platform.MacOS.Handlers -> Microsoft.Maui.Platforms.MacOS.Handlers
  • Microsoft.Maui.Platform.MacOS.Controls -> Microsoft.Maui.Platforms.MacOS.Controls
  • Microsoft.Maui.Essentials.MacOS -> Microsoft.Maui.Platforms.MacOS.Essentials

Info.plist addition (NSBluetoothAlwaysUsageDescription)

This PR also adds an Info.plist with NSBluetoothAlwaysUsageDescription. Without this key, the app crashes on startup with a TCC privacy violation.

Root cause: Microsoft.Maui.DevFlow.Agent (v0.1.0-preview.7.26230.1) uses CoreBluetooth (CBCentralManager) for BLE device discovery. This was added in preview.7 -- the older preview.4 did not have it. This affects any Debug build using the current DevFlow agent version, regardless of which macOS platform package is used.

This is arguably a bug in DevFlow.Agent -- it should either weak-link CoreBluetooth or document the Info.plist requirement.

Testing

  • Clean build: 0 errors, same warning count as before
  • All 357 tests pass (307 Core + 50 Workloads)
  • App launches and runs on macOS

…ages

Replace the community Platform.Maui.MacOS packages (v0.3.0) with the
official Microsoft.Maui.Platforms.MacOS packages (v0.1.0-preview.8.26256.5).

Package changes:
 Microsoft.Maui.Platforms.MacOS
 Microsoft.Maui.Platforms.MacOS.BlazorWebView
 Microsoft.Maui.Platforms.MacOS.Essentials
 10.0.41 (required dependency)

Namespace changes:
 Microsoft.Maui.Platforms.MacOS.Platform
 Microsoft.Maui.Platforms.MacOS.Hosting
 Microsoft.Maui.Platforms.MacOS.Handlers
 Microsoft.Maui.Platforms.MacOS.Controls
 Microsoft.Maui.Platforms.MacOS.Essentials

Adds Info.plist with NSBluetoothAlwaysUsageDescription. This is required
because Microsoft.Maui.DevFlow.Agent (v0.1.0-preview.7.26230.1) uses
CoreBluetooth (CBCentralManager) for device discovery. Without this key,
macOS crashes the app on startup with a TCC privacy violation. This
affects any Debug build using the current DevFlow agent version regardless
of which macOS platform package is used.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants