Selecting Word to open document from Inside my application with UIDocumentInteractionController Read/Only

I am trying to open a document from inside my application with word using the UIDocumentInteractionController.

The document opens but the document opens in Read/Only. It provides me with an option to "Save Copy" . This is only happening in iOS 17. iPadOS and iOS.

This works 100% on iOS 16 so the issue was introduced with the new version of ios 17.

`documentController = UIDocumentInteractionController.FromUrl(NSUrl.FromFilename(filePath)); string fileExtension = Path.GetExtension(sharedPath.FileName).Substring(1); string uti = MobileCoreServices.UTType.CreatePreferredIdentifier(MobileCoreServices.UTType.TagClassFilenameExtension.ToString(), fileExtension, null); documentController.Uti = uti;

UIView presentingView = UIApplication.SharedApplication.KeyWindow.RootViewController.View; documentController.PresentOpenInMenu(CGRect.Empty, presentingView, true);`

info.Plist <key>UIFileSharingEnabled</key> <true/> <key>LSSupportsOpeningDocumentsInPlace</key> <true/> <key>UISupportsDocumentBrowser</key> <true/>

Is there perhaps something that changed that is not documented. It seems that some sort of security issue that has changed with how my app and word is allowed to access the file inside my app folder.

I have logged multiple questions on other platforms but no luck.

I think this is a known bug (FB13297815). However, this stuff is complex so, assuming that’s not your bug, I encourage you to file your own bug about this.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Are you using Xamarin/MAUI C#? I have this code written in Xamarin which is throwing warnings and I'm looking for the replacement but no luck so far.

            var uTI = UTType.CreatePreferredIdentifier(UTType.TagClassFilenameExtension, Path.GetExtension(path), null);
            var mIMEType = UTType.GetPreferredTag(uTI, UTType.TagClassMIMEType);
            if (mIMEType == null)
            {
                return "application/octet-stream";
            }

Warnings

'UTType.CreatePreferredIdentifier(string, string, string)' is unsupported on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later.
'UTType.GetPreferredTag(string, string)' is unsupported on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later.
Selecting Word to open document from Inside my application with UIDocumentInteractionController Read/Only
 
 
Q