firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Logic error detecting TestFlight in FIRAuthAPNSTokenManager.m
Description
Since there will always be a bundlePath, path.length will always be non-zero and the if will never be true
NSString *path = [[[NSBundle mainBundle] bundlePath]
stringByAppendingPathComponent:@"embedded.mobileprovision"];
if ([GULAppEnvironmentUtil isAppStoreReceiptSandbox] && !path.length) {
// Distributed via TestFlight
return defaultAppTypeProd;
}
https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseAuth/Sources/SystemService/FIRAuthAPNSTokenManager.m#L154
This stackoverflow post may be useful.
Reproducing the issue
I haven't reproduced, but discovered via code inspection. This code hasn't changed in years.
Firebase SDK Version
10.6.0
Xcode Version
14.2
Installation Method
CocoaPods
Firebase Product(s)
Authentication
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
Could wrap the associated logic with #if DEBUG to prevent local builds from being treated as testflight builds.
Closing for staleness. Please comment or create a new issue referring to this one for reconsideration.