Commit Graph
48 Commits
Author SHA1 Message Date
Paul BeusterienandNick Cooke e1ecbde861 fix(RemoteConfig): prevent retain cycle in activateWithCompletion (#16413)
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
2026-07-21 13:32:00 -07:00
Nick Cooke 91b35d51eb [NFC] Remove comment from RCNRemoteConfigTest.m (#15122) 2025-07-16 12:36:35 -04:00
Nick Cooke 54920bcda1 [Infra] Fix RC nightly failure (#15064) 2025-07-02 16:24:37 -04:00
Tushar KhandelwalandNick Cooke eb5786d561 Improve Real-time response Handling for Remote Config (#15031)
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
2025-06-27 10:16:10 -04:00
Nick Cooke 0b5185a3c6 [Infra] Fix remote config linting warnings (#14731) 2025-04-16 15:57:03 -04:00
Tushar KhandelwalandNick Cooke 37a1a32995 Fix RCNConfigRealtime crash. (#14518)
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
2025-03-10 23:22:43 +05:30
Tushar KhandelwalandNick Cooke 15179e4b8d Add custom signals support in Remote Config. (#13976)
Co-authored-by: Nick Cooke <nickcooke@google.com>
2025-01-07 15:55:26 -05:00
Nick Cooke 6bbd7d1499 [Config] Wait for installations token before starting realtime connection (#13275) 2024-07-12 17:37:50 -04:00
themiswang ca737359db fix unit tests (#12553) 2024-03-14 14:05:44 -04:00
themiswang 90c33e404f [Rollouts] Feature rollouts merge to main (#12410) 2024-03-11 16:13:04 -04:00
Quan Pham d459655d5a Add FID into real-time RC requests (#11485)
* Set FID in realtime request

* Update request method naming

* Update test

* Fix tests

* Fix test
2023-06-29 15:20:28 -07:00
4e5b83f2d9 Merge Realtime into Remote Config (#10060)
* Realtime rc dev (#9807)

* Remove commits from non-CLA account. Move TypeDef to private RCNRealtimeConfig file.

* Remove completion handler typedef

* Format file

* Update listener registration description

* Realtime rc dev (#9835)

* Remove commits from non-CLA account. Move TypeDef to private RCNRealtimeConfig file.

* Remove completion handler typedef

* Format file

* Update listener registration description

* Add http streaming and auto fetch. Also add template version number to cache for autofetch.

* Format file.

* Add unit tests

* Format files

* fix test

* update test and header file

* Change templateVersionNumber to ivar

* Fix async tests and update NSDictionary changes

* Format file

* Update fetch time

* remove define header

* Wrap auto fetch in async queue

* Add auto fetch test

* Change template version extraction check.

* Change realtime error code to start at 8001

* Realtime rc dev (#9914)

* Remove commits from non-CLA account. Move TypeDef to private RCNRealtimeConfig file.

* Remove completion handler typedef

* Format file

* Update listener registration description

* Add http streaming and auto fetch. Also add template version number to cache for autofetch.

* Format file.

* Add unit tests

* Format files

* fix test

* update test and header file

* Change templateVersionNumber to ivar

* Fix async tests and update NSDictionary changes

* Format file

* Update fetch time

* remove define header

* Add http stream retry and background change listener.

* Wrap auto fetch in async queue

* Expose realtime method in public

* Update comments

* Add auto fetch test

* Change template version extraction check.

* Change realtime error code to start at 8001

* Change from NSTimer to dispatch. Add flag to guard against retrying.

* Format and add comments.

* Update tests

* Qdpham13 patch 1 (#9913)

* Delete .SecondApp-GoogleService-Info.plist

* Delete SecondApp-GoogleService-Info.plist

* Delete GoogleService-Info.plist

* Delete SecondApp-GoogleService-Info.plist

* Update ViewController.m

* Delete clang-format directory

* format

* Change to NSExtensionHostWillEnterForegroundNotification

* Change to UIApplicationWillEnterForegroundNotification

* add import

* Remove import, use string literal instead of UIKit enum

* add test for new public method

* Update template version number retrieval function and update delay

* Fix test

* Fix test

* Update retry seconds and fetch interval seconds

* Update ddos to DDoS

* Update variable according to style guide.

* Replace NSLog with kFIRLoggerRemoteConfig (#10062)

* Replace NSLog with kFIRLoggerRemoteConfig

* Remove logs and change others from info to debug.

* update log messages.

* Format files

* Realtime rc failsafe (#10067)

* Add failsafe logic to request, response and application logic.

* Update flag name and conditions.

* Format file

* Add check for template version number

* Format files

* Changes based on PR comments

* move response parsing logic to separate function and add test for failsafe flag

* Update based on PR comments and add method to propagate error to listeners in queue.

* Realtime rc merge patch v1 (#10089)

* Fix foreground reconnection naming, add background check and flag, add check to see if fetch is currently in progress.

* Add check so fetches come only when the template version is greater than the current one.

* Format file changes

* Add debug log

* Make changes based on PR comments.

* Resolve failsafe changes

* Updating instance var names

* change template version check for auto fetch from >= to >

* Cherry-pick #10123 into Firebase 9.5.0

* [RC] Fix retry logic to respect max retry count (#10143)

* Fix retry logic to respect max retry count

* Rename to isRequestInProgress

* Save template version in settings (#10162)

* Save template version in settings

* Format files

* set last template version to 0

* Store template version in userDefaults instead of deviceContents

* return nil for unsuccessful fetches

* fix typo

* Realtime rc no change (#10188)

* Save template version in settings

* Format files

* set last template version to 0

* Store template version in userDefaults instead of deviceContents

* return nil for unsuccessful fetches

* fix typo

* put addEtagToHeader flag to fetch and propagate it to surrounding functions

* Add excludeEtagHeaderForRealtime flag to RCNConfigFetch

* Update mocks for Swift test

* Fix flag

* Add commentting

* reconcile master branch merge conflicts

* Revert "Realtime rc no change (#10188)" (#10346)

This reverts commit abe7939602.
In part of implementing a different solution.

* Add Http status check to Realtime stream (#10406)

* Check status code before retrying

* Change time out to 5 and a half minutes

* Throw exception if unable to establish connection due to non-retryable status code

* Format file

* Replace old realtime exceptions with new exceptions (#10482)

* Replace old realtime exceptions with new exceptions

* Fix word type

* Realtime RC Fetch ID (#10499)

* Add Realtime specific fetch method and fetch type header changes

* Add test

* Add comments and format

* Fix tests

* Update fetch header name

* Update tests and edit realtime fetch name and params

* refactor remainingAttempts var

* Realtime rc backoff (#10483)

* Change Realtime back off to use same system as Fetch and persist backoff state

* format and fix merge conflict

* Save retry count along with other throttling metadata

* Update var name

* Fix naming

* Return ConfigUpdate to realtime listeners (#10578)

* diff fetched and active config on realtime fetch

* Some refactoring and added tests

* Revert some unrelated changes to fetch

* Fix formatting

* Update branch and fix swift tests

* Rename updatedParams to updatedKeys (#10683)

* Update Realtime RC service URL. (#10713)

* Compare p13n metadata values as dictionaries. (#10756)

* Realtime RC 1P Bug Fix: Add checks for retryHttpConnection method (#10770)

* Add checks to retry method

* Move background check to beginning of retry

* Capitalize FetchType header (#10774)

* Remove Fetch Duplicate error and fix API misuse error (#10814)

* Remove fetch duplicate error

* Move completionHandler to bottom of didReceiveData

* Remove unused var

* Return Server produced error if Http status code is 403  (#10844)

* Add API message to enable Realtime

* Update error message parsing to return error message from backend

* Format file

* Add comment and remove unnecessary string

* Format and update error checks

* Change matcher string

* Update matcher string

* Address PR comments (#10845)

* Address PR comments

* Add Realtime Swift mocks

* Remove unnecessary mocks

* Format files

* Format tests

* Add Realtime mock

* Add missing quote

* Fix bugs

* Remove import

* Update import

* Change import

* Don't make connection call for Realtime mock

* Move around import of RCNConfigSettings

* Fix andDo

* Update test

* Add mockedRealtime flags

* trigger integration test

* Add integration and unit test

* change constant value

* Add new RC key

* Update update

* Remove deleted item

* Add registration removal

* Fix and format files

* remove semicolon

* Update error check

* remove space

* Update capitalization

* Add space

* Remove spaces

* remove more spaces

* Remove comment and add swift name

* format

* Add tests and sampleApp changes for updatedKeys (#10879)

* Update tests and sample app

* change key name

* remove unused var

* Add comment

* update sampleApp comments

* Update comments for public methods

* Update backoff commenting

* Add changelog entry for real-time updates. (#10942)

* Add changelog entry for RC real time updates.

* Hyphenation.

* Change doc references to hyphenate real-time (#10948)

* Change doc references to hyphenate real-time

* Run formatter.

* Re-word real-time paragraph to flow better.

---------

Co-authored-by: Andrew Heard <andrew@wizheard.com>
Co-authored-by: karenyz <58443706+karenyz@users.noreply.github.com>
Co-authored-by: Karen Zeng <karenzeng@google.com>
Co-authored-by: Dana Silver <dsilver1221@gmail.com>
Co-authored-by: Dana Silver <danasilver@google.com>
2023-03-13 16:02:56 -07:00
Nick Cooke 96d07fe973 [Infra] Favor SWIFTPM_MODULE_BUNDLE macro over C function across repo (#10625)
* [Infra] Favor SWIFTPM_MODULE_BUNDLE in RC unit tests

* Favor across repo
2022-12-29 18:23:29 -05:00
karenyz d5637c4cd7 Modify activate path to only update experiments for firebase namespace (#9972)
* Modify activate path to only update experiments for firebase namespace

* Add changelog
2022-07-01 08:21:58 -07:00
Jake Krog a23a476ee5 Support array / dictionary values in Remote Config defaults (#8307) 2022-06-30 10:38:32 -07:00
karenyz b58ae5344b Send first open time in Remote Config fetch request (#9663)
* Extract first open time from analytics user properties

* Add tests

* Address comments

* Update tests
2022-04-18 16:12:19 -07: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
Paul Beusterien fd36167c8c Migrate back to unforked OCMock for SPM (#8042) 2021-05-11 11:39:55 -07:00
karenyz a1732dae3d Only update fetch throttle interval for server errors (#7901) 2021-04-15 12:11:12 -07:00
karenyz a67da04b64 Only update experiments for firebase namespace (#7604)
* Only update experiments for firebase namespace

* Update tests

* Add changelog
2021-02-25 16:52:17 -08:00
Chen Liang 4ad7e69d3b the network connection should be stubbed instead of using OCMExpect (#7498) 2021-02-10 09:55:15 -08:00
karenyz 2cd0c6e420 Use completion handler when updating experiments after activation (#6711)
* Use completion handler when updating experiments after activation

* Fix Travis

* Add changelog

* Fix whitespace

* Nonnull initializers
2020-10-12 12:26:19 -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
karenyz f56afe9ba1 Remove deprecated RC APIs (#6637)
* Remove deprecated method declarations and implementations
2020-10-01 16:11:16 -07:00
Paul Beusterien 6a2b9a9556 Merge remote-tracking branch 'origin/master' into pb-merge-firebase7 2020-09-30 16:49:31 -07:00
karenyz fa9c24ad29 Clean up usage of deprecated methods in unit tests (#6618)
* Clean up usage of deprecated methods in unit tests

* Add back second namespace tests

* Remove test for setDefaults:namespace:
2020-09-30 15:37:28 -07:00
Paul Beusterien f2bcd5d82b Make all GoogleUtilities APIs public (#6588) 2020-09-29 07:26:10 -07:00
Paul Beusterien 3ca4e99c0e Stop requiring pods to be static frameworks (#6557) 2020-09-28 14:08:16 -07:00
Paul Beusterien 40b805bccd Fix RemoteConfig sample (#6113) 2020-07-23 10:01:02 -07:00
Paul Beusterien 19b65ead65 RC: Repo-relative imports and SwiftPM (#6015) 2020-07-10 14:25:05 -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
Paul Beusterien cc233d68d8 Fake Remote Config console for testing (#5633) 2020-05-26 16:14:24 -07:00
Maksym Malyhin 3d4971b67b Remote Config: enable ARC for tests. (#5108)
* Remote Config: enable ARC for tests.

* run ./scripts/style.sh

* Fix warnings
2020-03-14 16:49:16 -04:00
Paul Beusterien 2a9008af5c Fix portability of new test (#4923) 2020-02-18 15:33:41 -08:00
dmandar 90235b5e0d Reset RC per-instance userdefaults if config database was not found. (#4896)
* Reset the RC per-instance user defaults if the config database was not found.

* Add unit test.

* Ignore the non-object arguments when stubbing the fetchWithExpirationDuration method.

* Update changelog.
2020-02-14 15:07:57 -08:00
dmandar c2164aef8a Workaround for Unit Tests until #4877 is figured out. (#4882)
* Disable multi-instance tests until partial mocking for OCMock is figured out.

* Remove extra OCMStub.

* Explicitely cast partial mocks to id to stopMocking.

* Fix typo.
2020-02-11 08:25:28 -08:00
dmandar 3754b7e809 Do not continue with fetch if we do not get a valid IID. (#4745)
* Do not continue with fetch if we do not get a valid IID.

* Address review changes to test file.

* Update test file based on review comments.

* Fix warnings.

* Fix build.

* Fix build.
2020-02-03 14:56:42 -08:00
dmandar f47ce4bbf3 Throw an error if the fetch response returns an error (irrespective o… (#4438)
* Throw an error if the fetch response returns an error (irrespective of status code).

* Remove duplicate metadata set call.

* Add comment.
2019-12-04 17:07:43 -08:00
dmandar 785c704d35 Internal code cleanup. (#4403)
* Minor code cleanup. Rename internal method, fix logging in test app.

* Rename fetchConfigWithExpirationDuration method in tests.

* Fix style.
2019-12-04 07:44:31 -08:00
dmandar 3b9fd3ddf9 Do not activate if fetch returns NO_CHANGE (#4260)
* Do not activate if a new fetch call has not resulted in any data change.

* Add tests.

* Fix style.

* Persist lastETagUpdateTime in the database.
2019-11-08 11:14:57 -08:00
dmandar 14109c4ea2 Add RC test app. (#3819)
* Add RC test app.

* Add private header files to podspec used by 2P.

* Rename FIRRemoteConfig_Internal.h to FIRRemoteConfig_Private.h.

* Fix style.

* Add copyright notice.

* Fix relative path to RCNConfigSettings for tests.

* Fix style.

* Rename to FIRRemoteConfig_Private.h for unit tests.

* Rename to coorect relative path.
2019-09-11 10:55:39 -07:00
Paul Beusterien 6f249cae07 Fix Remote Config travis flakes (#3738) 2019-09-03 12:37:17 -07:00
dmandar f964056353 Recreate an NSURLSession for updates to the fetch timeout. (#3683) 2019-08-28 07:25:34 -07:00
Paul Beusterien 4422243a2b Fix RC test flake from deallocated Expectations (#3681) 2019-08-26 16:57:58 -07:00
Paul Beusterien 2f5e4fdd95 Start RemoteConfig CI and fix/ignore warnings (#3649) 2019-08-22 13:37:44 -07:00
Paul Beusterien 9335275306 Open Sourcing Remote Config (#3645) 2019-08-21 14:26:41 -07:00