Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MacOS instructions for Plist manifest #476

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ _repo.*/

.openpublishing.buildcore.ps1
.DS_Store
/.vs
32 changes: 32 additions & 0 deletions docs/maui/views/MediaElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,23 @@ For a full example of this method included in an application please refer to the

Edit the `Info.plist` for `MacCatalyst` and add the following keys.
```csharp
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>__MAUI_DEFAULT_SCENE_CONFIGURATION__</string>
<key>UISceneDelegateClassName</key>
<string>SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
Expand All @@ -143,6 +160,21 @@ Edit the `Info.plist` for `MacCatalyst` and add the following keys.
<key>NSLocalNetworkUsageDescription</key>
<string></string>
```
Add the following to a new file `SceneDelegate.cs` in the `Platforms/MacCatalyst` folder.`
```csharp
using System;
using Foundation;
using Microsoft.Maui;
using ObjCRuntime;
using UIKit;

namespace CommunityToolkit.Maui.Sample.Platforms.MacCatalyst;

[Register("SceneDelegate")]
public class SceneDelegate : MauiUISceneDelegate
{
}
```

### [iOS](#tab/ios)

Expand Down