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

Unable to access Bluetooth and Local Storage Permissions in Maccatalyst Sandbox App MAUI #27467

Open
Swethavenna-github opened this issue Jan 30, 2025 · 2 comments
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working

Comments

@Swethavenna-github
Copy link

Swethavenna-github commented Jan 30, 2025

Description

I cannot access any permissions, especially Bluetooth, and local data in the MacCatalyst app when App Sandbox is enabled in MAUI. The popup asking for permissions is not displaying even though I have set all permissions in Info.plist and Entitlements.plist as below

Note:When I disable Sandbox everything works fine.But I need to enable sandbox in order to deploy app to App store

Entitlement.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.bluetooth</key>
    <true/>
    <key>com.apple.security.files.user-selected.read-write</key>
    <true/>
    <key>com.apple.security.files.bookmarks.app-scope</key>
    <true/>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)com.mycompany.myapp</string>
    </array>
</dict>
</plist>

Info.Plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>UIDeviceFamily</key>
    <array>
        <integer>2</integer>
    </array>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>bluetooth-le</string>
    </array>
    <key>XSAppIconAssets</key>
    <string>Assets.xcassets/ic_launcher.appiconset</string>
    <key>CFBundleName</key>
    <string>my App Name</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>UIBackgroundModes</key>
    <array>
        <string>location</string>
        <string>bluetooth-central</string>
        <string>remote-notification</string>
    </array>
    <key>UIFileSharingEnabled</key>
    <true/>
    <key>LSSupportsOpeningDocumentsInPlace</key>
    <false/>
    <key>NSBluetoothAlwaysUsageDescription</key>
    <string>My app requires Bluetooth Permissions .</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>If enabled, my App uses location services to store the geo-coordinates of the logger at the time of configuration.</string>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>ITSAppUsesNonExemptEncryption</key>
    <true/>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string>my app</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>url</string>
            </array>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
        </dict>
    </array>
    <key>CFBundleIdentifier</key>
    <string>com.mycompany.myapp</string>
    <key>NSDocumentsFolderUsageDescription</key>
    <string>My app  requires access to the Documents folder </string>
</dict>
</plist>

.Net MAUI version:9.0.10 .NET9.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@Swethavenna-github Swethavenna-github added the t/bug Something isn't working label Jan 30, 2025
@tj-devel709 tj-devel709 added platform/macOS 🍏 macOS / Mac Catalyst area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info labels Jan 30, 2025
@tj-devel709
Copy link
Member

Hello, @Swethavenna-github, thanks for the feedback. Do you see this same issue with iOS as well?

@Swethavenna-github
Copy link
Author

the

no IOS work fine and IOS won't use sandbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants