Skip to content

Commit

Permalink
Changelog and CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Jun 5, 2024
1 parent 7a1354f commit a4df899
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 76 deletions.
70 changes: 19 additions & 51 deletions FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@

@implementation FIRAppDistributionUIService

API_AVAILABLE(ios(12.0))
ASWebAuthenticationSession *_webAuthenticationVC;

// TODO: Remove this when the deployment target becomes iOS 12+
SFAuthenticationSession *_safariAuthenticationVC;

- (instancetype)init {
self = [super init];

Expand Down Expand Up @@ -66,15 +62,8 @@ + (NSError *_Nullable)mapErrorToAppDistributionError:(NSError *_Nullable)error {
if (!error) {
return nil;
}

if (@available(iOS 12.0, *)) {
if ([error code] == ASWebAuthenticationSessionErrorCodeCanceledLogin) {
return [self getAppDistributionError:FIRAppDistributionErrorAuthenticationCancelled];
}
} else {
if ([error code] == SFAuthenticationErrorCanceledLogin) {
return [self getAppDistributionError:FIRAppDistributionErrorAuthenticationCancelled];
}
if ([error code] == ASWebAuthenticationSessionErrorCodeCanceledLogin) {
return [self getAppDistributionError:FIRAppDistributionErrorAuthenticationCancelled];
}

return [self getAppDistributionError:FIRAppDistributionErrorAuthenticationFailure];
Expand All @@ -88,39 +77,24 @@ - (void)appDistributionRegistrationFlow:(NSURL *)URL
FIRFADInfoLog(@"Registration URL: %@", URL);
FIRFADInfoLog(@"Callback URL: %@", callbackURL);

if (@available(iOS 12.0, *)) {
ASWebAuthenticationSession *authenticationVC = [[ASWebAuthenticationSession alloc]
initWithURL:URL
callbackURLScheme:callbackURL
completionHandler:^(NSURL *_Nullable callbackURL, NSError *_Nullable error) {
[self resetUIState];
[self logRegistrationCompletion:error authType:[ASWebAuthenticationSession description]];
NSError *_Nullable appDistributionError =
[[self class] mapErrorToAppDistributionError:error];
completion(appDistributionError);
}];

if (@available(iOS 13.0, *)) {
authenticationVC.presentationContextProvider = self;
}

_webAuthenticationVC = authenticationVC;
ASWebAuthenticationSession *authenticationVC = [[ASWebAuthenticationSession alloc]
initWithURL:URL
callbackURLScheme:callbackURL
completionHandler:^(NSURL *_Nullable callbackURL, NSError *_Nullable error) {
[self resetUIState];
[self logRegistrationCompletion:error authType:[ASWebAuthenticationSession description]];
NSError *_Nullable appDistributionError =
[[self class] mapErrorToAppDistributionError:error];
completion(appDistributionError);
}];

[authenticationVC start];
} else {
_safariAuthenticationVC = [[SFAuthenticationSession alloc]
initWithURL:URL
callbackURLScheme:callbackURL
completionHandler:^(NSURL *_Nullable callbackURL, NSError *_Nullable error) {
[self resetUIState];
[self logRegistrationCompletion:error authType:[SFAuthenticationSession description]];
NSError *_Nullable appDistributionError =
[[self class] mapErrorToAppDistributionError:error];
completion(appDistributionError);
}];

[_safariAuthenticationVC start];
if (@available(iOS 13.0, *)) {
authenticationVC.presentationContextProvider = self;
}

_webAuthenticationVC = authenticationVC;

[authenticationVC start];
}

- (void)showUIAlert:(UIAlertController *)alertController {
Expand Down Expand Up @@ -234,13 +208,7 @@ - (void)resetUIState {

self.registrationFlowCompletion = nil;

if (@available(iOS 12.0, *)) {
_webAuthenticationVC = nil;
}
// TODO: Remove this when the deployment target becomes iOS 12+
// `_safariAuthenticationVC` is cleared unconditionally just in case;
// It’s supposed to be assigned only when run on iOS 11.
_safariAuthenticationVC = nil;
_webAuthenticationVC = nil;
}

- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
Expand Down
14 changes: 7 additions & 7 deletions FirebaseCombineSwift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebaseCombineSwift'
s.version = '10.0.0'
s.version = '11.0.0'
s.summary = 'Swift extensions with Combine support for Firebase'

s.description = <<-DESC
Expand Down Expand Up @@ -51,11 +51,11 @@ for internal testing only. It should not be published.
s.osx.framework = 'AppKit'
s.tvos.framework = 'UIKit'

s.dependency 'FirebaseCore', '~> 10.0'
s.dependency 'FirebaseAuth', '~> 10.0'
s.dependency 'FirebaseFunctions', '~> 10.0'
s.dependency 'FirebaseFirestore', '~> 10.0'
s.dependency 'FirebaseStorage', '~> 10.0'
s.dependency 'FirebaseCore', '~> 11.0'
s.dependency 'FirebaseAuth', '~> 11.0'
s.dependency 'FirebaseFunctions', '~> 11.0'
s.dependency 'FirebaseFirestore', '~> 11.0'
s.dependency 'FirebaseStorage', '~> 11.0'

s.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
Expand Down Expand Up @@ -104,6 +104,6 @@ for internal testing only. It should not be published.
int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist',
'FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers'
int_tests.dependency 'FirebaseAuth', '~> 10.0'
int_tests.dependency 'FirebaseAuth', '~> 11.0'
end
end
11 changes: 11 additions & 0 deletions FirebaseCore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Firebase 11.0.0
- [changed] **Breaking change**: Firebase's minimum supported versions have
updated for the following platforms:
- | Platform | Firebase 11 |
| ------------- | ------------- |
| iOS | **13.0** |
| tvOS | **13.0** |
| macOS | **10.15** |
| watchOS | 7.0 |
- FirebaseAnalytics and FirebaseCrashlytics also continue to support iOS 12.0.

# Firebase 10.25.0
- [changed] Firebase now requires at least Xcode 15.2. See
https://developer.apple.com/news/?id=fxu2qp7b for more info.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,13 @@ - (void)viewDidLoad {
self.view.layer.shadowOpacity = 0.4;

// Calculate status bar height.
CGFloat statusBarHeight = 0;
if (@available(iOS 13.0, tvOS 13.0, *)) {
UIStatusBarManager *manager =
[UIApplication sharedApplication].keyWindow.windowScene.statusBarManager;

statusBarHeight = manager.statusBarFrame.size.height;
} else {
statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height;
}
// TODO(#13068) : Fix keyWindow deprecation.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
UIStatusBarManager *manager =
[UIApplication sharedApplication].keyWindow.windowScene.statusBarManager;
#pragma clang diagnostic pop
CGFloat statusBarHeight = manager.statusBarFrame.size.height;

// Pin title label below status bar with cushion.
[[self.titleLabel.topAnchor constraintEqualToAnchor:self.view.topAnchor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pod 'FirebaseInstallations', :path => '../../../..'
pod 'FirebaseABTesting', :path => '../../../..'

target 'FiamDisplaySwiftExample' do
platform :ios, '11.0'
platform :ios, '13.0'
pod 'FirebaseInAppMessaging', :path => '../../../..'
end

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pod 'FirebaseInstallations', :path => '../../../..'
pod 'FirebaseABTesting', :path => '../../../..'

target 'InAppMessaging_Example_iOS' do
platform :ios, '11.0'
platform :ios, '13.0'

pod 'FirebaseInAppMessaging', :path => '../../../..'
pod 'FirebaseDynamicLinks', :path => '../../../..'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ void InstrumentViewDidAppear(FPRUIViewControllerInstrument *instrument,

// This has to be called on the main thread and so it's done here instead of in
// FPRScreenTraceTracker.
// TODO: Replace keyWindow usage (deprecated in iOS and unavailable in visionOS).
// TODO(#13067): Replace keyWindow usage (deprecated in iOS and unavailable in visionOS).
#if !defined(TARGET_OS_VISION) || !TARGET_OS_VISION
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([((UIViewController *)_self).view isDescendantOfView:FPRSharedApplication().keyWindow]) {
#pragma clang diagnostic pop
[[FPRScreenTraceTracker sharedInstance] viewControllerDidAppear:_self];
}
#endif
Expand Down
3 changes: 1 addition & 2 deletions FirebaseRemoteConfig/Tests/Sample/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '13.0'

source 'https://github.com/firebase/SpecsDev.git'
source 'https://github.com/firebase/SpecsStaging.git'
Expand Down
4 changes: 3 additions & 1 deletion FirebaseRemoteConfigInterop.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Pod::Spec.new do |s|
s.prefix_header_file = false

s.social_media_url = 'https://twitter.com/Firebase'
s.ios.deployment_target = '13.0'

# The ios deployment target must support Crashlytics.
s.ios.deployment_target = '12.0'
s.osx.deployment_target = '10.15'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '7.0'
Expand Down
6 changes: 3 additions & 3 deletions Firestore/Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ end

if is_platform(:ios)
target 'Firestore_Example_iOS' do
platform :ios, '11.0'
platform :ios, '13.0'

configure_local_pods()

Expand Down Expand Up @@ -139,7 +139,7 @@ end

if is_platform(:osx)
target 'Firestore_Example_macOS' do
platform :osx, '10.13'
platform :osx, '10.15'

configure_local_pods()

Expand Down Expand Up @@ -170,7 +170,7 @@ end

if is_platform(:tvos)
target 'Firestore_Example_tvOS' do
platform :tvos, '12.0'
platform :tvos, '13.0'

configure_local_pods()

Expand Down

0 comments on commit a4df899

Please sign in to comment.