microsoftconnect / ms-intune-app-sdk-ios

Intune App SDK for iOS enables data protection and mobile app management features in iOS mobile apps with Microsoft Intune
90 stars 27 forks source link

UIDocumentInteractionController not changing to accommodate Send org data to other Apps set to Policy Managed #447

Closed bmalumphy closed 1 month ago

bmalumphy commented 3 months ago

Describe the bug: The share sheet in our implementation of UIDocumentInteractionController is not changing in the manner outlined in the docs here, even with all the changes listed in the requirements:

Documentation Link in Question

The app also crashes in the normal, everyday share sheet when trying to Copy.

Our SHARE_EXTENSION_SUBQUERY:

SUBQUERY (
                  extensionItems, 
                  $extensionItem,
                  SUBQUERY (
                      $extensionItem.attachments, 
                      $attachment,
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.video" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.mpeg-4-audio" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.aiff-audio" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.aifc-audio" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.public.image" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.public.movie" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.public.video" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.public.mpeg-4-audio" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.public.aiff-audio" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.public.aifc-audio" ||
                       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.intune.mam.com.adobe.pdf"
                    ).@count == $extensionItem.attachments.@count
                    ).@count == 1

Our APP: image image

Our CFBundleURLSchemes:

MyApp
MyApp-intunemam
msauth.com.my.app.intune, 
msauth.com.my.app.intune-intunemam,
msauth.com.microsoft.intunemam

To Reproduce Steps to reproduce the behavior:

  1. Implement the changes to the app necessary in the documentation
  2. Map onto our APP configuration
  3. Share an item from the app
  4. See that the sheet is the same as any other app that isn't managed by InTune

Expected behavior: The share sheet should reflect only manage apps

Screenshots and logs: IMG_0016

IntuneMAMDiagnosticFiles.txt

Smartphone (please complete the following information):

Intune App SDK for iOS (please complete the following information):

Additional context: There is an additional crash when copying as mentioned above, and when we do try to share into managed apps, like MS Teams, the image/video/etc will not transfer into the app.

wangxiaoms commented 3 months ago

Hi @bmalumphy could you provide a minimal sample app, I can test to reproduce.

bmalumphy commented 3 months ago

Hi @bmalumphy could you provide a minimal sample app, I can test to reproduce.

I'll get one to you by EoD