Skip to content

Commit

Permalink
Merge branch 'master' into @russell/analytics-types
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley authored Jul 6, 2020
2 parents 5851550 + 81200c6 commit 0e31bc5
Show file tree
Hide file tree
Showing 45 changed files with 212 additions and 93 deletions.
30 changes: 0 additions & 30 deletions docs/crashlytics/ios-setup.md

This file was deleted.

3 changes: 1 addition & 2 deletions docs/crashlytics/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ yarn add @react-native-firebase/crashlytics
cd ios/ && pod install
```

Once installed, you must complete the following additional setup steps for both Android & iOS:
Once installed, you must complete the following additional setup steps for Android:

- [Android Additional Setup](/crashlytics/android-setup).
- [iOS Additional Setup](/crashlytics/ios-setup).

If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project,
you can follow the manual installation steps for [iOS](/crashlytics/usage/installation/ios) and [Android](/crashlytics/usage/installation/android).
Expand Down
2 changes: 1 addition & 1 deletion docs/database/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ If your application requires more advanced query capabilities, it is recommended
#### Ordering

By default, results are ordered based on the node [keys](#database-keys). If however you are using custom keys you can use
one of the `orederByX` methods to order your data.
one of the `orderByX` methods to order your data.

For example, if all of the nodes children are scalar values (string, number or boolean) you can use the `orderByValue` method,
and Firebase will automatically order the results. The example below would return the `def` node before the `abc` node:
Expand Down
5 changes: 3 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ buildscript {
}
```

Lastly, execute the plugin by adding the following to the **very bottom** of your `/android/app/build.gradle` file:
Lastly, execute the plugin by adding the following to your `/android/app/build.gradle` file:

```groovy
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services' // <- Add this line
```

### 3. iOS Setup
Expand Down
33 changes: 31 additions & 2 deletions docs/messaging/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ iOS prevents messages containing notification (or 'alert') payloads from being d
This module provides a `requestPermission` method which triggers a native permission dialog requesting the user's permission:

```js
import messaging, { AuthorizationStatus } from '@react-native-firebase/messaging';
import messaging from '@react-native-firebase/messaging';

async function requestUserPermission() {
const authStatus = await messaging().requestPermission();
const enabled =
authStatus === AuthorizationStatus.AUTHORIZED || authStatus === AuthorizationStatus.PROVISIONAL;
authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
authStatus === messaging.AuthorizationStatus.PROVISIONAL;

if (enabled) {
console.log('Authorization status:', authStatus);
Expand Down Expand Up @@ -207,6 +208,34 @@ admin.messaging().sendToDevice(
);
```

For iOS specific "data-only" messages, the message must include the appropriate APNs headers as well as the `content-available` flag in order to trigger the background handler. For example, if using the Node.js [`firebase-admin`](https://www.npmjs.com/package/firebase-admin) package to send a "data-only" message to an iOS device:

```js
admin.messaging().send({
data: {
//some data
},
apns: {
payload: {
aps: {
contentAvailable: true
}
},
headers: {
'apns-push-type': 'background',
'apns-priority': '5',
'apns-topic': '' // your app bundle identifier
}
},
//must include token, topic, or condition
//token: //device token
//topic: //notification topic
//condition: //notification condition
});
```

View the [Sending Notification Requests to APNs](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/) documentation to learn more about APNs headers.

These options can be applied to all FCM messages. View the [Server Integration](/messaging/server-integration) documentation
to learn more about other available SDKs.

Expand Down
4 changes: 4 additions & 0 deletions packages/admob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [7.2.4](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/admob

## [7.2.3](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/admob
Expand Down
4 changes: 2 additions & 2 deletions packages/admob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/admob",
"version": "7.2.3",
"version": "7.2.4",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Google AdMob is an easy way to monetize mobile apps with targeted, in-app advertising.",
"main": "lib/index.js",
Expand All @@ -27,7 +27,7 @@
"ad consent"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 4 additions & 0 deletions packages/analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [7.1.8](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/analytics

## [7.1.7](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/analytics
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/analytics",
"version": "7.1.7",
"version": "7.1.8",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - The analytics module provides out of the box support with Google Analytics for Firebase. Integration with the Android & iOS allows for in-depth analytical insight reporting, such as device information, location, user actions and more.",
"main": "lib/index.js",
Expand All @@ -22,7 +22,7 @@
"analytics"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 6 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.0.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

### Bug Fixes

- correct androidResolutionForPlayServices API ([afcd794](https://github.com/invertase/react-native-firebase/commit/afcd79479baf6e371719eb1b14e5d7619e4b7ad6)), closes [#3864](https://github.com/invertase/react-native-firebase/issues/3864)

# [8.0.0](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

- feat(crashlytics)!: upgrade to new Firebase Crashlytics SDK (#3580) ([cad58e1](https://github.com/invertase/react-native-firebase/commit/cad58e178b43dea461e17fa4a0a3fecd507ba68a)), closes [#3580](https://github.com/invertase/react-native-firebase/issues/3580)
Expand Down
2 changes: 1 addition & 1 deletion packages/app/lib/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class FirebaseUtilsModule extends FirebaseModule {
if (isIOS) {
return Promise.resolve();
}
return this.native.androidGetPlayServicesStatus();
return this.native.androidResolutionForPlayServices();
}

logInfo(...args) {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/app",
"version": "8.0.0",
"version": "8.0.1",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Storage and more.",
"main": "lib/index.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/auth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.0.10](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/auth

## [8.0.9](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/auth
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/auth",
"version": "8.0.9",
"version": "8.0.10",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications. React Native Firebase provides access to all Firebase authentication methods and identity providers.",
"main": "lib/index.js",
Expand All @@ -22,7 +22,7 @@
"auth"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 8 additions & 0 deletions packages/crashlytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.0.3](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/crashlytics

## [8.0.2](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/crashlytics

## [8.0.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/crashlytics
Expand Down
4 changes: 2 additions & 2 deletions packages/crashlytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/crashlytics",
"version": "8.0.1",
"version": "8.0.3",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. React Native Firebase provides automatic crash reporting for both native and JavaScript errors, including unhandled promise rejections.",
"main": "lib/index.js",
Expand All @@ -27,7 +27,7 @@
"crashlytics"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"dependencies": {
"stacktrace-js": "^2.0.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/database/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [7.2.7](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/database

## [7.2.6](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/database
Expand Down
4 changes: 2 additions & 2 deletions packages/database/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/database",
"version": "7.2.6",
"version": "7.2.7",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. React Native Firebase provides native integration with the Android & iOS Firebase SDKs, supporting both realtime data sync and offline capabilities.",
"main": "lib/index.js",
Expand All @@ -25,7 +25,7 @@
"realtome database"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
10 changes: 10 additions & 0 deletions packages/dynamic-links/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [7.2.4](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/dynamic-links

## [7.2.3](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

### Bug Fixes

- **dynamic-links,ios:** resolveLink() does not always resolve ([#3870](https://github.com/invertase/react-native-firebase/issues/3870)) ([f10658e](https://github.com/invertase/react-native-firebase/commit/f10658e11aaae9a5b1b2566c05a0a62c46a00522))

## [7.2.2](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/dynamic-links
Expand Down
11 changes: 11 additions & 0 deletions packages/dynamic-links/e2e/dynamicLinks.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const TEST_LINK =
'https://reactnativefirebase.page.link/?link=https://rnfirebase.io&apn=com.invertase.testing';
const TEST_LINK2 =
'https://reactnativefirebase.page.link/?link=https://invertase.io/hire-us&apn=com.invertase.testing';
const TEST_LINK3 = 'https://invertase.io';

module.exports.baseParams = baseParams;

Expand Down Expand Up @@ -127,6 +128,16 @@ describe('dynamicLinks()', () => {
}
});

it('throws on static links', async () => {
try {
await firebase.dynamicLinks().resolveLink(TEST_LINK3);
return Promise.reject(new Error('Did not throw Error.'));
} catch (e) {
e.message.should.containEql('Dynamic link not found');
return Promise.resolve();
}
});

it('throws on invalid links', async () => {
try {
await firebase.dynamicLinks().resolveLink(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,16 @@ - (id)init {
@"message":[error localizedDescription]
}];
}
};
};

NSURL *linkURL = [NSURL URLWithString:link];
[[FIRDynamicLinks dynamicLinks] handleUniversalLink:linkURL completion:completion];
BOOL success = [[FIRDynamicLinks dynamicLinks] handleUniversalLink:linkURL completion:completion];
if (!success) {
[RNFBSharedUtils rejectPromiseWithUserInfo:reject userInfo:(NSMutableDictionary *) @{
@"code": @"not-found",
@"message": @"Dynamic link not found"
}];
}
}

- (FIRDynamicLinkComponents *)createDynamicLinkComponents:(NSDictionary *)dynamicLinkDict {
Expand Down
4 changes: 2 additions & 2 deletions packages/dynamic-links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/dynamic-links",
"version": "7.2.2",
"version": "7.2.4",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Dynamic Links",
"main": "lib/index.js",
Expand All @@ -23,7 +23,7 @@
"dynamic link"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 4 additions & 0 deletions packages/firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [7.2.4](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-07-05)

**Note:** Version bump only for package @react-native-firebase/firestore

## [7.2.3](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/[email protected]...@react-native-firebase/[email protected]) (2020-06-30)

**Note:** Version bump only for package @react-native-firebase/firestore
Expand Down
4 changes: 2 additions & 2 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/firestore",
"version": "7.2.3",
"version": "7.2.4",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs performance and offline capabilities.",
"main": "lib/index.js",
Expand All @@ -27,7 +27,7 @@
"firestore"
],
"peerDependencies": {
"@react-native-firebase/app": "8.0.0"
"@react-native-firebase/app": "8.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 0e31bc5

Please sign in to comment.