Skip to content

Commit 1a95fa8

Browse files
committed
package number updates
1 parent 6de9429 commit 1a95fa8

File tree

2 files changed

+44
-44
lines changed

2 files changed

+44
-44
lines changed

README.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# react-native-quick-firebase
22

3-
![](https://img.shields.io/badge/Stable-v1.1.1-green.svg?style=flat)
4-
![](https://img.shields.io/badge/RN-v0.59.x+-orange.svg?style=flat)
3+
![](https://img.shields.io/badge/Stable-v1.1.4-green.svg?style=flat)
4+
![](https://img.shields.io/badge/RN-v0.65.x+-orange.svg?style=flat)
55

66
Firebase simple integration with phone auth and analytics only.
77

88
Implementation in React Native project
99

1010
Please add this entries as follow -
1111

12-
- _iOS_ ( In Podfile)
12+
- _iOS_ ( In Podfile)
1313

1414
```
1515
pod 'RNQuickFirebase', :path => PROJECT_PATH + 'react-native-quick-firebase/ios'
1616
pod 'Firebase/Auth'
1717
pod 'FirebaseAnalytics'
1818
```
1919

20-
- _Android_
20+
- _Android_
2121

2222
android/settings.gradle
2323

@@ -59,50 +59,50 @@ public class MainApplication extends Application implements ReactApplication {
5959
// Copyright © 2017-Present, Gaurav D. Sharma
6060
// All rights reserved.
6161
//
62-
'use strict';
62+
'use strict'
6363

64-
import React, { Component } from 'react';
65-
import { AppRegistry, Text, TouchableOpacity, View } from 'react-native';
66-
import RNQuickFirebase from 'react-native-quick-firebase';
64+
import React, { Component } from 'react'
65+
import { AppRegistry, Text, TouchableOpacity, View } from 'react-native'
66+
import RNQuickFirebase from 'react-native-quick-firebase'
6767

6868
class App extends Component {
69-
componentDidMount() {
70-
RNQuickFirebase.setAnalyticsEnabled(true);
71-
}
72-
73-
onSendOTP = async () => {
74-
RNQuickFirebase.logEvent('otp_button_click', null);
75-
let params = null;
76-
try {
77-
const phoneNumber = '+919876543210';
78-
await RNQuickFirebase.sendOTP(phoneNumber);
79-
console.warn('otp sent to: ' + phoneNumber);
80-
const sessionToken = await RNQuickFirebase.validateOTP('123456');
81-
console.warn('OTP validated successfully with sessionToken: ' + sessionToken);
82-
params = { otp_validate_event: 'otp_success' };
83-
RNQuickFirebase.logEvent('otp_send_validate', params);
84-
/// send this token to server to cross validate
85-
RNQuickFirebase.signOut();
86-
console.warn('User Logout from the Firebase');
87-
} catch (e) {
88-
console.warn(e);
89-
params = { ['otp_send_event']: 'otp_failed' };
90-
RNQuickFirebase.logEvent('otp_send_validate', null);
91-
}
92-
};
93-
94-
render() {
95-
return (
96-
<View style={{ flex: 1, backgroundColor: 'white', justifyContent: 'center', alignItems: 'center' }}>
97-
<TouchableOpacity onPress={this.onSendOTP}>
98-
<Text>Check RNQuickFirebase App</Text>
99-
</TouchableOpacity>
100-
</View>
101-
);
102-
}
69+
componentDidMount() {
70+
RNQuickFirebase.setAnalyticsEnabled(true)
71+
}
72+
73+
onSendOTP = async () => {
74+
RNQuickFirebase.logEvent('otp_button_click', null)
75+
let params = null
76+
try {
77+
const phoneNumber = '+919876543210'
78+
await RNQuickFirebase.sendOTP(phoneNumber)
79+
console.warn('otp sent to: ' + phoneNumber)
80+
const sessionToken = await RNQuickFirebase.validateOTP('123456')
81+
console.warn('OTP validated successfully with sessionToken: ' + sessionToken)
82+
params = { otp_validate_event: 'otp_success' }
83+
RNQuickFirebase.logEvent('otp_send_validate', params)
84+
/// send this token to server to cross validate
85+
RNQuickFirebase.signOut()
86+
console.warn('User Logout from the Firebase')
87+
} catch (e) {
88+
console.warn(e)
89+
params = { ['otp_send_event']: 'otp_failed' }
90+
RNQuickFirebase.logEvent('otp_send_validate', null)
91+
}
92+
}
93+
94+
render() {
95+
return (
96+
<View style={{ flex: 1, backgroundColor: 'white', justifyContent: 'center', alignItems: 'center' }}>
97+
<TouchableOpacity onPress={this.onSendOTP}>
98+
<Text>Check RNQuickFirebase App</Text>
99+
</TouchableOpacity>
100+
</View>
101+
)
102+
}
103103
}
104104

105-
AppRegistry.registerComponent('firebaseDemo', () => App);
105+
AppRegistry.registerComponent('firebaseDemo', () => App)
106106
```
107107

108108
Voila! Happy Coding! 😍

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-quick-firebase",
3-
"version": "1.1.2",
3+
"version": "1.1.4",
44
"author": "Gaurav D. Sharma <[email protected]>",
55
"description": "Quick firebase integration with phone auth and analytics",
66
"homepage": "https://github.com/dayitv89/react-native-quick-firebase",

0 commit comments

Comments
 (0)