forked from opencollective/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["react-native"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"extends": "airbnb", | ||
"parser": "babel-eslint", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"plugins": [ | ||
"flowtype" | ||
], | ||
"env": { | ||
"es6": true, | ||
"jasmine": true | ||
}, | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true | ||
} | ||
}, | ||
"rules": { | ||
"class-methods-use-this": 0, | ||
"no-underscore-dangle": 0, | ||
"no-use-before-define": 0, | ||
"arrow-body-style": 0, | ||
"import/prefer-default-export": 0, | ||
"radix": 0, | ||
"new-cap": 0, | ||
"max-len": 0, | ||
"no-continue": 0, | ||
"no-console": 0, | ||
"global-require": 0, | ||
"import/extensions": 0, | ||
"import/no-unresolved": 0, | ||
"import/no-extraneous-dependencies": 0, | ||
"react/jsx-filename-extension": 0 | ||
}, | ||
"globals": { | ||
"__DEV__": true, | ||
"window": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
[ignore] | ||
|
||
|
||
# Some modules have their own node_modules with overlap | ||
.*/node_modules/node-haste/.* | ||
|
||
|
||
# React Native problems | ||
.*/node_modules/react-native/Libraries/Animated/src/AnimatedInterpolation.js | ||
.*/node_modules/react-native/Libraries/Animated/src/Interpolation.js | ||
.*/node_modules/react-native/Libraries/BugReporting/dumpReactTree.js | ||
.*/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js | ||
.*/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationPagerStyleInterpolater.js | ||
.*/node_modules/react-native/Libraries/Experimental/WindowedListView.js | ||
.*/node_modules/react-native/Libraries/Image/Image.io.js | ||
.*/node_modules/react-native/Libraries/NavigationExperimental/NavigationExperimental.js | ||
.*/node_modules/react-native/Libraries/NavigationExperimental/NavigationHeaderStyleInterpolator.js | ||
.*/node_modules/react-native/Libraries/Network/FormData.js | ||
.*/node_modules/react-native/Libraries/ReactIOS/YellowBox.js | ||
|
||
|
||
|
||
# Ignore react and fbjs where there are overlaps, but don't ignore | ||
# anything that react-native relies on | ||
.*/node_modules/fbjs/lib/Map.js | ||
.*/node_modules/fbjs/lib/ErrorUtils.js | ||
|
||
# Flow has a built-in definition for the 'react' module which we prefer to use | ||
# over the currently-untyped source | ||
.*/node_modules/react/react.js | ||
.*/node_modules/react/lib/React.js | ||
.*/node_modules/react/lib/ReactDOM.js | ||
|
||
.*/__mocks__/.* | ||
.*/__tests__/.* | ||
|
||
.*/commoner/test/source/widget/share.js | ||
|
||
# Ignore commoner tests | ||
.*/node_modules/commoner/test/.* | ||
|
||
# See https://github.com/facebook/flow/issues/442 | ||
.*/react-tools/node_modules/commoner/lib/reader.js | ||
|
||
# Ignore jest | ||
.*/node_modules/jest-cli/.* | ||
|
||
# Ignore Website | ||
.*/website/.* | ||
|
||
# Ignore generators | ||
.*/local-cli/generator.* | ||
|
||
# Ignore BUCK generated folders | ||
.*\.buckd/ | ||
|
||
.*/node_modules/is-my-json-valid/test/.*\.json | ||
.*/node_modules/iconv-lite/encodings/tables/.*\.json | ||
.*/node_modules/y18n/test/.*\.json | ||
.*/node_modules/spdx-license-ids/spdx-license-ids.json | ||
.*/node_modules/spdx-exceptions/index.json | ||
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json | ||
.*/node_modules/resolve/lib/core.json | ||
.*/node_modules/jsonparse/samplejson/.*\.json | ||
.*/node_modules/json5/test/.*\.json | ||
.*/node_modules/ua-parser-js/test/.*\.json | ||
.*/node_modules/builtin-modules/builtin-modules.json | ||
.*/node_modules/binary-extensions/binary-extensions.json | ||
.*/node_modules/url-regex/tlds.json | ||
.*/node_modules/joi/.*\.json | ||
.*/node_modules/isemail/.*\.json | ||
.*/node_modules/tr46/.*\.json | ||
.*/node_modules/protobufjs/src/bower.json | ||
.*/node_modules/grpc/node_modules/protobufjs/src/bower.json | ||
|
||
[include] | ||
node_modules/fbjs/lib | ||
|
||
[libs] | ||
lib/flow.js | ||
node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
node_modules/react-native/flow | ||
node_modules/fbjs/flow/lib | ||
|
||
[options] | ||
module.system=haste | ||
|
||
experimental.strict_type_args=true | ||
unsafe.enable_getters_and_setters=true | ||
|
||
esproposal.class_static_fields=enable | ||
esproposal.class_instance_fields=enable | ||
|
||
munge_underscores=true | ||
|
||
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' | ||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FixMe | ||
|
||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-4]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-4]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
node_modules | ||
npm-debug.log | ||
*.DS_Store | ||
|
||
# Xcode | ||
*.pbxuser | ||
*.mode1v3 | ||
*.mode2v3 | ||
*.perspectivev3 | ||
*.xcuserstate | ||
project.xcworkspace/ | ||
xcuserdata/ | ||
|
||
# Android | ||
|
||
# Built application files | ||
android/*/build/ | ||
|
||
# Crashlytics configuations | ||
android/com_crashlytics_export_strings.xml | ||
|
||
# Local configuration file (sdk path, etc) | ||
android/local.properties | ||
|
||
# Gradle generated files | ||
android/.gradle/ | ||
|
||
# Signing files | ||
android/.signing/ | ||
|
||
# User-specific configurations | ||
android/.idea/gradle.xml | ||
android/.idea/libraries/ | ||
android/.idea/workspace.xml | ||
android/.idea/tasks.xml | ||
android/.idea/.name | ||
android/.idea/compiler.xml | ||
android/.idea/copyright/profiles_settings.xml | ||
android/.idea/encodings.xml | ||
android/.idea/misc.xml | ||
android/.idea/modules.xml | ||
android/.idea/scopes/scope_settings.xml | ||
android/.idea/vcs.xml | ||
android/*.iml | ||
ios/RnFirebase.xcodeproj/xcuserdata | ||
|
||
# OS-specific files | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.dbandroid/gradle | ||
android/gradlew | ||
android/build | ||
android/gradlew.bat | ||
android/gradle/ | ||
.idea | ||
.idea | ||
coverage | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
*.swp | ||
*~ | ||
*.iml | ||
.*.haste_cache.* | ||
.DS_Store | ||
.idea | ||
.babelrc | ||
.eslintrc | ||
npm-debug.log | ||
src/ | ||
examples/ | ||
public/ | ||
scripts/ | ||
test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"ignore_dirs": [ | ||
".git", | ||
"node_modules", | ||
"android/build", | ||
"android/.idea", | ||
"android/.gradle", | ||
"android/gradle", | ||
".idea" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2017 Mike Diarmid <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# React Native Firebase | ||
|
||
RNFirebase makes using the latest [Firebase](http://firebase.com) with React Native straight-forward. | ||
|
||
``` | ||
npm i react-native-firebase --save | ||
``` | ||
|
||
[](https://gitter.im/invertase/react-native-firebase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
[](https://www.npmjs.com/package/react-native-firebase) | ||
[](/LICENSE) | ||
|
||
RNFirebase is a _light-weight_ layer sitting on-top of the native Firebase libraries for both iOS and Android which mirrors the React Native JS api as closely as possible. | ||
|
||
Featuring; authentication, storage, real-time database, presence, analytics, cloud messaging, remote configuration, redux support and more! | ||
|
||
## RNFirebase vs Firebase JS lib | ||
|
||
Although the [Firebase](https://www.npmjs.com/package/firebase) JavaScript library will work with React Native, it is mainly designed for the web. | ||
|
||
The native SDK's are much better for performance compared to the web SDK. The web SDK will run on the same thread as your apps ([JS thread](https://facebook.github.io/react-native/docs/performance.html#javascript-frame-rate)) therefore limiting your JS framerate, potentially affecting things touch events and transitions/animations. | ||
|
||
The native SDK's also contains functionality that the web SDK's do not, for example [Analytics](/docs/api/analytics.md) and [Remote Config](/docs/api/remote-config.md). | ||
|
||
## Example app | ||
|
||
We have a working application example available in at [invertase/firebase-app](https://github.com/invertase/firebase-app). Check it out for more details about how to use firebase with react native. | ||
|
||
## Documentation | ||
|
||
* Installation | ||
* [iOS](docs/installation.ios.md) | ||
* [Android](docs/installation.android.md) | ||
* [Firebase Setup](docs/firebase-setup.md) | ||
* API | ||
* [Authentication](docs/api/authentication.md) | ||
* [Analytics](docs/api/analytics.md) | ||
* [Storage](docs/api/storage.md) | ||
* [Realtime Database](docs/api/database.md) | ||
* [Presence](docs/api/presence.md) | ||
* [ServerValue](docs/api/server-value.md) | ||
* [Cloud Messaging](docs/api/cloud-messaging.md) | ||
* [Remote Config](docs/api/remote-config.md) | ||
* [Events](docs/api/events.md) | ||
* [Redux](docs/redux.md) | ||
|
||
## Contributing | ||
|
||
- TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'json' | ||
|
||
package = JSON.parse(File.read('package.json')) | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "RNFirebase" | ||
s.version = package["version"] | ||
s.summary = package["description"] | ||
s.description = <<-DESC | ||
Wanna integrate firebase into your app using React Native? | ||
DESC | ||
s.homepage = "http://invertase.io" | ||
s.license = package['license'] | ||
s.author = "Mike Diarmid" | ||
s.source = { :git => "https://github.com/invertase/react-native-firebase.git", :tag => "v#{s.version}" } | ||
s.social_media_url = 'http://twitter.com/invertaseio' | ||
s.platform = :ios, "8.0" | ||
s.header_dir = 'ios/RNFirebase' | ||
s.preserve_paths = 'README.md', 'package.json', '*.js' | ||
s.source_files = 'ios/RNFirebase/*.{h,m}' | ||
s.dependency 'React' | ||
s.dependency 'Firebase/Auth' | ||
s.dependency 'Firebase/Core' | ||
s.dependency 'Firebase/Database' | ||
s.dependency 'Firebase/Messaging' | ||
s.dependency 'Firebase/RemoteConfig' | ||
s.dependency 'Firebase/Storage' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* @flow | ||
*/ | ||
import firebase from './lib/firebase'; | ||
export default firebase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* @flow | ||
*/ | ||
import firebase from './lib/firebase'; | ||
export default firebase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Firebase from './firebase'; | ||
export default Firebase; |
Oops, something went wrong.