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

Wrong object type on FIRCLSURLSessionConfiguration creation #6210

Closed
makadaw opened this issue Aug 5, 2020 · 2 comments · Fixed by #6212
Closed

Wrong object type on FIRCLSURLSessionConfiguration creation #6210

makadaw opened this issue Aug 5, 2020 · 2 comments · Fixed by #6212
Assignees
Milestone

Comments

@makadaw
Copy link

makadaw commented Aug 5, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.5
  • Firebase SDK version: 6.29.0
  • Firebase Component: Crashlytics
  • Component version: 4.3.1
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

+ (NSURLSessionConfiguration *)defaultSessionConfiguration and + (NSURLSessionConfiguration *)ephemeralSessionConfiguration method of FIRCLSURLSessionConfiguration class required return type to be NSURLSessionConfiguration.
https://github.com/firebase/firebase-ios-sdk/blob/master/Crashlytics/Crashlytics/FIRCLSURLSession/FIRCLSURLSessionConfiguration.m#L34
But in some cases it returns instance of FIRCLSURLSessionConfiguration (return [self new];). FIRCLSURLSessionConfiguration is not subclass of the NSURLSessionConfiguration https://github.com/firebase/firebase-ios-sdk/blob/master/Crashlytics/Crashlytics/FIRCLSURLSession/FIRCLSURLSessionConfiguration.h#L21.
During the build, Xcode complained that types are mismatched. This can be suppressed by explicit cast to NSURLSessionConfiguration.

Steps to reproduce:

Build with Xcode and check warnings

@morganchen12
Copy link
Contributor

Based on this code that method should always return a valid NSURLSessionConfiguration object on iOS versions that have NSURLSession support (8+).

@samedson can we get rid of FIRCLSURLSessionConfiguration since our support floor is above iOS 8, or does it need to remain for legacy reasons?

@morganchen12 morganchen12 self-assigned this Aug 5, 2020
@samedson
Copy link
Contributor

samedson commented Aug 5, 2020

I believe we can get rid of FIRCLSURLSessionConfiguration now - we are following Firebase's support floor.

@morganchen12 morganchen12 added this to the 6.31.0 - M78 milestone Aug 5, 2020
@firebase firebase locked and limited conversation to collaborators Sep 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
4 participants