[TIMOB-2510] iOS: createDocumentViewer (UIDocumentInteractionController) is defined but undocumented
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-03T15:56:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-29, Release 1.8.0 |
Components | iOS |
Labels | n/a |
Reporter | william (at sqlcoders) |
Assignee | Sabil Rahim |
Created | 2011-04-15T03:21:35.000+0000 |
Updated | 2013-01-03T12:07:02.000+0000 |
Description
UIDocumentInteractionController is defined as createDocumentViewer in https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIiPadProxy.m"> https://github.com/appcelerator/titanium_mobile/blob/master/iphone/..., but is undocumented despite other methods in the same class being documented.
It would be awesome if someone could write rudimentary docs for this, as for non-objc users figuring out the js->titanium->objc stuff is kind of hard (I'm trying to figure it out from the apple docs @ http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/StandardBehaviors/StandardBehaviors.html#//apple_ref/doc/uid/TP40007072-CH4-SW22"> http://developer.apple.com/library/ios/#documentation/iPhone/Concep... , but its tricky because I don't do this normally)
I've managed to cobble together a horrible working proof at http://pastie.org/1352776">http://pastie.org/1352776 which at least confirms that the createDocumentViewer function does work, and can launch things.
More trawling through objc to go, but I think I can get something working now.
I don't know if appcelerator accepts outside doc/code samples, but if I can I'll attach a proper documented example later and see if someone wants to import it.
Just a comment... Could we get some Docs on this and a working sample code? The code provided by William is not working. There is a sample code from Apple (in Obj-C) right here: http://developer.apple.com/library/ios/#samplecode/DocInteraction/Listings/ReadMe_txt.html
As per customer request, this goes along with: http://developer.appcelerator.com/question/71551/feature-req-support-for-opening-files-in-other-apps-uidocumentinteractioncontroller
One more customer request for this info. Associated Helpdesk Ticket: http://support-admin.appcelerator.com/display/APP-851388 Increasing the priority to High
While not the same feature, note that we now have a QuickLook module that surfaces the iOS QuickLook API for displaying documents in a view.
Forgot to resolve issue.
Sample code: must include a pdf "Example.pdf"
Verified functioning with SDK 1.8.0.1.v20111205164258 on iPad 2 (4.3.6) and iPad 2 (4.3.5). Also verified documentation is in place.
Reopening/closing to update labels
I agree with Michael Pettiford's comment - 03/Jan/12 5:56 PM. Will open new issue for iOS.