MCPcopy Create free account
hub / github.com/NativeScript/nativescript-imagepicker / authorize

Method authorize

src/imagepicker.ios.ts:62–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 }
61
62 authorize(): Promise<void> {
63 console.log("authorizing...");
64
65 return new Promise<void>((resolve, reject) => {
66 let runloop = CFRunLoopGetCurrent();
67 PHPhotoLibrary.requestAuthorization(function (result) {
68 if (result === PHAuthorizationStatus.Authorized) {
69 resolve();
70 } else {
71 reject(new Error("Authorization failed. Status: " + result));
72 }
73 });
74 });
75 }
76
77 present() {
78 return new Promise<void>((resolve, reject) => {

Callers 2

startSelectionMethod · 0.45
startSelectionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected