(filePath: string)
| 16 | export * from './native-helper'; |
| 17 | |
| 18 | export function openFile(filePath: string): boolean { |
| 19 | try { |
| 20 | const appPath = iOSUtils.getCurrentAppPath(); |
| 21 | const path = isRealDevice() ? filePath.replace('~', appPath) : filePath; |
| 22 | |
| 23 | const controller = UIDocumentInteractionController.interactionControllerWithURL(NSURL.fileURLWithPath(path)); |
| 24 | controller.delegate = iOSUtils.createUIDocumentInteractionControllerDelegate(); |
| 25 | |
| 26 | return controller.presentPreviewAnimated(true); |
| 27 | } catch (e) { |
| 28 | Trace.write('Error in openFile', Trace.categories.Error, Trace.messageType.error); |
| 29 | } |
| 30 | |
| 31 | return false; |
| 32 | } |
| 33 | |
| 34 | export function GC() { |
| 35 | __collect(); |
nothing calls this directly
no test coverage detected