firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Firebase Auth does not respect FirebaseAppDelegateProxyEnabled set to false
Step 1: Describe your environment
- Xcode version: 13.0 (13A233)
- Firebase SDK version: 8.8.0
- Installation method: CocoaPods
- Firebase Component: Auth
Step 2: Describe the problem
My project is not using any notification-based Firebase features (and is not using Firebase Auth phone authentication), but I have received an Apple email mentioning the issue "ITMS-90078: Missing Push Notification Entitlement" when submitting the iOS app to TestFlight.
The app does not have push notifications enabled in App Store Connect, or via any Xcode entitlement, and the Info.plist key FirebaseAppDelegateProxyEnabled
is set to a boolean value of false:
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
My hunch is that Firebase Auth is still attempting to proxy my app delegate or to swizzle any app delegate methods, including APNS related methods, despite FirebaseAppDelegateProxyEnabled
set to false.
I'm also using the Firebase Analytics and Crashlytics subspecs, so I might be totally wrong on this, but searching through this repo for proxyOriginalDelegateIncludingAPNSMethods
shows the only subspec I'm using in my project that calls that method is Firebase Auth.
Hi @sebj,
- Has the issue happened before even if the
FirebaseAppDelegateProxyEnabled
is set tofalse
? - Is it possible for you to try removing
FirebaseAppDelegateProxyEnabled
and see if you'll still receive the same email?
Also, the message you've shared seems to be a warning, so it shouldn't mean that your app is rejected.
Hi @rizafran,
- This is the first time I've set
FirebaseAppDelegateProxyEnabled
tofalse
and then submitted, giving the warning - A previous build without the key
FirebaseAppDelegateProxyEnabled
had the same warning email
I'm aware that the app wouldn't be rejected, but it seems like an avoidable warning given I'd expect FirebaseAppDelegateProxyEnabled
to have some effect on Firebase Auth in this case (or at least have some other opt-out from this behaviour otherwise perhaps)
Adding GoogleUtilities tag since my expectation would be that FirebaseAppDelegateProxyEnabled
should be handled the same in GoogleUtilities whether being used from Firebase Auth or Firebase Messaging.
I suspect the warning may be an issue with Apple's analysis tools, as breakpointing inside both GULAppDelegateSwizzler
and GULSceneDelegateSwizzler
seems to show the Firebase SDK is reading FirebaseAppDelegateProxyEnabled
as expected and not swizzling anything
@sebj Does this issue still exist for you? I wonder if it's because the under the hood swizzling code still shows Push notification API that cause this even though swizzling code is not called.
@chliangGoogle Yes, the issue still exists for me unfortunately – still getting the same email from Apple each time a new build is submitted.
I'm experiencing this issue now. Even if App Store does not reject apps related ITMS-90078, is there any chance for this issue to be prioritised?
I've spent a great deal of time digging through Firebase's documentation along with this issue to understand the root cause. I'm sure it's the same for many others trying to integrate with Firebase.
commenting to let know that this is happening with app that I've been working on right now, and I can still repro this issues. Pods that I am using are,
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
pod 'FirebaseAuth'
Any heads up are appreciated to help resolve this issue.
@andrewheard Any lead on this? Much appreciated
@andrewheard any update on this? I'm facing the same issue.
As discussed above, this seems to be an issue with Apple's tooling since the FirebaseAppDelegateProxyEnabled
flag is honored.
Happy to consider a PR to FirebaseAuth to check the FirebaseAppDelegateProxyEnabled
flag and stop the call chain earlier if it addresses the warning.
@chliangGoogle Yes, the issue still exists for me unfortunately – still getting the same email from Apple each time a new build is submitted.
@paulb777 thanks for the quick response. My issue is slightly different. Let me explain - I've integrate firebase-ios-sdk in my react native iOS app using SPM. I've added the key value pair required to disable swizzling to my plist -
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
My UNUserNotificationCenter
delegates still don't seem to called. Here's my AppDelegate file for reference.
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTLinkingManager.h>
#import <UIKit/UIKit.h>
#import <UserNotifications/UserNotifications.h>
#import <FirebaseCore/FirebaseCore.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"KlaviyoRNTestApp";
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;
// helper method that uses UNUserNotificationCenter to request push permission from the user.
[PushNotificationsHelper requestPushPermissions];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// Convert the token to a string
NSUInteger length = deviceToken.length;
if (length == 0) {
return;
}
const unsigned char *buffer = (const unsigned char *)[deviceToken bytes];
NSMutableString *hexString = [NSMutableString stringWithCapacity:(length * 2)];
for (int i = 0; i < length; ++i) {
[hexString appendFormat:@"%02x", buffer[i]];
}
self.pushToken = hexString;
NSLog(@"push token = %@", hexString);
}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler {
NSLog(@"In did receive push response");
[PushNotificationsHelper handleWithResponse:response completionHandler:completionHandler];
}
@end
Thanks. Happy to open a separate issue if my problem is unrelated to this thread here.
@ajaysubra Yes. That sounds like a separate issue that should be opened at https://github.com/invertase/react-native-firebase
Closing for staleness.