31 Commits
Author SHA1 Message Date
Nick Cooke 6b6498ce2a [Heartbeat Logging] Migrate Installations from using FIRHeartbeatInfo to FIRHeartbeatLogger (#9543)
* Integrate FIS with FIRHeartbeatLogger

* Add env var to fis workflow

* Fix env var to fis workflow

* Add integration tests for heartbeat integration

* [skip ci] Review

* [skip ci] Review
2022-04-01 10:01:02 -04:00
Nick Cooke a09083f9d0 [v9] Reorganize FirebaseCore* modules (#9482)
* [skip ci] [will revert] Add debug printing to `pod_lib_lint.rb`

* Reorganize FirebaseCore libraries for SPM and CP

* [skip ci] Revert "[skip ci] [will revert] Add debug printing to `pod_lib_lint.rb`"

This reverts commit 2a837e39708c21b0a324743ab226bd6c01047de7.

* Review and fix CI

* Remove `heartbeat_logging.yml` and add `core_internal.yml`

* Remove trailing whitespace

* Fix more whitespace 😞

* Fix `core_internal.yml` scheme name

* Update `check_imports.swift` and TODO

* Review

* Add FirebaseCoreInternal pod to Firestore example's Podfile

* [skip ci] Review - remove TODOs

* [skip ci] Remove duplicate `XCTest` import
2022-03-23 06:08:14 -07:00
Paul Beusterien 4f793064da Set up Core Internal for SPM (#9298) 2022-03-23 06:07:17 -07:00
Maksym Malyhin a3a59c1bfc FIS: require projectID and valid API Key format (#6678)
* FIRInstallations validation: remove GCMSenderID fallback for missing projectID

* FIRInstallationsIDController: remove GCMSenderID fallback for  missing projectID

* Add API Key validation

* Changelog

* changelog

* Constant for API key lenght

* array] -> alloc] init]

* typo

* message

* ./scripts/style.sh

* Fix dummy API key in integration tests

* Update dummy API Keys to match the expected format

* debug test quickstart with no xcpretty

* fix debug

* Use debug QS repo branch

* print debug

* Add missing allowed characters `-`, `_`

* Nicer dummy API Keys

* Comment

* Revert "Use debug QS repo branch"

This reverts commit 69739dd6ae.

* Revert "fix debug"

This reverts commit 84fcbc7543.

* Revert "debug test quickstart with no xcpretty"

This reverts commit 1fa21ed62a.
2020-10-07 17:25:03 -04:00
Maksym Malyhin f84d094f06 FIS: don't log anything on success validation (#6635) (#6636) 2020-10-01 15:07:21 -04:00
Paul Beusterien 5d0a1c8ccb Merge remote-tracking branch 'origin/firebase7-main' into pb-merge-firebase7 2020-09-30 14:23:40 -07:00
Maksym Malyhin d26b543572 FIS: Additional FIRInstallationsItem validation (#6570)
* FIS API tests for no FID in response

* FIRInstallationsIDControllerTests: test names

* FIRInstallationsIDControllerTests: corrupted storage tests

* FIRInstallationsItem validation

* Fix FIRInstallationsItem.IIDDefaultToken copy

* Improve error description.

* FIRInstallationsItem validation error

* FIRInstallationsItem validation tests

* ./scripts/style.sh

* FIRInstallationsIDController: validate stored installation

* FIRInstallationsAPIService installation validation

* Changelog
2020-09-30 14:02:03 -04:00
Paul Beusterien f2bcd5d82b Make all GoogleUtilities APIs public (#6588) 2020-09-29 07:26:10 -07:00
Maksym Malyhin 7895478eba FirebaseInstallations: API requests backoff (#6232)
* FirebaseInstallations: API requests backoff (#6207)

* FIRInstallationsBackoffController introduced

* FIRCurrentDateProvider introduced

* FIRInstallationsBackoffControllerTests

* style

* FIRInstallationsBackoffController implementation

* WIP: tests

* Response to backoff event mapping

* FIRInstallationsIDController: integration with FIRInstallationsBackoffController

* Remove not existing error code.

* FIRInstallationsIDController: integration with FIRInstallationsBackoffController

* FIRInstallationsIDController: depend on FIRInstallationsBackoffControllerProtocol

* FIRInstallationsIDControllerTests: supplement tests with backoff validation

* TODOs

* TODO

* API docs

* Header import fixed

* FIS backoff adjustments and tests (#6230)

* Maximum backoff interval 30 min

* Errors adjusted

* Tests updated

* Exclude 401 and 404 from backoff as autorecoverable

* comments

* FIS 1.6.0 changelog (#6234)

* Change log version fixed
2020-08-10 09:36:04 -04:00
Paul Beusterien c07c89ee75 Repo-relative imports for Installations (#5832) 2020-06-17 07:26:40 -07:00
Paul Beusterien 3f556ddb9e Update GoogleUtilities' clients with repo-relative imports (#5824) 2020-06-16 09:05:29 -07:00
Paul Beusterien d4621a636f Use preserve_paths instead of CocoaPods private (#5758) 2020-06-09 05:21:28 -07:00
Maksym Malyhin e5a1360e2c FIS - make server error logs more readable (#5654)
* FIS - make server error logs more readable

* Changelog
2020-05-20 12:48:16 -04:00
Maksym Malyhin de3b856cf2 Mac OS FIS: use Firebase App ID as a suffix to Keychain service name Mac OS (#5603)
* FIS: use bundle ID as a prefix to Keychain service name on Mac OS

* Remove "storage" from var name

* Run ./scripts/style.sh

* Use Firebase App ID as a suffix to Keychain service name on Mac OS
2020-05-15 08:55:43 -04:00
Maksym Malyhin 7bd8faaaa4 Move FIRSecureStorage to GoogleUtilities (#5329)
* FIRSecureStorage -> GULKeychainStorage: renamed and moved to GoogleUtilities

* FIS updated to GULKeychainStorage

* Run ./scripts/style.sh

* Headers order

* GULKeychainUtils API docs

* GULKeychainStorage: require Keychain service name
2020-04-09 17:06:41 -04:00
Maksym Malyhin 1bc3255436 Firebase Installations: validation of FIROptions parameters (#4683)
* FIS: Throw exception on incomplete Firebase config.

* API docs updated.

* FirebaseInstallations bump minor version: 1.1.0

* Fix tests

* Text fixed

* Make exception message more informative

* Fix Remote Config tests.

* Tests updated to use GCMSenderID if projectID is not available.

* Use `GCMSenderID` when `projectID` is not available.

* ./scripts/style.sh

* Comments

* GCMSenderID and projectID validation updated.

* Comment

* FirebaseInstallations: version bump to 1.0.1.

* FIS changelog

* FirebaseInstallations: version bump to 1.1.0

* FIS and Core changelogs.

* Changelogs remove GCMSenderID

* Typo

* Typo

* fix link

* Revert Core changelog

* FIS changelog fix.
2020-01-16 16:13:49 -05:00
Maksym Malyhin 6004f9c490 Revert "FitebaseInstallations: fix create FID race condition (#4576)" (#4598)
This reverts commit 89bd10ff8e.
2020-01-06 19:02:56 -05:00
Maksym Malyhin 89bd10ff8e FitebaseInstallations: fix create FID race condition (#4576)
* FIS: test duplicated Create FID API requests.

* Fix getInstallationItem race condition.
2020-01-02 17:02:23 -05:00
Maksym Malyhin 7b63ce904b FirebaseInstallations - extensions support (#4495)
* FIS - use shared user defaults if `accessGroup` is set.

* Use `FIROptions.appGroupID` to set keychain `accessGroup`

* ./scripts/style.sh
2019-12-13 17:06:07 -05:00
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
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 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 8e73ddb222 Firebase Installations as standalone SDK (#3376) 2019-07-17 20:07:35 -04:00