Skip to content

Commit

Permalink
feat(iOS): Add base implementation of permissions calls (#3856)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikeith authored Nov 24, 2020
1 parent e2e64c2 commit d733236
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ios/Capacitor/Capacitor/CAPPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
- (void)addListener:(CAPPluginCall* _Nonnull)call;
- (void)removeListener:(CAPPluginCall* _Nonnull)call;
- (void)removeAllListeners:(CAPPluginCall* _Nonnull)call;
/**
* Default implementation of the capacitor 3.0 permission pattern
*/
- (void)checkPermissions:(CAPPluginCall* _Nonnull)call;
- (void)requestPermissions:(CAPPluginCall* _Nonnull)call;
/**
* Give the plugins a chance to take control when a URL is about to be loaded in the WebView.
* Returning true causes the WebView to abort loading the URL.
Expand Down
8 changes: 8 additions & 0 deletions ios/Capacitor/Capacitor/CAPPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ - (BOOL)hasListeners:(NSString *)eventName {
return [listeners count] > 0;
}

- (void)checkPermissions:(CAPPluginCall *)call {
[call resolve];
}

- (void)requestPermissions:(CAPPluginCall *)call {
[call resolve];
}

/**
* Configure popover sourceRect, sourceView and permittedArrowDirections to show it centered
*/
Expand Down

0 comments on commit d733236

Please sign in to comment.