Commit Graph
95 Commits
Author SHA1 Message Date
Nick Cooke 6bbd7d1499 [Config] Wait for installations token before starting realtime connection (#13275) 2024-07-12 17:37:50 -04:00
Paul Beusterien ad8bac4915 Update repo Podfiles to iOS 13 minimum (#13250) 2024-07-09 08:05:22 -07:00
Nick Cooke 1674a6b9b4 [Config] Remove ConfigSwift (#13076) 2024-06-06 12:44:20 -04:00
Paul Beusterien 7d7cbad7bd [v11] Update minimum platform versions for 11.0.0 (#13066) 2024-06-05 07:39:36 -07: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
Quan Pham d74dae0c31 Save activated ExperimentsDescriptions in DB (#11259)
* Add activated experiment metadata and payload keys to experiments table

* Call updateActivatedExperiments in activation method

* Update key name for experiments table

* Update test to include activation call

* Update DB manager for Active experiments payload and metadata

* Fix metadata naming

* add comment

* Don't save experiments metadata b/c it isn't required to diff experiments

* Add extra assertion for test

* Address PR comments
2023-05-26 10:11:15 -07:00
Nick Cooke 867697b8f3 [Infra] Upgrade to clang-format16 (#10973) 2023-03-20 12:47:43 -04: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
Nick Cooke 43c62f0526 [Infra] Remove CoreDiagnostics library and references (#10259)
* [Infra] Remove CoreDiagnostics library and references

* Style localize_podfile.swift

* Add GDT to SharedTestUtils

* Update GoogleUtilities.cmake config

* Run all CI

* Update GoogleUtilities.cmake config (2)

* Resolve FIRApp.m TODO

* [skip ci] Revert Gemfile
2022-09-26 00:03:55 -04: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 2246d8ff8c RC Swift pod and codable (#9084) 2022-01-18 07:25:47 -08:00
Paul Beusterien b9eccb7457 Control async/await testing from source instead of podspec (#9080) 2021-12-11 10:29:32 -08:00
Paul Beusterien fd4572c291 Async/await variations of existing RC Swift API tests (#8825) 2021-10-19 09:54:22 -07:00
Paul Beusterien 10e364c54b Restore RC SwiftAPI Tests (#8792) 2021-10-12 13:39:45 -07:00
Paul Beusterien 33692eb578 Fix Remote Config Integration CI (#8774) 2021-10-11 07:38:51 -07:00
Paul Beusterien c7c0149351 Update to clang-format@13 (#8739) 2021-10-04 07:52:21 -07:00
Artem VolkovandArtem Volkov 56be86ed23 Fix RemoteConfig multithreading (#8626)
* Fix RemoteConfig multithreading

* RCNConfigContent multithreading tests

av/rc-fix-threads-stuck

* RCNConfigContent test style

av/rc-fix-threads-stuck

* RCNConfigContent test more asserts

av/rc-fix-threads-stuck

Additional info: it seems safe to put XCTAssert in non-main queue.
Apple example: https://developer.apple.com/documentation/xctest/asynchronous_tests_and_expectations/testing_asynchronous_operations_with_expectations?language=objc
Callback in example "is executed on the delegate queue" https://developer.apple.com/documentation/foundation/nsurlsession/1410330-datataskwithurl?language=objc

Co-authored-by: Artem Volkov <artem.volkov@aliexpress.ru>
2021-09-20 11:08:48 -07:00
Paul Beusterien 0d90f2f12d Update to clang-format 12.0.1 (#8397) 2021-07-16 11:40:42 -07:00
Paul Beusterien fd36167c8c Migrate back to unforked OCMock for SPM (#8042) 2021-05-11 11:39:55 -07:00
Chen Liang 429bac463c Remove InstanceID from Github repo (#7970) 2021-04-27 11:54:03 -07:00
karenyz a1732dae3d Only update fetch throttle interval for server errors (#7901) 2021-04-15 12:11:12 -07:00
karenyz 6e11684c2a Throw exception when projectID is missing from FIROptions (#7725) 2021-03-19 09:48:40 -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
karenyz 32922df544 Store and update config metadata entries by namespace (#7373)
* Insert and load config metadata by namespace

* Deprecate existing metadata table name

* Update tests

* Fix delete method and update naming

* Add test for writing metadate for multiple namespaces
2021-02-22 10:21:41 -08:00
Paul Beusterien cf49cbaa54 Incorporate SpecsDev (#7561) 2021-02-19 07:18:59 -08:00
Chen Liang 4ad7e69d3b the network connection should be stubbed instead of using OCMExpect (#7498) 2021-02-10 09:55:15 -08:00
Paul Beusterien 54d28547d3 Remove GDT from repo (#7384) 2021-01-27 07:51:12 -08:00
Paul Beusterien 02488e99b7 Remove GoogleUtilities from repo (#7315) 2021-01-21 07:09:50 -08:00
vic-flair 899b562685 Standardize support for Firebase products that integrate with Remote Config. (#7094) 2021-01-19 19:25:40 -08:00
christibbs a764d00d25 Remote Config: Revert to previous nil check on experiment JSON (#7269)
* Revert to previous nil check on experiment JSON

* Update CHANGELOG
2021-01-08 15:57:13 -05:00
Paul Beusterien 8864ff9e41 Fix typo in test (#7255) 2021-01-06 10:22:59 -08:00
vic-flair 95cf1d3508 Add support for other Firebase products to integrate with Remote Config. (#6692) 2020-10-22 17:19:47 -07:00
karenyz e587d7dcd5 Minor RC cleanup (#6722)
* Cleanup developer mode variables

* Fix README link

* Use fully qualified namespace in test to avoid errors

* Fix whitespace
2020-10-13 16:27:08 -07: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
Ryan Wilson 19159a4b25 Fix tvOS storage issues. (#6658)
* Fix tvOS storage issues.

On tvOS devices, the ApplicationSupport directory cannot be used.
Unfortunately this doesn't come up in simulator testing, only on device.
This hasn't been fully tested on device but given that any writes to the
ApplicationSupport directory fail on tvOS, this change can't break much.

Fixes #6612

@defagos can you please give this a test?

* Fixed changed dir name for RC

* Fixed test naming, too.

* Fix the documentation comment for GoogleUtilities.

* Updated changelog.

* Review feedback
2020-10-08 11:28:41 -04: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
Paul Beusterien 12c9e3fef0 Stop using CocoaPods private headers (#6572) 2020-10-02 09:11:21 -07: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
christibbs 416fb43748 Remove deprecated method in ABT public header (#6602)
* Remove deprecated method, implementation

* Replace call to deprecated method in RC, fix tests

* Update changelogs
2020-09-29 15:29:43 -04: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