Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecations in FIRAuth.m and FIRAuthNotificationManager.m #5437

Closed
tfonfara opened this issue Apr 22, 2020 · 5 comments · Fixed by #5439
Closed

Deprecations in FIRAuth.m and FIRAuthNotificationManager.m #5437

tfonfara opened this issue Apr 22, 2020 · 5 comments · Fixed by #5439
Assignees
Milestone

Comments

@tfonfara
Copy link

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.4.1
  • Firebase SDK version: 6.23.0
  • Firebase Component: Auth
  • Component version: 6.5.1
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Just compile.

Relevant Code (incl. suggested fix):

FIRAuth.m:1523

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)application:(UIApplication *)application
    didReceiveRemoteNotification:(NSDictionary *)userInfo {
  [self canHandleNotification:userInfo];
}
#pragma clang diagnostic pop

FIRAuth.m:1534

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)application:(UIApplication *)application
              openURL:(NSURL *)url
    sourceApplication:(nullable NSString *)sourceApplication
           annotation:(id)annotation {
  return [self canHandleURL:url];
}
#pragma clang diagnostic pop

FIRAuthNotificationManager.m:118

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    } else if ([self->_application.delegate
                   respondsToSelector:@selector(application:didReceiveRemoteNotification:)]) {
      [self->_application.delegate application:self->_application
                  didReceiveRemoteNotification:proberNotification];
#pragma clang diagnostic pop
@paulb777
Copy link
Member

@tfonfara Thanks for the report. Would you share the build configuration?

We're not able to reproduce since with a standard CocoaPods installation, the FirebaseAuth podspec causes the iOS Deployment version for the FirebaseAuth pod build to be set to 8.0.

@tfonfara
Copy link
Author

@paulb777 my deployment target is set to 11.0, there the issue appears. As the #pragma clang diagnostic statements are not available in the code I would see this as expected, as the mentioned methods are deprecated from 10.0+ (check here: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623117-application?language=objc)

@paulb777
Copy link
Member

@tfonfara How is the deployment target set to 11.0? When CocoaPods does an install for a pod, it uses the version from the podspec here - https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseAuth.podspec#L20

@tfonfara
Copy link
Author

@paulb777 Apple used to refuse apps with different deployment targets in app and frameworks some time ago, that's why I had to add this line in the Podfile:

if target.platform_name == :ios
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $platformTarget_iOS
end

After that fix AppStoreConnect accepted my binaries (this fix came from somewhere in the CocoaPods Github project). This sets the deployment target up to my app's deployment target.

@paulb777
Copy link
Member

Interesting. That Podfile patch shouldn't be necessary for static frameworks like Firebase that link at build time and aren't part of the deployment package.

Nonetheless, it should be harmless for us to address those warnings, so we'll investigate.

Here's the full list when setting deployment target to iOS 13:

Screen Shot 2020-04-22 at 8 56 41 AM

@paulb777 paulb777 self-assigned this Apr 22, 2020
@paulb777 paulb777 added this to the M70 milestone Apr 22, 2020
@firebase firebase locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants