Skip to content

Commit 80e47a6

Browse files
committed
move Auth to swift 6 and spm
1 parent e7319f4 commit 80e47a6

File tree

9 files changed

+86
-238
lines changed

9 files changed

+86
-238
lines changed

authentication/AuthenticationExample.xcodeproj/project.pbxproj

Lines changed: 74 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
8848765129D314A400780FA6 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8848764F29D3149200780FA6 /* GoogleService-Info.plist */; };
11+
8D00BB692D3B068100F6F6DD /* FacebookLogin in Frameworks */ = {isa = PBXBuildFile; productRef = 8D00BB682D3B068100F6F6DD /* FacebookLogin */; };
12+
8D7951EB2D3B039D000FD694 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 8D7951EA2D3B039D000FD694 /* FirebaseAuth */; };
13+
8D7951EF2D3B03BA000FD694 /* GoogleSignIn in Frameworks */ = {isa = PBXBuildFile; productRef = 8D7951EE2D3B03BA000FD694 /* GoogleSignIn */; };
1114
EA02F68524A000E00079D000 /* UserActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA02F68424A000E00079D000 /* UserActions.swift */; };
1215
EA02F68D24A063E90079D000 /* LoginDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA02F68C24A063E90079D000 /* LoginDelegate.swift */; };
1316
EA062D5D24A0FEB6006714D3 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = EA062D5C24A0FEB6006714D3 /* README.md */; };
@@ -97,6 +100,9 @@
97100
isa = PBXFrameworksBuildPhase;
98101
buildActionMask = 2147483647;
99102
files = (
103+
8D7951EB2D3B039D000FD694 /* FirebaseAuth in Frameworks */,
104+
8D7951EF2D3B03BA000FD694 /* GoogleSignIn in Frameworks */,
105+
8D00BB692D3B068100F6F6DD /* FacebookLogin in Frameworks */,
100106
);
101107
runOnlyForDeploymentPostprocessing = 0;
102108
};
@@ -117,11 +123,11 @@
117123
/* End PBXFrameworksBuildPhase section */
118124

119125
/* Begin PBXGroup section */
120-
CE54897B57069002714B8FA5 /* Pods */ = {
126+
8D7951E92D3B039D000FD694 /* Frameworks */ = {
121127
isa = PBXGroup;
122128
children = (
123129
);
124-
path = Pods;
130+
name = Frameworks;
125131
sourceTree = "<group>";
126132
};
127133
EA02F68E24A0714B0079D000 /* OtherAuthMethodControllers */ = {
@@ -202,8 +208,8 @@
202208
EAE4CBC324855E3A00245E92 /* AuthenticationExample */,
203209
EAE4CBDA24855E3E00245E92 /* AuthenticationExampleTests */,
204210
EAE4CBE524855E3E00245E92 /* AuthenticationExampleUITests */,
211+
8D7951E92D3B039D000FD694 /* Frameworks */,
205212
EAE4CBC224855E3A00245E92 /* Products */,
206-
CE54897B57069002714B8FA5 /* Pods */,
207213
);
208214
sourceTree = "<group>";
209215
};
@@ -316,8 +322,9 @@
316322
EAE4CBB924855E3A00245E92 /* Project object */ = {
317323
isa = PBXProject;
318324
attributes = {
325+
BuildIndependentTargetsInParallel = YES;
319326
LastSwiftUpdateCheck = 1130;
320-
LastUpgradeCheck = 1130;
327+
LastUpgradeCheck = 1610;
321328
ORGANIZATIONNAME = Firebase;
322329
TargetAttributes = {
323330
EAE4CBC024855E3A00245E92 = {
@@ -342,6 +349,11 @@
342349
Base,
343350
);
344351
mainGroup = EAE4CBB824855E3A00245E92;
352+
packageReferences = (
353+
8D7951E62D3B034C000FD694 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
354+
8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */,
355+
8D00BB672D3B067500F6F6DD /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */,
356+
);
345357
productRefGroup = EAE4CBC224855E3A00245E92 /* Products */;
346358
projectDirPath = "";
347359
projectRoot = "";
@@ -469,6 +481,7 @@
469481
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
470482
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
471483
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
484+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
472485
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
473486
CLANG_WARN_STRICT_PROTOTYPES = YES;
474487
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -479,6 +492,7 @@
479492
DEBUG_INFORMATION_FORMAT = dwarf;
480493
ENABLE_STRICT_OBJC_MSGSEND = YES;
481494
ENABLE_TESTABILITY = YES;
495+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
482496
GCC_C_LANGUAGE_STANDARD = gnu11;
483497
GCC_DYNAMIC_NO_PIC = NO;
484498
GCC_NO_COMMON_BLOCKS = YES;
@@ -500,6 +514,7 @@
500514
SDKROOT = iphoneos;
501515
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
502516
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
517+
SWIFT_VERSION = 6.0;
503518
};
504519
name = Debug;
505520
};
@@ -529,6 +544,7 @@
529544
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
530545
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
531546
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
547+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
532548
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
533549
CLANG_WARN_STRICT_PROTOTYPES = YES;
534550
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -539,6 +555,7 @@
539555
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
540556
ENABLE_NS_ASSERTIONS = NO;
541557
ENABLE_STRICT_OBJC_MSGSEND = YES;
558+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
542559
GCC_C_LANGUAGE_STANDARD = gnu11;
543560
GCC_NO_COMMON_BLOCKS = YES;
544561
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -553,6 +570,7 @@
553570
SDKROOT = iphoneos;
554571
SWIFT_COMPILATION_MODE = wholemodule;
555572
SWIFT_OPTIMIZATION_LEVEL = "-O";
573+
SWIFT_VERSION = 6.0;
556574
VALIDATE_PRODUCT = YES;
557575
};
558576
name = Release;
@@ -575,7 +593,7 @@
575593
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AuthenticationExample;
576594
PRODUCT_NAME = "$(TARGET_NAME)";
577595
PROVISIONING_PROFILE_SPECIFIER = "";
578-
SWIFT_VERSION = 5.0;
596+
SWIFT_VERSION = 6.0;
579597
TARGETED_DEVICE_FAMILY = 1;
580598
};
581599
name = Debug;
@@ -598,15 +616,14 @@
598616
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AuthenticationExample;
599617
PRODUCT_NAME = "$(TARGET_NAME)";
600618
PROVISIONING_PROFILE_SPECIFIER = "";
601-
SWIFT_VERSION = 5.0;
619+
SWIFT_VERSION = 6.0;
602620
TARGETED_DEVICE_FAMILY = 1;
603621
};
604622
name = Release;
605623
};
606624
EAE4CBEF24855E3E00245E92 /* Debug */ = {
607625
isa = XCBuildConfiguration;
608626
buildSettings = {
609-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
610627
BUNDLE_LOADER = "$(TEST_HOST)";
611628
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
612629
CODE_SIGN_STYLE = Automatic;
@@ -620,7 +637,7 @@
620637
);
621638
PRODUCT_BUNDLE_IDENTIFIER = com.google.AuthenticationExampleTests;
622639
PRODUCT_NAME = "$(TARGET_NAME)";
623-
SWIFT_VERSION = 5.0;
640+
SWIFT_VERSION = 6.0;
624641
TARGETED_DEVICE_FAMILY = "1,2";
625642
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AuthenticationExample.app/AuthenticationExample";
626643
};
@@ -629,7 +646,6 @@
629646
EAE4CBF024855E3E00245E92 /* Release */ = {
630647
isa = XCBuildConfiguration;
631648
buildSettings = {
632-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
633649
BUNDLE_LOADER = "$(TEST_HOST)";
634650
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
635651
CODE_SIGN_STYLE = Automatic;
@@ -643,7 +659,7 @@
643659
);
644660
PRODUCT_BUNDLE_IDENTIFIER = com.google.AuthenticationExampleTests;
645661
PRODUCT_NAME = "$(TARGET_NAME)";
646-
SWIFT_VERSION = 5.0;
662+
SWIFT_VERSION = 6.0;
647663
TARGETED_DEVICE_FAMILY = "1,2";
648664
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AuthenticationExample.app/AuthenticationExample";
649665
};
@@ -652,7 +668,6 @@
652668
EAE4CBF224855E3E00245E92 /* Debug */ = {
653669
isa = XCBuildConfiguration;
654670
buildSettings = {
655-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
656671
CODE_SIGN_STYLE = Automatic;
657672
DEVELOPMENT_TEAM = "";
658673
INFOPLIST_FILE = AuthenticationExampleUITests/Info.plist;
@@ -664,7 +679,7 @@
664679
PRODUCT_BUNDLE_IDENTIFIER = com.google.AuthenticationExampleUITests;
665680
PRODUCT_NAME = "$(TARGET_NAME)";
666681
PROVISIONING_PROFILE = "";
667-
SWIFT_VERSION = 5.0;
682+
SWIFT_VERSION = 6.0;
668683
TARGETED_DEVICE_FAMILY = "1,2";
669684
TEST_TARGET_NAME = AuthenticationExample;
670685
};
@@ -673,7 +688,6 @@
673688
EAE4CBF324855E3E00245E92 /* Release */ = {
674689
isa = XCBuildConfiguration;
675690
buildSettings = {
676-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
677691
CODE_SIGN_STYLE = Automatic;
678692
DEVELOPMENT_TEAM = "";
679693
INFOPLIST_FILE = AuthenticationExampleUITests/Info.plist;
@@ -685,7 +699,7 @@
685699
PRODUCT_BUNDLE_IDENTIFIER = com.google.AuthenticationExampleUITests;
686700
PRODUCT_NAME = "$(TARGET_NAME)";
687701
PROVISIONING_PROFILE = "";
688-
SWIFT_VERSION = 5.0;
702+
SWIFT_VERSION = 6.0;
689703
TARGETED_DEVICE_FAMILY = "1,2";
690704
TEST_TARGET_NAME = AuthenticationExample;
691705
};
@@ -731,6 +745,51 @@
731745
defaultConfigurationName = Release;
732746
};
733747
/* End XCConfigurationList section */
748+
749+
/* Begin XCRemoteSwiftPackageReference section */
750+
8D00BB672D3B067500F6F6DD /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */ = {
751+
isa = XCRemoteSwiftPackageReference;
752+
repositoryURL = "https://github.com/facebook/facebook-ios-sdk.git";
753+
requirement = {
754+
kind = upToNextMajorVersion;
755+
minimumVersion = 18.0.0;
756+
};
757+
};
758+
8D7951E62D3B034C000FD694 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
759+
isa = XCRemoteSwiftPackageReference;
760+
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
761+
requirement = {
762+
kind = upToNextMajorVersion;
763+
minimumVersion = 11.7.0;
764+
};
765+
};
766+
8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */ = {
767+
isa = XCRemoteSwiftPackageReference;
768+
repositoryURL = "https://github.com/google/GoogleSignIn-iOS.git";
769+
requirement = {
770+
kind = upToNextMajorVersion;
771+
minimumVersion = 8.0.0;
772+
};
773+
};
774+
/* End XCRemoteSwiftPackageReference section */
775+
776+
/* Begin XCSwiftPackageProductDependency section */
777+
8D00BB682D3B068100F6F6DD /* FacebookLogin */ = {
778+
isa = XCSwiftPackageProductDependency;
779+
package = 8D00BB672D3B067500F6F6DD /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */;
780+
productName = FacebookLogin;
781+
};
782+
8D7951EA2D3B039D000FD694 /* FirebaseAuth */ = {
783+
isa = XCSwiftPackageProductDependency;
784+
package = 8D7951E62D3B034C000FD694 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
785+
productName = FirebaseAuth;
786+
};
787+
8D7951EE2D3B03BA000FD694 /* GoogleSignIn */ = {
788+
isa = XCSwiftPackageProductDependency;
789+
package = 8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */;
790+
productName = GoogleSignIn;
791+
};
792+
/* End XCSwiftPackageProductDependency section */
734793
};
735794
rootObject = EAE4CBB924855E3A00245E92 /* Project object */;
736795
}

authentication/AuthenticationExample.xcodeproj/xcshareddata/xcschemes/AuthenticationExample.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1150"
3+
LastUpgradeVersion = "1610"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

authentication/AuthenticationExample/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import FirebaseCore
1717
import FBSDKCoreKit
1818
import GoogleSignIn
1919

20-
@UIApplicationMain
20+
@main
2121
class AppDelegate: UIResponder, UIApplicationDelegate {
2222
func application(_ application: UIApplication,
2323
didFinishLaunchingWithOptions launchOptions: [UIApplication

authentication/AuthenticationExample/Models/AuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ enum AuthProvider: String {
9797

9898
// MARK: DataSourceProvidable
9999

100-
extension AuthProvider: DataSourceProvidable {
100+
@MainActor extension AuthProvider: DataSourceProvidable {
101101
private static var providers: [AuthProvider] {
102102
[.google, .apple, .twitter, .microsoft, .gitHub, .yahoo, .facebook]
103103
}

authentication/AuthenticationExample/Utility/DataSourceProvider/DataSourceProtocols.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import UIKit
1616

1717
/// Models an object that can be used as an item in a tableview
18-
protocol Itemable {
18+
@MainActor protocol Itemable {
1919
var title: String? { get }
2020
var detailTitle: String? { get }
2121
var image: UIImage? { get set }
@@ -26,26 +26,26 @@ protocol Itemable {
2626
}
2727

2828
/// Models an object that can be used as a section in a tableview
29-
protocol Sectionable {
29+
@MainActor protocol Sectionable {
3030
associatedtype Item: Itemable
3131
var headerDescription: String? { get }
3232
var footerDescription: String? { get }
3333
var items: [Item] { get set }
3434
}
3535

3636
/// Delegate Protocol to handle cell selection and tableview scrolling
37-
protocol DataSourceProviderDelegate: AnyObject {
37+
@MainActor protocol DataSourceProviderDelegate: AnyObject {
3838
func didSelectRowAt(_ indexPath: IndexPath, on tableView: UITableView)
3939
func tableViewDidScroll(_ tableView: UITableView)
4040
}
4141

42-
extension DataSourceProviderDelegate {
42+
@MainActor extension DataSourceProviderDelegate {
4343
/// Provide default implementation to prevent a required implementation when conforming to this protocol
4444
func tableViewDidScroll(_ tableView: UITableView) {}
4545
}
4646

4747
/// Models a type that can be used for the datasource in a DataSourceProvider
48-
protocol DataSourceProvidable {
48+
@MainActor protocol DataSourceProvidable {
4949
associatedtype Section: Sectionable
5050
var sections: [Section] { get }
5151
}

authentication/AuthenticationExample/Utility/Extensions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import FirebaseAuth
1717

1818
// MARK: - Extending a `Firebase User` to conform to `DataSourceProvidable`
1919

20-
extension User: DataSourceProvidable {
20+
@MainActor extension User: DataSourceProvidable {
2121
private var infoSection: Section {
2222
let items = [Item(title: providerID, detailTitle: "Provider ID"),
2323
Item(title: uid, detailTitle: "UUID"),
@@ -163,7 +163,7 @@ extension UIColor {
163163

164164
// MARK: UINavigationBar + UserDisplayable Protocol
165165

166-
protocol UserDisplayable {
166+
@MainActor protocol UserDisplayable {
167167
func addProfilePic(_ imageView: UIImageView)
168168
}
169169

@@ -185,7 +185,7 @@ extension UINavigationBar: UserDisplayable {
185185

186186
// MARK: Extending UITabBarController to work with custom transition animator
187187

188-
extension UITabBarController: UITabBarControllerDelegate {
188+
extension UITabBarController: @retroactive UITabBarControllerDelegate {
189189
public func tabBarController(_ tabBarController: UITabBarController,
190190
animationControllerForTransitionFrom fromVC: UIViewController,
191191
to toVC: UIViewController)

authentication/AuthenticationExample/Utility/LoginDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
import Foundation
1616

1717
/// Delegate for signaling that a successful login with Firebase Auth has occurred
18-
protocol LoginDelegate: NSObject {
18+
@MainActor protocol LoginDelegate: NSObject {
1919
func loginDidOccur()
2020
}

authentication/Podfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)