Commit Graph
18 Commits
Author SHA1 Message Date
Maksym Malyhin 76b47085c9 FIS: Use IID auth token to authorize IID migration. (#4224)
* `FIRInstallationsIIDTokenStore` introduced. `FIRInstallationsIIDCheckinStore` removed.

* FIRInstallationsIIDTokenStoreTests

* Run ./scripts/style.sh

* FIRInstallationsIIDTokenStore implementation.

* ./scripts/style.sh

* Fix tvOS and macOS availability.

* Rename IIDAuthToken -> IIDDefaultToken

* FIRInstallationsIIDTokenStoreTests: fix flaky IID token removal

* ./scripts/style.sh
2019-11-04 11:45:17 -05:00
ChaoqunCHEN a507b40f17 Add bundle id http header to FIS requests (#4194)
* Add bundle id http header to FIS requests

* Add bundle id http header to FIS requests
2019-10-31 08:50:07 -07:00
Maksym Malyhin 48a2a9e0fe Keychain: use kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly instead of deprecated since iOS 13 kSecAttrAccessibleAlwaysThisDeviceOnly. (#4169) 2019-10-25 17:14:02 -04:00
Maksym Malyhin a34540f9cb FIS: race condition (#4148)
* FIRInstallationsSingleOperationPromiseCache: a failing test for race condition added.

* ./scripts/style.sh

* FIRInstallationsSingleOperationPromiseCache: synchronize entire code blocks not relying on `atomic` property. The atomic property synchronization was insufficient to synchronize `newOperationHandler()`.

* ./scripts/style.sh
2019-10-23 20:32:23 -04:00
Maksym Malyhin af6f4e512b FIS: Make sure refreshed auth token is stored to the storage. (#4146)
* FIRInstallationsIDControllerTests: test refreshed token is stored.

* FIRInstallationsIDControllerTests: all required tests updated to expect refreshed token to be stored.

* Tests: assert all FBLWaitForPromisesWithTimeout

* FIRInstallationsIDController: saving refreshed token implemented.

* FIRInstallationsIDController: duplicated code removed.
2019-10-23 14:22:28 -04:00
Maksym Malyhin 65ec051abd FIS: Complex unrecoverable error handling reverted and replaced by a simple log message. (#4120)
* Revert "FIS: stored registration error timeout (#4032)"

This reverts commit 37747dbb3d.

* Revert "FirebaseInstallations: CreateInstallation API request error handling (#4024)"

This reverts commit 27384c0a2c.

* Complex unrecoverable error handling reverted and replaced by a simple log message.
2019-10-21 09:37:57 -04:00
Maksym Malyhin 8c1168d188 FirebaseInstallation: send IID checkin data on IID migration. (#4114)
* FIRInstallationsIIDCheckinStore with tests introduced.

* FIRInstallationsIIDCheckinStore implementation and tests.

* Store IID checkin data.

* FIRInstallationsIDControllerTests: IID checkin migration tests.

* FIRInstallationsIDController: IID checkin migration logic.

* style.sh

* FIRInstallationsAPIServiceTests: IID migration header test.

* FIRInstallationsAPIService: send IID checkin data in CreateInstallation API request.

* FIRInstallationsIIDCheckinStoreTests: fix FIRInstanceIDCheckinStore subDirectoryName.

* FIRInstallationsIIDCheckinStoreTests: fix missing sub directory.

* Disable FIRInstallationsIntegrationTests for macOS.

* FIRInstallationsIntegrationTests: properly disable all tests on macOS.

* Fix.
2019-10-18 16:21:38 -04:00
Maksym Malyhin 2a43d214f1 FirebaseInstallations: re-generate Installation on HTTP 401 and 404 (#4079)
* WIP: FID re-generating introduced.

* WIP: FID regenerating tests.

* FIS regenerate: tests and fixes.

* Cleanup.
2019-10-15 17:37:07 -04:00
Maksym Malyhin 179dff24c8 FIRInstallationsAPIService: Retry API request on HTTP 500. (#4052) 2019-10-11 16:18:17 -04:00
Maksym Malyhin 37747dbb3d FIS: stored registration error timeout (#4032)
* Registration error date introduced. Timeout test added.

* Registration error timeout implemented.

* Test the registration error date is set and stored.
2019-10-10 15:31:56 -04:00
Maksym Malyhin 27384c0a2c FirebaseInstallations: CreateInstallation API request error handling (#4024)
* Unrecoverable errors: basic unit tests defined.

* Registration Error models introduced.

* Storage: storage version handling fix.

* Formatting.

* Get Installation: return registration error from previous attempt.

* Retry registration request on configuration change.

* Store unrecoverable registration error.

* FIRInstallations Swift API improvements.

* Add Swift integration tests

* Revert "Add Swift integration tests"

This reverts commit a8e06418be.

* Invalid config integration tests and fixes.

* Missing tests and cleanup.

* ./scripts/style.sh

* Log messages.

* More elaborative log message. Typo.

* Reorganize imports and umberella header to fix Swift compilation errors.

* Formatting.
2019-10-09 13:47:58 -04:00
Maksym Malyhin 99597f9038 FirebaseInstallations FID generation: don't cut UUID (#3978)
* Generate FID: make sure no UUID data is cut.

* Comments

* Use `UUIDLength` variable instead of numbers.

* Upper case for acronyms.
2019-10-02 16:51:02 -04:00
Maksym Malyhin d29db9ffa8 FIRInstallations: use lazy initialization to prevent too early FID requests. (#3444) 2019-07-29 09:42:32 -04:00
Maksym Malyhin aff8695a12 Firebase Installations: delete IID on default app installation delete. (#3428)
* FIRInstallationsIDControllerTests: test deleting IID.

* FIRInstallationsIDControllerTests: test no IID import for non-default app.

* FIRInstallationsIDController: use and delete IID for default app.
2019-07-24 16:24:20 -04:00
Maksym Malyhin 432a1805c5 Firebase Installations: update API response handling (#3415) 2019-07-24 12:48:23 -04:00
Maksym Malyhin 7566d8d4e3 FirebaseInstallations: debug logging (#3409)
* FIRInstallationsLogger introduced.

* Coders version mismatch logs.

* FIRInstallationsAPIService and FIRInstallationsIDController debug logs.

* FIRInstallationsLogger: specific error codes for messages.
2019-07-22 16:00:32 -04:00
Maksym Malyhin 4a3a4f3405 Firebase Installations - adjustments to import to google3 (#3383)
* Don't use #import <FirebaseCore/FIROptions.h>.

* Don't use #import <FirebaseCore/FirebaseCore.h>

* Umbrella header added.

* Disable integration tests so far.

* Run ./scripts/style.sh

* Typos
2019-07-18 13:36:03 -04:00
Maksym Malyhin 8e73ddb222 Firebase Installations as standalone SDK (#3376) 2019-07-17 20:07:35 -04:00