mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 10:36:14 +08:00
docs(firebase-messaging): update docs to support requestPermission forceShow and getToken tokenType options (#3047)
This commit is contained in:
parent
b79c8b1ea0
commit
312c126cc8
@ -31,6 +31,12 @@ export interface IFirebaseAPSMessage {
|
||||
|
||||
export type IFirebaseMessage = IFirebaseAPSMessage | IFirebaseGCMMessage;
|
||||
|
||||
export interface IRequestPermissionOptions {
|
||||
forceShow?: boolean;
|
||||
}
|
||||
|
||||
export type FirebaseMessagingTokenType = 'apns-buffer' | 'apns-string';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Firebase Messaging
|
||||
@ -85,22 +91,27 @@ export class FirebaseMessaging extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Grant permission to recieve push notifications (will trigger prompt on iOS).
|
||||
* Grant permission to receive push notifications (will trigger prompt on iOS).
|
||||
*
|
||||
* @param {IRequestPermissionOptions} [options]
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
requestPermission(): Promise<string> {
|
||||
requestPermission(options?: { forceShow?: boolean }): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a promise that fulfills with the current FCM token
|
||||
*
|
||||
* This method also accepts optional argument type.
|
||||
* Currently iOS implementation supports values "apns-buffer" and "apns-string" that defines presentation of resolved APNS token.
|
||||
*
|
||||
* @param {FirebaseMessagingTokenType} [type] iOS only. Defines presentation of resolved APNS token
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getToken(): Promise<string> {
|
||||
getToken(type?: FirebaseMessagingTokenType): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user