Skip to content

Commit e2c30de

Browse files
committed
Merge branch 'master' into v0.6.2
* master: Fixing typo in Readme use xcpretty to get around travis log file size limit fix objc sample codes Revert "V0.6.2" add twitter import in objc sample code fix the broken link update code syntax for 0.6.1 framework
2 parents 1a64d15 + 5268693 commit e2c30de

File tree

5 files changed

+36
-24
lines changed

5 files changed

+36
-24
lines changed

FirebaseAuthUI/FIRAuthUI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ typedef void (^FIRAuthUIResultCallback)(FIRUser *_Nullable user, NSError *_Nulla
145145
/** @fn init
146146
@brief Please use @c FIRAuthUI.authUIWithAuth to get a @c FIRAuthUI instance.
147147
*/
148-
- (instancetype)init NS_UNAVAILABLE;
148+
- (nullable instancetype)init NS_UNAVAILABLE;
149149

150150
/** @fn handleOpenURL:
151151
@brief Should be called from your @c UIApplicationDelegate in

FirebaseAuthUI/FIRAuthUIBaseViewController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ typedef void (^FIRAuthUIAlertActionHandler)(void);
4545
/** @fn init
4646
@brief Please use @c initWithNibName:bundle:authUI:.
4747
*/
48-
- (instancetype)init NS_UNAVAILABLE;
48+
- (nullable instancetype)init NS_UNAVAILABLE;
4949

5050
/** @fn initWithStyle:
5151
@brief Please use @c initWithNibName:bundle:authUI:.

FirebaseAuthUI/FIRAuthUIBaseViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ @interface FIRAuthUIAlertViewDelegate : NSObject <UIAlertViewDelegate>
6060
/** @fn init
6161
@brief Please use initWithCancelHandler:otherHandlers.
6262
*/
63-
- (instancetype)init NS_UNAVAILABLE;
63+
- (nullable instancetype)init NS_UNAVAILABLE;
6464

6565
/** @fn initWithCancelHandler:otherHandlers:
6666
@brief Designated initializer.

FirebaseAuthUI/README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FirebaseUI can be easily customized to fit in with the rest of your app's visual
1818
experience you want.
1919

2020
Compatible FirebaseUI clients are also available for [Android](https://github.com/firebase/firebaseui-android/tree/master/auth)
21-
and [Web](https://github.com/firebase/firebaseui-web/tree/master/auth).
21+
and [Web](https://github.com/firebase/firebaseui-web/).
2222

2323
## Table of Contents
2424

@@ -59,7 +59,8 @@ import FirebaseAuthUI
5959
/* ... */
6060

6161
FIRApp.configure()
62-
let authUI = FIRAuthUI.defaultAuthUI()
62+
let authUI = FIRAuthUI.default()
63+
// You need to adopt a FIRAuthUIDelegate protocol to receive callback
6364
authUI?.delegate = self
6465
```
6566

@@ -70,7 +71,8 @@ authUI?.delegate = self
7071
...
7172
[FIRApp configure];
7273
FIRAuthUI *authUI = [FIRAuthUI defaultAuthUI];
73-
authUI.delegate = self; // Set the delegate to receive callback.
74+
// You need to adopt a FIRAuthUIDelegate protocol to receive callback
75+
authUI.delegate = self;
7476
```
7577

7678
This instance can then be configured with the providers you wish to support:
@@ -79,23 +81,28 @@ This instance can then be configured with the providers you wish to support:
7981
// swift
8082
import FirebaseGoogleAuthUI
8183
import FirebaseFacebookAuthUI
82-
83-
let googleAuthUI = FIRGoogleAuthUI(clientID: kGoogleClientID)
84-
let facebookAuthUI = FIRFacebookAuthUI(appID: kFacebookAppID)
85-
86-
authUI?.providers = [googleAuthUI, facebookAuthUI]
84+
import FirebaseTwitterAuthUI
85+
86+
let providers: [FIRAuthProviderUI] = [
87+
FIRGoogleAuthUI(),
88+
FIRFacebookAuthUI(),
89+
FIRTwitterAuthUI(),
90+
]
91+
self.authUI?.providers = providers
8792
```
8893

8994
```objective-c
9095
// objc
9196
@import FirebaseGoogleAuthUI
9297
@import FirebaseFacebookAuthUI
98+
@import FIRTwitterAuthUI
9399
...
94-
FIRGoogleAuthUI *googleAuthUI =
95-
[[FIRGoogleAuthUI alloc] initWithClientID:kGoogleClientID];
96-
FIRFacebookAuthUI *facebookAuthUI =
97-
[[FIRFacebookAuthUI alloc] initWithAppID:kFacebookAppID];
98-
authUI.signInProviders = @[ googleAuthUI, facebookAuthUI];
100+
NSArray<id<FIRAuthProviderUI>> *providers = @[
101+
[[FIRGoogleAuthUI alloc] init],
102+
[[FIRFacebookAuthUI alloc] init],
103+
[[FIRTwitterAuthUI alloc] init],
104+
];
105+
_authUI.providers = providers;
99106
```
100107

101108
For Google sign in support, add custom URL schemes to your Xcode project
@@ -110,9 +117,13 @@ Google/Facebook authentication process.
110117

111118
```swift
112119
// swift
113-
func application(app: UIApplication, openURL url: NSURL, options: [String: AnyObject]) -> Bool {
114-
let sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String
115-
return FIRAuthUI.defaultAuthUI()?.handleOpenURL(url, sourceApplication: sourceApplication ?? "") ?? false
120+
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool {
121+
let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String?
122+
if FIRAuthUI.default()?.handleOpen(url, sourceApplication: sourceApplication) ?? false {
123+
return true
124+
}
125+
// other URL handling goes here.
126+
return false
116127
}
117128
```
118129

@@ -138,7 +149,7 @@ present the `authViewController` obtain as instance as follows:
138149
// Present the auth view controller and then implement the sign in callback.
139150
let authViewController = authUI!.authViewController()
140151

141-
func authUI(authUI: FIRAuthUI, didSignInWithUser user: FIRUser?, error: ErrorType?) {
152+
func authUI(_ authUI: FIRAuthUI, didSignInWithUser user: FIRUser?, error: Error?) {
142153
// handle user and error as necessary
143154
}
144155
```
@@ -162,7 +173,8 @@ email/password account creation screen, can be specified as follows:
162173

163174
```swift
164175
// swift
165-
authUI?.TOSURL = NSURL(string: "https://example.com/tos")!
176+
let kFirebaseTermsOfService = URL(string: "https://firebase.google.com/terms/")!
177+
authUI?.tosurl = kFirebaseTermsOfService
166178
```
167179

168180
```objective-c
@@ -187,7 +199,7 @@ authUI?.customStringsBundle = NSBundle.mainBundle() // Or any custom bundle.
187199
authUI.customStringsBundle = [NSBundle mainBundle]; // Or any custom bundle.
188200
```
189201

190-
The bundle should include [.strings](Auth/AuthUI/Strings/en.lproj/FirebaseAuthUI.strings)
202+
The bundle should include [.strings](https://github.com/firebase/FirebaseUI-iOS/blob/master/FirebaseAuthUI/Strings/en.lproj/FirebaseAuthUI.strings)
191203
files that have the same names as the default files, namely `FirebaseAuthUI`,
192204
`FirebaseGoogleAuthUI`, and `FirebaseFacebookAuthUI`. Each string in these files
193205
should have the same key as its counterpart in the default `.strings` files.
@@ -204,7 +216,7 @@ subclass by implementing the delegate method
204216

205217
```swift
206218
// swift
207-
func authPickerViewControllerForAuthUI(authUI: FIRAuthUI) -> FIRAuthPickerViewController {
219+
func authPickerViewController(for authUI: FIRAuthUI) -> FIRAuthPickerViewController {
208220
return CustomAuthPickerViewController(authUI: authUI)
209221
}
210222
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pod 'FirebaseUI/Facebook', '~> 0.6'
3434
pod 'FirebaseUI/Google', '~> 0.6'
3535

3636
# Only pull in Twitter login features
37-
pod 'FirebaseUI/Google', '~> 0.6'
37+
pod 'FirebaseUI/Twitter', '~> 0.6'
3838
```
3939

4040
If you're including FirebaseUI in a Swift project, make sure you also have:

0 commit comments

Comments
 (0)