Skip to content

Commit 8d0af98

Browse files
committed
Updated README
1 parent 9db5b1d commit 8d0af98

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,16 @@ Since `react-native-oauth` depends upon the `RCTLinkingManager` (from react-nati
6262
In your app, add the following line to your `HEADER SEARCH PATHS`:
6363

6464
```
65+
$(SRCROOT)/../node_modules/react-native-oauth/ios/OAuthManager
6566
$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS
6667
```
6768

6869
![](./resources/header-search-paths.png)
6970

7071
Next, navigate to the neighboring "Build Phases" section of project settings, find the "Link Binary with Library" drop down, expand it, and click the "+" to add _libOAuthManager.a_ to the list.
7172

73+
Make sure to Update your `AppDelegate.m` as below, otherwise it will _not_ work.
74+
7275
#### Automatically with [rnpm](https://github.com/rnpm/rnpm)
7376

7477
To automatically link our `react-native-oauth` client to our application, use the `rnpm` tool. [rnpm](https://github.com/rnpm/rnpm) is a React Native package manager which can help to automate the process of linking package environments.

ios/OAuthManager/OAuthClient.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ - (void) reauthenticateWithHandler:(NSString *) providerName
3030
- (void) cancelAuthentication
3131
{
3232
if (_account != nil) {
33-
[_account cancelAuthentication];
33+
@try {
34+
[_account cancelAuthentication];
35+
}
36+
@catch (NSException *exception) {
37+
NSLog(@"An exception occurred while cancelling authentication: %@", [exception reason]);
38+
}
3439
}
3540
}
3641

ios/OAuthManager/OAuthManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ - (NSDictionary *) getConfigForProvider:(NSString *)name
347347
url:callbackUrl
348348
cfg:cfg
349349
onSuccess:^(DCTAuthAccount *account) {
350+
NSLog(@"on success called with account: %@", account);
350351
NSDictionary *accountResponse = [manager getAccountResponse:account cfg:cfg];
351352
_pendingAuthentication = NO;
352353
[manager removePending:client];

0 commit comments

Comments
 (0)