File tree Expand file tree Collapse file tree 4 files changed +31
-2
lines changed
FirebasePhoneAuthUI/Sources
samples/swift/FirebaseUI-demo-swift Expand file tree Collapse file tree 4 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1818
1919NS_ASSUME_NONNULL_BEGIN
2020
21- @interface FUICountryCodeInfo : NSObject
21+ @interface FUICountryCodeInfo : NSObject < NSCopying >
2222
2323@property (nonatomic , copy ) NSString *countryName;
2424@property (nonatomic , copy ) NSString *localizedCountryName;
Original file line number Diff line number Diff line change @@ -57,6 +57,31 @@ - (NSString *)countryFlagEmoji {
5757 length: sizeof (bytes)
5858 encoding: NSUTF32LittleEndianStringEncoding];
5959}
60+
61+ - (id )copyWithZone : (NSZone *_Nullable)zone {
62+ FUICountryCodeInfo *newInfo = [[FUICountryCodeInfo alloc ] init ];
63+ newInfo.countryName = self.countryName ;
64+ newInfo.localizedCountryName = self.localizedCountryName ;
65+ newInfo.countryCode = self.countryCode ;
66+ newInfo.dialCode = self.dialCode ;
67+ newInfo.level = self.level ;
68+ return newInfo;
69+ }
70+
71+ - (BOOL )isEqual : (FUICountryCodeInfo *)object {
72+ if (object == self) {
73+ return YES ;
74+ }
75+ if (![object isKindOfClass: [self class ]]) {
76+ return NO ;
77+ }
78+ return object.countryName == self.countryName &&
79+ object.localizedCountryName == self.localizedCountryName &&
80+ object.countryCode == self.countryCode &&
81+ object.dialCode == self.dialCode &&
82+ object.level == self.level ;
83+ }
84+
6085@end
6186
6287@interface FUICountryCodes ()
Original file line number Diff line number Diff line change 22<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33<plist version =" 1.0" >
44<dict >
5+ <key >FacebookClientToken </key >
6+ <string >aaaaa </string >
57 <key >CFBundleDevelopmentRegion </key >
68 <string >en </string >
79 <key >CFBundleExecutable </key >
Original file line number Diff line number Diff line change @@ -323,7 +323,9 @@ class FUIAuthViewController: UITableViewController {
323323 provider = nil
324324 }
325325 case Providers . Phone. rawValue:
326- provider = FUIPhoneAuth ( authUI: self . authUI!)
326+ let phoneAuth = FUIPhoneAuth ( authUI: self . authUI!)
327+ phoneAuth. defaultCountryCode = " JP "
328+ provider = phoneAuth
327329 default : provider = nil
328330 }
329331
You can’t perform that action at this time.
0 commit comments