Skip to content

Commit 05bdb20

Browse files
chore: remove old FirebaseUI auth from sample
1 parent b32c218 commit 05bdb20

File tree

7 files changed

+9
-118
lines changed

7 files changed

+9
-118
lines changed

.github/workflows/sample.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
uses: actions/checkout@main
5151
- name: Setup
5252
run: |
53+
cp samples/GoogleService-Info-dummy.plist samples/swift/GoogleService-Info.plist
5354
cd samples/swift
5455
gem install bundler
5556
bundle install

samples/objc/FirebaseUI-demo-objc/FUIAppDelegate.m

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,58 +17,13 @@
1717
#import "FUIAppDelegate.h"
1818

1919
@import FirebaseCore;
20-
@import FirebaseAuthUI;
21-
@import FirebaseDynamicLinks;
22-
@import FBSDKCoreKit;
23-
#import <GTMSessionFetcher/GTMSessionFetcherLogging.h>
2420

2521
@implementation FUIAppDelegate
2622

2723
- (BOOL)application:(UIApplication *)application
2824
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
2925
[FIRApp configure];
30-
[GTMSessionFetcher setLoggingEnabled:YES];
31-
[[FBSDKApplicationDelegate sharedInstance] application:application
32-
didFinishLaunchingWithOptions:launchOptions];
3326
return YES;
3427
}
3528

36-
- (BOOL)application:(UIApplication *)app
37-
openURL:(NSURL *)url
38-
options:(NSDictionary<NSString*, id> *)options {
39-
NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
40-
[[FBSDKApplicationDelegate sharedInstance] application:app
41-
openURL:url
42-
options:options];
43-
return [self handleOpenUrl:url sourceApplication:sourceApplication];
44-
}
45-
46-
- (BOOL)application:(UIApplication *)application
47-
continueUserActivity:(nonnull NSUserActivity *)userActivity
48-
restorationHandler:
49-
#if defined(__IPHONE_12_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0)
50-
(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> *_Nullable))restorationHandler {
51-
#else
52-
(nonnull void (^)(NSArray *_Nullable))restorationHandler {
53-
#endif // __IPHONE_12_0
54-
BOOL handled = [[FIRDynamicLinks dynamicLinks]
55-
handleUniversalLink:userActivity.webpageURL
56-
completion:^(FIRDynamicLink * _Nullable dynamicLink,
57-
NSError * _Nullable error) {
58-
if (error) {
59-
NSLog(@"%@", error.description);
60-
} else {
61-
[self handleOpenUrl:dynamicLink.url sourceApplication:nil];
62-
}
63-
}];
64-
return handled;
65-
}
66-
67-
- (BOOL)handleOpenUrl:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication {
68-
if ([FUIAuth.defaultAuthUI handleOpenURL:url sourceApplication:sourceApplication]) {
69-
return YES;
70-
}
71-
return NO;
72-
}
73-
7429
@end

samples/objc/FirebaseUI-demo-objc/FUISamplesViewController.m

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#import "FUISamplesViewController.h"
2222

23-
#import "FUIAuthViewController.h"
2423
#import "FUIChatViewController.h"
2524
#import "FUISample.h"
2625

@@ -45,16 +44,9 @@ - (void)populateSamples {
4544
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main"
4645
bundle:NULL];
4746
NSArray *samples = @[
48-
[FUISample sampleWithTitle:@"Auth"
49-
sampleDescription:@"Demonstrates the FirebaseAuthUI flow with customization options"
50-
controller:^UIViewController *{
51-
UIViewController *controller =
52-
[storyboard instantiateViewControllerWithIdentifier:@"FUIAuthViewController"];
53-
return controller;
54-
}],
5547
[FUISample sampleWithTitle:@"Chat"
56-
sampleDescription:@"Demonstrates using a FUICollectionViewDataSource to load data from "
57-
"Firebase Database into a UICollectionView for a basic chat app."
48+
sampleDescription:@"Demonstrates using a FUITableViewDataSource to load data from "
49+
"Firebase Database into a UITableView for a basic chat app."
5850
controller:^UIViewController *{
5951
UIViewController *controller =
6052
[storyboard instantiateViewControllerWithIdentifier:@"ViewController"];

samples/objc/Podfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@ target 'FirebaseUI-demo-objc' do
44
use_frameworks!
55

66
pod 'FirebaseUI', :path => '../../'
7-
pod 'FirebaseAuthUI', :path => '../../'
87
pod 'FirebaseDatabaseUI', :path => '../../'
98
pod 'FirebaseFirestoreUI', :path => '../../'
10-
pod 'FirebaseOAuthUI', :path => '../../'
11-
pod 'FirebasePhoneAuthUI', :path => '../../'
12-
pod 'FirebaseAnonymousAuthUI', :path => '../../'
13-
pod 'FirebaseEmailAuthUI', :path => '../../'
14-
pod 'FirebaseFacebookAuthUI', :path => '../../'
15-
pod 'FirebaseGoogleAuthUI', :path => '../../'
169
pod 'FirebaseStorageUI', :path => '../../'
17-
18-
pod 'Firebase/DynamicLinks'
10+
11+
pod 'Firebase/Auth' # For anonymous auth in Chat sample
1912
end

samples/swift/FirebaseUI-demo-swift/FUIAppDelegate.swift

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
//
1616

1717
import UIKit
18-
import FBSDKCoreKit
1918
import FirebaseCore
20-
import FirebaseAuth
21-
import FirebaseAuthUI
22-
import GTMSessionFetcher
2319

2420
@main
2521
class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -30,41 +26,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3026
// Successfully running this sample requires an app in Firebase and an
3127
// accompanying valid GoogleService-Info.plist file.
3228
FirebaseApp.configure()
33-
GTMSessionFetcher.setLoggingEnabled(true)
34-
ApplicationDelegate.shared.application(
35-
application,
36-
didFinishLaunchingWithOptions: launchOptions
37-
)
3829
return true
3930
}
40-
41-
@available(iOS 9.0, *)
42-
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
43-
ApplicationDelegate.shared.application(
44-
app,
45-
open: url,
46-
sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,
47-
annotation: options[UIApplication.OpenURLOptionsKey.annotation]
48-
)
49-
let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as! String?
50-
return self.handleOpenUrl(url, sourceApplication: sourceApplication)
51-
}
52-
53-
@available(iOS 8.0, *)
54-
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
55-
return self.handleOpenUrl(url, sourceApplication: sourceApplication)
56-
}
57-
58-
59-
func handleOpenUrl(_ url: URL, sourceApplication: String?) -> Bool {
60-
// [START handle_open_url]
61-
if FUIAuth.defaultAuthUI()?.handleOpen(url, sourceApplication: sourceApplication) ?? false {
62-
return true
63-
}
64-
// other URL handling goes here.
65-
return false
66-
// [END handle_open_url]
67-
}
6831

6932
}
7033

samples/swift/FirebaseUI-demo-swift/Samples/Sample.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ enum Sample: Int, RawRepresentable {
2323

2424
// When adding new samples, add a new value here and fill
2525
// out the switch statements below as necessary.
26-
case auth = 0
27-
case chat = 1
28-
case storage = 2
26+
case chat = 0
27+
case storage = 1
2928

3029
static var total: Int {
3130
var count = 0
@@ -42,11 +41,6 @@ enum Sample: Int, RawRepresentable {
4241
title: "Chat",
4342
subtitle: "Demonstrates using a FUICollectionViewDataSource to load data from Firebase Database into a UICollectionView for a basic chat app."
4443
)
45-
case .auth:
46-
return (
47-
title: "Auth",
48-
subtitle: "Demonstrates the FirebaseAuthUI flow with customization options."
49-
)
5044
case .storage:
5145
return (
5246
title: "Storage",
@@ -59,8 +53,6 @@ enum Sample: Int, RawRepresentable {
5953
switch self {
6054
case .chat:
6155
return UIStoryboard.instantiateViewController("Main", identifier: "ChatViewController")
62-
case .auth:
63-
return UIStoryboard.instantiateViewController("Main", identifier: "FUIAuthViewController")
6456
case .storage:
6557
return UIStoryboard.instantiateViewController("Main", identifier: "StorageViewController")
6658
}

samples/swift/Podfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ target 'FirebaseUI-demo-swift' do
1616
# pod 'FirebaseFirestoreInternal', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'main'
1717

1818
pod 'FirebaseUI', :path => '../../'
19-
pod 'FirebaseAuthUI', :path => '../../'
2019
pod 'FirebaseDatabaseUI', :path => '../../'
2120
pod 'FirebaseFirestoreUI', :path => '../../'
22-
pod 'FirebaseOAuthUI', :path => '../../'
23-
pod 'FirebasePhoneAuthUI', :path => '../../'
24-
pod 'FirebaseAnonymousAuthUI', :path => '../../'
25-
pod 'FirebaseEmailAuthUI', :path => '../../'
26-
pod 'FirebaseFacebookAuthUI', :path => '../../'
27-
pod 'FirebaseGoogleAuthUI', :path => '../../'
2821
pod 'FirebaseStorageUI', :path => '../../'
22+
23+
pod 'Firebase/Auth' # For anonymous auth in Chat sample
2924

3025
target 'FirebaseUI-demo-swiftTests' do
3126
inherit! :search_paths

0 commit comments

Comments
 (0)