Camera permission not available when intergrading Mendix native app with Intune SDK.

0
Hello everyone,   I have an app which is reliant on scanning qr codes except after intergrading the Microsoft Intune SDK with my mendix app conform the documentation from Microsoft (https://learn.microsoft.com/en-us/intune/intune-service/developer/app-sdk-ios-phase3) my Mendix app no longer asks for Camera permissions when i open a page with a barcode scanner.  Also the permission is not available in the settings of the iphone. I use the most recent version of the Intune SDK which is 21.4 and Mendix version 10.23.13 which uses native template 14.1.12. I have added Camera permissions in the native builder and also in Xcode. If i force the app to check the permission of the camera functionality i get an error and the app crashes.   Steps taken to intergrade Intune (in Xcode): 1. Update podfile to include MSAL and run pod install. 2. Add frameworks to app according to the docs. 3. Add keychain sharing entries according to the docs. 3. Add the required entries in Info.plist. (the IntuneMAM dictionary and the permissions for location, camera etc.) 4. Run IntuneConfigurator included in the Intune SDK. 5. Build app.   The intergration works because i get the intune login before i get into the app and logging in works only the camera permission is not granted or added for some reason.   It is a problem with the code because it has worked before and in Intune app policy's it has no restrictions   Thank you,
asked
2 answers
0

This behavior often stems from a conflict between the Microsoft Intune SDK's method of method swizzling and the way Mendix Native (React Native) initializes its module system. When the Intune SDK is integrated, it wraps several system-level API calls to enforce Data Loss Prevention (DLP) policies. If the IntuneConfigurator or the manual Info.plist configuration has strictly defined the IntuneMAMSettings dictionary, it may be inadvertently suppressing the standard iOS permission request flow. This is particularly common if the MainBundleIdentifier or the keychain sharing groups are not perfectly aligned with the provisioning profile, causing the SDK to "fail closed" on privacy-sensitive hardware features like the camera.

You should verify if the NSCameraUsageDescription key exists both at the top level of your Info.plist and specifically within the IntuneMAMSettings dictionary if you are using policy-based camera overrides. In some versions of the Intune SDK, if the app is managed, the SDK expects the Managed App Configuration to explicitly allow hardware use. Even if your Intune portal policy says "allow," the local app wrapper might be waiting for a specific entitlement signal that the Mendix native template isn't sending because the SDK has intercepted the AVCaptureDevice authorization request before it reaches the React Native layer.

The crash you are seeing when forcing a permission check is likely a SIGABRT or a null pointer exception caused by the Mendix Barcode Scanner module attempting to access a camera session that the Intune-wrapped AVFoundation has nullified. Since you are using Mendix 10.12.x and Native Template 14, there is a known sensitivity regarding the Linker Flags. Ensure that -ObjC is present in your "Other Linker Flags" in Xcode, as the Intune SDK relies heavily on categories that must be loaded at runtime to properly hook into the camera permissions. If these aren't loaded, the "hook" exists but the "implementation" is missing, leading to the crash.

To resolve this, I recommend checking the "Privacy - Camera Usage Description" in your Xcode project's Info tab one more time to ensure it wasn't overwritten or deleted by the IntuneConfigurator tool during the build phase. You might also want to try disabling "Enable Bitcode" in your Build Settings if it is still active, as this has been known to interfere with the way the Intune static frameworks wrap third-party Mendix dependencies. If the issue persists, you can try to manually initialize the Intune enrollment within the AppDelegate.m rather than relying solely on the configurator's automated injection to ensure the Mendix bridge is fully established before the SDK locks down hardware access.

answered
0

This is expected behavior when using Microsoft Intune MAM with Mendix Native on iOS, and it is not a Mendix barcode scanner bug.

Root cause

When the Intune SDK is integrated, Intune takes control over iOS permissions. If Camera access is not explicitly allowed by the Intune App Protection Policy, iOS will:

  • Not show a camera permission prompt
  • Not list Camera under iOS app settings
  • Crash when the app tries to access the camera programmatically

This matches exactly what you’re seeing.

Why it worked before

Before Intune integration, Mendix Native handled permissions normally.

After Intune MAM is added, Info.plist permissions alone are no longer sufficient.

What must be configured (required)

In Microsoft Intune → App Protection Policy (iOS):

  • Set Camera = Allow
  • (Recommended) Allow Photo Library as well

Without this, Intune silently blocks camera usage.

Important Mendix / Intune notes

  • NSCameraUsageDescription must exist in Info.plist (you already did this)
  • Run IntuneConfigurator only after finalizing permissions, as it can overwrite Info.plist
  • Fully uninstall and reinstall the app after changing Intune policies (iOS caches denied permissions)
  • For MAM apps, checking camera permission directly can crash the app if blocked — this is expected behavior per Intune SDK docs

Conclusion

This is an Intune App Protection Policy configuration issue, not a Mendix or barcode widget issue.

Once Camera access is explicitly allowed in Intune, Mendix Native barcode scanning works as expected.

answered