@@ -474,7 +474,6 @@ firebase._registerForRemoteNotifications = function () {
474474 }
475475} ;
476476
477- // TODO test & fix
478477function getAppDelegate ( ) {
479478 // Play nice with other plugins by not completely ignoring anything already added to the appdelegate
480479 if ( application . ios . delegate === undefined ) {
@@ -2193,9 +2192,12 @@ firebase.invites.getInvitation = function () {
21932192
21942193// see https://developer.apple.com/reference/usernotifications/unusernotificationcenterdelegate?language=objc
21952194class UNUserNotificationCenterDelegateImpl extends NSObject implements UNUserNotificationCenterDelegate {
2196- public static ObjCProtocols = [ UNUserNotificationCenterDelegate ] ;
2195+ public static ObjCProtocols = [ ] ;
21972196
21982197 static new ( ) : UNUserNotificationCenterDelegateImpl {
2198+ if ( UNUserNotificationCenterDelegateImpl . ObjCProtocols . length === 0 && typeof ( UNUserNotificationCenterDelegate ) !== "undefined" ) {
2199+ UNUserNotificationCenterDelegateImpl . ObjCProtocols . push ( UNUserNotificationCenterDelegate ) ;
2200+ }
21992201 return < UNUserNotificationCenterDelegateImpl > super . new ( ) ;
22002202 }
22012203
@@ -2212,9 +2214,12 @@ class UNUserNotificationCenterDelegateImpl extends NSObject implements UNUserNot
22122214}
22132215
22142216class FIRInviteDelegateImpl extends NSObject implements FIRInviteDelegate {
2215- public static ObjCProtocols = [ FIRInviteDelegate ] ;
2217+ public static ObjCProtocols = [ ] ;
22162218
22172219 static new ( ) : FIRInviteDelegateImpl {
2220+ if ( FIRInviteDelegateImpl . ObjCProtocols . length === 0 && typeof ( FIRInviteDelegate ) !== "undefined" ) {
2221+ FIRInviteDelegateImpl . ObjCProtocols . push ( FIRInviteDelegate ) ;
2222+ }
22182223 return < FIRInviteDelegateImpl > super . new ( ) ;
22192224 }
22202225
@@ -2231,9 +2236,12 @@ class FIRInviteDelegateImpl extends NSObject implements FIRInviteDelegate {
22312236}
22322237
22332238class FIRMessagingDelegateImpl extends NSObject implements FIRMessagingDelegate {
2234- public static ObjCProtocols = [ FIRMessagingDelegate ] ;
2239+ public static ObjCProtocols = [ ] ;
22352240
22362241 static new ( ) : FIRMessagingDelegateImpl {
2242+ if ( FIRMessagingDelegateImpl . ObjCProtocols . length === 0 && typeof ( FIRMessagingDelegate ) !== "undefined" ) {
2243+ FIRMessagingDelegateImpl . ObjCProtocols . push ( FIRMessagingDelegate ) ;
2244+ }
22372245 return < FIRMessagingDelegateImpl > super . new ( ) ;
22382246 }
22392247
@@ -2259,9 +2267,12 @@ class FIRMessagingDelegateImpl extends NSObject implements FIRMessagingDelegate
22592267}
22602268
22612269class GADInterstitialDelegateImpl extends NSObject implements GADInterstitialDelegate {
2262- public static ObjCProtocols = [ GADInterstitialDelegate ] ;
2270+ public static ObjCProtocols = [ ] ;
22632271
22642272 static new ( ) : GADInterstitialDelegateImpl {
2273+ if ( GADInterstitialDelegateImpl . ObjCProtocols . length === 0 && typeof ( GADInterstitialDelegate ) !== "undefined" ) {
2274+ GADInterstitialDelegateImpl . ObjCProtocols . push ( GADInterstitialDelegate ) ;
2275+ }
22652276 return < GADInterstitialDelegateImpl > super . new ( ) ;
22662277 }
22672278
@@ -2282,9 +2293,12 @@ class GADInterstitialDelegateImpl extends NSObject implements GADInterstitialDel
22822293}
22832294
22842295class GIDSignInDelegateImpl extends NSObject implements GIDSignInDelegate {
2285- public static ObjCProtocols = [ GIDSignInDelegate ] ;
2296+ public static ObjCProtocols = [ ] ;
22862297
22872298 static new ( ) : GIDSignInDelegateImpl {
2299+ if ( GIDSignInDelegateImpl . ObjCProtocols . length === 0 && typeof ( GIDSignInDelegate ) !== "undefined" ) {
2300+ GIDSignInDelegateImpl . ObjCProtocols . push ( GIDSignInDelegate ) ;
2301+ }
22882302 return < GIDSignInDelegateImpl > super . new ( ) ;
22892303 }
22902304
0 commit comments