Commit Graph

2204 Commits

Author SHA1 Message Date
Ryan Grey 363c315d60 Pass notifications (not ios notifications) into IOSNotification 2018-08-15 11:32:23 +01:00
Ryan Grey cfb5f3a304 Ensure notificationId is set before constructing IOSNotification 2018-08-15 11:32:23 +01:00
Ryan Grey 0af7c02955 Move autocompletion into IOSNotification class 2018-08-15 09:10:34 +01:00
Ryan Grey 000a4ec724 Move ios API into IOSNotifications 2018-08-15 09:10:33 +01:00
Ryan Grey 1ad4b8c0dd Make the user handling of completion all or nothing
The user controls this with a `_shouldAutoComplete` property. If true
we'll immediately call the completion handler for them. If false then
control is given to the user and we won't try and auto complete.
2018-08-14 14:33:01 +01:00
Gustavo Brunoro 40b9c4d339 Type declaration of AuthProvider.credential allows null token 2018-08-14 01:03:17 -03:00
Salakar 619cd17516 [messaging][js] re-order deleteToken method 2018-08-14 02:04:30 +01:00
Salakar c6d0470b14 merge 2018-08-14 02:03:39 +01:00
Salakar 2bb91b2c38 [messaging][js] add `deleteToken` support - fixes #1335 2018-08-14 02:02:38 +01:00
Salakar 769b3e742a android dep version changes 2018-08-14 02:00:27 +01:00
Michael Diarmid 433127c4bc
Merge pull request #1348 from bilalsyed001/master
[iOS] Fix getInitialLink to handle unresolved url
2018-08-14 01:53:55 +01:00
Michael Diarmid 23e28e453f
Merge pull request #1398 from invertase/functions-multi-app-regions
[utils][js][android] add `firebase.utils().getPlayServicesStatus(): P…
2018-08-14 01:51:01 +01:00
Salakar f86163460d [utils][js][android] add `firebase.utils().getPlayServicesStatus(): Promise<GoogleApiAvailabilityType | null>` to retrieve the latest play services status. Fixes #1257 2018-08-14 01:49:59 +01:00
Michael Diarmid f83ddb89a6
update version compatibility table 2018-08-14 01:30:58 +01:00
Michael Diarmid 39675fc828
Merge pull request #1395 from invertase/functions-multi-app-regions
[functions][wip] add support for multiple apps, specifying a region & useFunctionsEmulator
2018-08-14 01:22:46 +01:00
Michael Diarmid c44aed7d8a
Merge pull request #1397 from PatronGG/export-auth-credential-type
Exports the AuthCredential type
2018-08-14 01:16:03 +01:00
Salakar d65d9e405c [tests] update tests to use jet package 2018-08-14 01:11:57 +01:00
Salakar a2c56a5be4 [internals][js] remove legacy `options` arg for module constructors and cleanup constructor args 2018-08-14 01:11:14 +01:00
Gustavo Brunoro e41397b904 exports the AuthCredential type 2018-08-13 20:22:25 -03:00
Salakar a2205160d8 [functions][android] add support for multiple firebase apps and specifying a function region 2018-08-13 23:18:08 +01:00
Salakar fbc47c5cf2 [functions][js] add support for multiple firebase apps and specifying a function region 2018-08-13 23:17:53 +01:00
Salakar 7632da1809 [js][internals] internals re-write to generalise `app()`/`ModuleBase` arguments - now uses `customUrlOrRegion` - meaning support for custom functions() regions, custom database() shard urls and custom storage() bucket urls internally use the same logic 2018-08-13 23:06:15 +01:00
Ryan Grey 89f7698e5f Merge branch 'master' into background-notification-fix-ios 2018-08-13 08:28:37 +01:00
Ryan Grey 6a69ae66b1 Auto complete early when no user listeners.
This is to clear up memory on the objective-c side without needing to
signal the start/stop of user listeners.
2018-08-10 17:13:02 +01:00
Ryan Grey a8b4435abf Update ts types 2018-08-10 10:16:07 +01:00
Michael Diarmid 098edb35b5
Merge pull request #845 from ajcrites/type-modules
Improving type definitions to better match firebase-js-sdk
2018-08-09 17:16:57 +01:00
Andrew Crites 68ea9120ca
[types]: Export config property from firebase 2018-08-09 11:30:52 -04:00
Andrew Crites 1d56ddda6d
[types]: Rename FireStore to Firestore. Remove deleted crash export 2018-08-09 11:27:48 -04:00
Andrew Crites 12af6f39f3
[types]: adding module for config 2018-08-09 11:19:59 -04:00
Andrew Crites 1d91cad542
[types]: Format typings and export new additions 2018-08-09 11:19:41 -04:00
Andrew Crites c61f860d67
[types]: Completing TypeScript module definitions 2018-08-09 11:19:01 -04:00
Andrew Crites 317bc6be18
[types]: TypeScript modules for easier import
* database

* storage
2018-08-09 11:18:09 -04:00
Andrew Crites adba9467e7
[module] Export module functions directly 2018-08-09 11:14:46 -04:00
Ryan Grey ab42108234 Add auto call to done which awaits the listener before doing so
The idea is to catch any cases where the API user is not calling done manually.
This has the issue that we've modified pre-existing function to take a
Promisified callback instead of just a callback. Any user upgrading to a
version that contains this that does not read the upgrade guide and make
appropriate changes will:
- be passing a plain callback (not promisified)
- not be calling done
- may be performing async (something that triggers a later callback) in their
onNotificationDisplayed handler.

This all means that we will be auto calling `done` prior to them performing
any background work. This is exactly how things worked prior to these changes
so perhaps the user is no worse off.
2018-08-08 11:09:02 +01:00
Ryan Grey 0291605934 Protect against multiple calls to start/stop handling native methods 2018-08-06 15:22:15 +01:00
Ryan Grey b53695ad52 Add RCTConverter+UIBackgroundFetchResult to handle auto conversion 2018-08-06 13:05:16 +01:00
Ryan Grey 5168f96a32 Only store completionHandlers on iOS native side when user adds listener
Note the following cases. This commit is catering for case 3:
1. User is listening for onNotificationDisplayed and is manually calling
the completionHandler
- manually called completionHandler is removed
- automatically called completionHandler is guarded against on iOS
native side

2. User is listening for onNotificationDisplayed and is not calling the
completionHandler:
- automatically called completionHandler is removed

3. User is not listening for onNotificationDisplayed
- On rn side we can only automatically call completionHandler if the
user _is_ listening. This means we need to detect if the user is
listening or not.
2018-08-06 13:04:44 +01:00
Ryan Grey 0d14a5e3b3 add notificationId to logging 2018-08-06 12:59:43 +01:00
Ryan Grey fac0767d5d pass noop for android platform 2018-08-06 12:59:43 +01:00
Ryan Grey b6885b0125 inject onNotificationDisplayed with completion handler 2018-08-06 12:59:43 +01:00
Ryan Grey e6cd793f91 Add exported native function to complete handling of ios notification 2018-08-06 12:59:40 +01:00
Salakar 3e052a7e85 [tests] update to detox 8.1.1 2018-08-06 03:37:28 +01:00
Salakar 42e18c8f52 update build script 2018-08-05 04:08:59 +01:00
Michael Diarmid 19b97cdd8e
Update README.md 2018-08-05 03:22:48 +01:00
Michael Diarmid d1db5929c8
Update README.md 2018-08-05 03:21:52 +01:00
Salakar 7d9be1efff removed codorial from project to invertase/tutorials 2018-08-05 02:47:52 +01:00
Salakar 85321b5246 restructure source + fix linting issues from new eslint version 2018-08-05 02:32:50 +01:00
Salakar 94738ef4a6 upgrade project to support React Native ^0.56.0 2018-08-05 02:23:09 +01:00
Salakar 2cce623612 remove old tests app - no longer in use / migrated to bridge 2018-08-05 02:20:26 +01:00
Salakar c42534da2d [tests] update test app to RN ^0.56.0 2018-08-05 02:19:32 +01:00