(filePath: string)
| 125 | } |
| 126 | |
| 127 | function openFileAtRootModule(filePath: string): boolean { |
| 128 | try { |
| 129 | const appPath = getCurrentAppPath(); |
| 130 | const path = isRealDevice() ? filePath.replace('~', appPath) : filePath; |
| 131 | |
| 132 | const controller = UIDocumentInteractionController.interactionControllerWithURL(NSURL.fileURLWithPath(path)); |
| 133 | controller.delegate = createUIDocumentInteractionControllerDelegate(); |
| 134 | |
| 135 | return controller.presentPreviewAnimated(true); |
| 136 | } catch (e) { |
| 137 | Trace.write('Error in openFile', Trace.categories.Error, Trace.messageType.error); |
| 138 | } |
| 139 | |
| 140 | return false; |
| 141 | } |
| 142 | // TODO: remove for NativeScript 9.0 |
| 143 | export function getter<T>(_this: any, property: T | { (): T }): T { |
| 144 | console.log('utils.ios.getter() is deprecated; use the respective native property instead'); |
no test coverage detected