According to iOS dev docs, you need to confirm if your URL scheme can be opened by the application installed on the device currently using canOpenURL
it will return NO if an application is not installed on the device registered to process the URL scheme, or if you did not declare the URL scheme in your Info.plist file; otherwise YES .
If your application is associated with or after iOS 9.0, you must declare the URL schemes that you want to pass to this method.
If your application (iOS 9.0 or later) calls this method using a scheme that you have not yet declared, the method returns NO, regardless of whether or not the corresponding application for this scheme is installed on the device.
As for the structure of the actual URL, it should be encoded and should be a direct link to the file (and not to the redirect). If the URL is in a format that Office cannot handle, or the download just fails, Office will not return the user to the calling application.
Encoding example: ms-% 3Aofv PowerPoint% 7Cu% 7Chttps% 3A% 2F% 2Fwww.test.com% 2Ftest.pptx
In addition, for security, Office will only return users to the application if the file is successfully opened. Backing up the application causes the feedback protocol, open mode, URL, pending status, and document context. Send pending status is in handle | z | and either yes or no.
A combination or one of these problems may cause your document to not open.
source share