Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25496] iOS Document Viewer no longer allows sharing of pdf to other apps

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-11-28T15:37:16.000+0000
Affected Version/sRelease 6.3.0
Fix Version/sRelease 7.0.0
ComponentsiOS
Labelsn/a
Reporter Ricardo Ramirez
AssigneeHans Knöchel
Created2017-11-09T23:04:18.000+0000
Updated2017-12-05T16:17:47.000+0000

Description

Issue Description

Using IOS 11.1 and SDK 6.3.0 the document viewer for ipad no longer allows the sharing of a pdf to anything except email. There may be some undocumented permission that was introduced in IOS11 that is not in the appcelerator documents or the control's share event is broken. Steps to recreate: 1) Install acrobat on the ipad 2) Create an app that has a pdf in the project and open it in a document viewer
var docViewer = Ti.UI.iOS.createDocumentViewer({ 
url : mypathtopdf 
}); 
docViewer.show(); 
3) Click on the share button on the document viewer and select acrobat. Observe nothing happens. 4) Any app or "Save to Files" from the share menu do not allow you to save or open the pdf.

Comments

  1. Eric Merriman 2017-11-27

    [~hknoechel] Can you take a look and see what it would take to fix this?
  2. Hans Knöchel 2017-11-27

    Some considerations: * iOS 11 only allows documents that are actually copied to the app-bundle (= placed in /Resources (classic) or app/assets (Alloy)). * This is a breaking change from iOS, read more [here](https://stackoverflow.com/a/47024188/5537752) and [here](https://stackoverflow.com/questions/46531572/uidocumentinteractioncontroller-does-not-open-other-app-in-ios-11) * It can be solved by copying the file to an app-directory first, e.g. the cache-directory and open it from there We should document this behavior in the docs, but please let me know if there are further questions.
  3. Hans Knöchel 2017-11-27

    PR to update the docs: https://github.com/appcelerator/titanium_mobile/pull/9630

JSON Source