feat(diagnostic): add requestRemoteNotificationsAuthorization method (#3051)

solves #3050

while diagnostic plugin docs may be confusing, the `requestRemoteNotificationsAuthorization(successCallback, errorCallback, types, omitRegistration)` signature is available in the sources:

0fac4a59d1/www/ios/diagnostic.notifications.js (L162)
This commit is contained in:
Szymon Stasik 2019-06-10 12:55:26 -05:00 committed by Daniel Sogl
parent a586734b92
commit 12f2782fef

View File

@ -812,6 +812,15 @@ export class Diagnostic extends IonicNativePlugin {
return; return;
} }
/**
* Requests reminders authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestRemoteNotificationsAuthorization(types?: string[], omitRegistration?: boolean): Promise<string> {
return;
}
/** /**
* Indicates the current setting of notification types for the app in the Settings app. * Indicates the current setting of notification types for the app in the Settings app.
* Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled. * Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled.