Skip to content

Commit

Permalink
Merge pull request #25 from Osedea/master
Browse files Browse the repository at this point in the history
Upgraded to latest react-native and react-native-firebase version
  • Loading branch information
stoneman1 authored Jan 19, 2020
2 parents c1c5eab + caac75d commit e9ccee9
Show file tree
Hide file tree
Showing 8 changed files with 689 additions and 283 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[*.{yaml,yml,json}]
indent_size = 2

[COMMIT_EDITMSG]
max_line_length = 0
78 changes: 69 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,84 @@

#### THIS PLUGIN IS STILL IN VERY EARLY STAGE. USE AT OWN RISK.

This plugin adds [react-native-firebase](https://github.com/invertase/react-native-firebase) to your [Ignite](https://github.com/infinitered/ignite) React Native project and configures it so it works out of the box with Ignite projects.

This plugin adds [react-native-firebase](https://github.com/invertase/react-native-firebase)
to your [Ignite](https://github.com/infinitered/ignite) React Native project and
configures it so it works out of the box with Ignite projects.
## Compatibility

This version supports [react-native-firebase](https://github.com/invertase/react-native-firebase) `v6` and therefore is only compatible with [react-native](https://facebook.github.io/react-native) 0.60.0+

## Usage
First go through [initial setup](https://rnfirebase.io/docs/master/installation/initial-setup) and get the GoogleService-Info.plist and google-services.json files ready and in the correct places. After that run:
(if you don't have CocoaPods installed check [installation instructions for CocoaPods](https://guides.cocoapods.org/using/getting-started.html#getting-started))

First get the credentials files from https://console.firebase.google.com/ as stated in:

* Android: https://invertase.io/oss/react-native-firebase/quick-start/android-firebase-credentials
* iOS: https://invertase.io/oss/react-native-firebase/quick-start/ios-firebase-credentials\n

And put them:
* `google-services.json` in `android/app/`
* `GoogleService-Info.plist` in `ios/YourApp/`

❌ DO NOT modify the native files, this plugin will take care of it ⚠️

### Adding Firebase

Then:

```sh
ignite add firebase
```

You can also pass some information directly as CLI paramaters when adding the plugin:

* `--config-files-setup` : Use if you already set the google-services.json and GoogleService-Info.plist in your project
* `--modules` : Firebase modules to install, to select in:
* `AdMob`
* `Analytics`
* `Authentication`
* `Cloud Firestore`
* `Cloud Functions`
* `Cloud Messaging`
* `Cloud Storage`
* `Crashlytics`
* `Dynamic Links`
* `In-app Messaging`
* `Instance ID`
* `ML Kit Natural Language`
* `ML Kit Vision`
* `Performance Monitoring`
* `Realtime Database`
* `Remote Config`

Examples:

```
ignite add firebase --modules=Analytics,"Cloud Functions"
ignite add firebase --modules=all
ignite add firebase --modules=Crashlytics --config-files-setup
```

You can get this information by using:

```sh
ignite add firebase --help
```
$ ignite add firebase
$ cd ios && pod install

### Removing Firebase

```sh
ignite remove firebase
```

This adds `ignite-firebase`.
Same here, you can use CLI parameters to convey some information:

* `--remove-config-files` : Use if you want to remove the google-services.json and GoogleService-Info.plist files
* `--modules` : Firebase modules to remove, see above for more examples

If you want to use FCM for push notifications please check [3.1 and 3.2](http://invertase.io/react-native-firebase/#/installation-ios?id=_31-set-up-certificates)
You can get this information by using:

```sh
ignite remove firebase --help
```

## Contributing

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ignite-firebase",
"description": "An Ignite plugin for react-native-firebase",
"version": "0.0.4",
"version": "1.0.0",
"license": "MIT",
"author": {
"name": "Aleksi Pousar",
Expand All @@ -27,7 +27,8 @@
"nyc": "^10.1.2",
"sinon": "^1.17.7",
"standard": "^8.6.0"
}
},
"dependencies": {}
}


Loading

0 comments on commit e9ccee9

Please sign in to comment.