diff --git a/ios/Capacitor/Capacitor/CAPPlugin.h b/ios/Capacitor/Capacitor/CAPPlugin.h index e633fff0a2..de7c288dbb 100644 --- a/ios/Capacitor/Capacitor/CAPPlugin.h +++ b/ios/Capacitor/Capacitor/CAPPlugin.h @@ -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. diff --git a/ios/Capacitor/Capacitor/CAPPlugin.m b/ios/Capacitor/Capacitor/CAPPlugin.m index 10b2bfa143..d103026128 100644 --- a/ios/Capacitor/Capacitor/CAPPlugin.m +++ b/ios/Capacitor/Capacitor/CAPPlugin.m @@ -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 */