@@ -43,14 +43,11 @@ firebase.areNotificationsEnabled = firebaseMessaging.areNotificationsEnabled;
4343firebase . functions = firebaseFunctions ;
4444
4545firebase . addAppDelegateMethods = appDelegate => {
46- console . log ( ">>> addAppDelegateMethods" ) ;
4746 // we need the launchOptions for this one so it's a bit hard to use the UIApplicationDidFinishLaunchingNotification pattern we're using for other things
4847 appDelegate . prototype . applicationDidFinishLaunchingWithOptions = ( application , launchOptions ) => {
49- console . log ( ">>> applicationDidFinishLaunchingWithOptions" ) ;
5048 if ( ! firebase . _configured ) {
5149 firebase . _configured = true ;
5250 if ( typeof ( FIRApp ) !== "undefined" ) {
53- console . log ( ">>> applicationDidFinishLaunchingWithOptions, configure firebase" ) ;
5451 FIRApp . configure ( ) ;
5552 }
5653 }
@@ -71,7 +68,6 @@ firebase.addAppDelegateMethods = appDelegate => {
7168
7269 // there's no notification event to hook into for this one, so using the appDelegate
7370 if ( typeof ( FBSDKApplicationDelegate ) !== "undefined" || typeof ( GIDSignIn ) !== "undefined" || typeof ( FIRInvites ) !== "undefined" || typeof ( FIRDynamicLink ) !== "undefined" ) {
74- console . log ( ">> wiring applicationOpenURLSourceApplicationAnnotation" ) ;
7571 appDelegate . prototype . applicationOpenURLSourceApplicationAnnotation = ( application , url , sourceApplication , annotation ) => {
7672 let result = false ;
7773 if ( typeof ( FBSDKApplicationDelegate ) !== "undefined" ) {
@@ -96,11 +92,8 @@ firebase.addAppDelegateMethods = appDelegate => {
9692 }
9793
9894 if ( typeof ( FIRDynamicLink ) !== "undefined" ) {
99- console . log ( ">> wiring applicationOpenURLSourceApplicationAnnotation, FIRDynamicLink" ) ;
10095 const dynamicLink = FIRDynamicLinks . dynamicLinks ( ) . dynamicLinkFromCustomSchemeURL ( url ) ;
101- console . log ( ">> wiring applicationOpenURLSourceApplicationAnnotation, FIRDynamicLink: " + dynamicLink ) ;
10296 if ( dynamicLink ) {
103- console . log ( ">>> dynamicLink.url.absoluteString: " + dynamicLink . url . absoluteString ) ;
10497 firebase . _cachedDynamicLink = {
10598 url : dynamicLink . url . absoluteString ,
10699 // matchConfidence: dynamicLink.matchConfidence,
@@ -116,7 +109,6 @@ firebase.addAppDelegateMethods = appDelegate => {
116109
117110 if ( typeof ( FBSDKApplicationDelegate ) !== "undefined" || typeof ( GIDSignIn ) !== "undefined" || typeof ( FIRDynamicLink ) !== "undefined" ) {
118111 appDelegate . prototype . applicationOpenURLOptions = ( application , url , options ) => {
119- console . log ( ">> wiring applicationOpenURLOptions" ) ;
120112
121113 let result = false ;
122114 if ( typeof ( FBSDKApplicationDelegate ) !== "undefined" ) {
@@ -135,12 +127,9 @@ firebase.addAppDelegateMethods = appDelegate => {
135127 }
136128
137129 if ( typeof ( FIRDynamicLink ) !== "undefined" ) {
138- console . log ( ">> wiring applicationOpenURLOptions, FIRDynamicLink, url: " + url ) ;
139130 const dynamicLinks : FIRDynamicLinks = FIRDynamicLinks . dynamicLinks ( ) ;
140131 const dynamicLink : FIRDynamicLink = dynamicLinks . dynamicLinkFromCustomSchemeURL ( url ) ;
141- console . log ( ">> wiring applicationOpenURLOptions, FIRDynamicLink: " + dynamicLink ) ;
142132 if ( dynamicLink && dynamicLink . url !== null ) {
143- console . log ( ">>> dynamicLink.url.absoluteString: " + dynamicLink . url . absoluteString ) ;
144133 if ( firebase . _dynamicLinkCallback ) {
145134 firebase . _dynamicLinkCallback ( {
146135 url : dynamicLink . url . absoluteString ,
@@ -162,9 +151,7 @@ firebase.addAppDelegateMethods = appDelegate => {
162151 }
163152
164153 if ( typeof ( FIRDynamicLink ) !== "undefined" ) {
165- console . log ( ">>> addAppDelegateMethods, FIRDynamicLink" ) ;
166154 appDelegate . prototype . applicationContinueUserActivityRestorationHandler = ( application , userActivity , restorationHandler ) => {
167- console . log ( ">>> applicationContinueUserActivityRestorationHandler" ) ;
168155 let result = false ;
169156
170157 if ( userActivity . webpageURL ) {
@@ -318,36 +305,13 @@ if (typeof (FIRMessaging) !== "undefined" || useExternalPushProvider) {
318305// This breaks in-app-messaging :(
319306function getAppDelegate ( ) {
320307 // Play nice with other plugins by not completely ignoring anything already added to the appdelegate
321- console . log ( ">>> getAppDelegate, application.ios.delegate: " + application . ios . delegate ) ;
322308 if ( application . ios . delegate === undefined ) {
323- console . log ( ">>> getAppDelegate, window = " + application . ios . window ) ;
324309
310+ @ObjCClass ( UIApplicationDelegate )
325311 class UIApplicationDelegateImpl extends UIResponder implements UIApplicationDelegate {
326- public static ObjCProtocols = [ UIApplicationDelegate ] ;
327-
328- // get window() {
329- // console.log(">>> getting window: " + application.ios.window);
330- // return application.ios.window;
331- // };
332-
333- // set window(w) {
334- // console.log(">>> setting window: " + w);
335- // application.ios.window = w;
336- // };
337-
338- // static new(): UIApplicationDelegateImpl {
339- // console.log(">> new UIApplicationDelegateImpl");
340- // return <UIApplicationDelegateImpl>super.new();
341- // }
342312 }
343313
344314 application . ios . delegate = UIApplicationDelegateImpl ;
345-
346- setTimeout ( ( ) => {
347- if ( ! application . ios . delegate . window ) {
348- application . ios . delegate . window = application . ios . window ;
349- }
350- } , 2000 ) ;
351315 }
352316 return application . ios . delegate ;
353317}
@@ -386,18 +350,14 @@ firebase.init = arg => {
386350
387351 // if deeplinks are used, then for this scheme to work the use must have added the bundle as a scheme to their plist (this is in our docs)
388352 if ( FIROptions . defaultOptions ( ) !== null ) {
389- console . log ( ">> init, defaultOptions deepLinkURLScheme" ) ;
390353 FIROptions . defaultOptions ( ) . deepLinkURLScheme = NSBundle . mainBundle . bundleIdentifier ;
391- console . log ( ">> init, defaultOptions deepLinkURLScheme: " + NSBundle . mainBundle . bundleIdentifier ) ;
392354 }
393355
394356 FIRAnalyticsConfiguration . sharedInstance ( ) . setAnalyticsCollectionEnabled ( arg . analyticsCollectionEnabled !== false ) ;
395357
396- console . log ( ">>> init, configure firebase" ) ;
397358 if ( ! firebase . _configured ) {
398359 firebase . _configured = true ;
399360 if ( typeof ( FIRApp ) !== "undefined" ) {
400- console . log ( ">>> init, firebase configured" ) ;
401361 FIRApp . configure ( ) ;
402362 }
403363 }
0 commit comments