Commit Graph
59 Commits
Author SHA1 Message Date
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
Paul Beusterien fd977bb677 Fix cron build failure (#6303) 2020-08-19 09:28:40 -07:00
Paul Beusterien 8ef7064f63 Fix typos (#6196) 2020-08-03 16:27:38 -07:00
Paul Beusterien 83ff0671ff Updates for bumping swiftformat to 0.44.17 (#6120) 2020-07-23 15:44:55 -07:00
Paul Beusterien 40b805bccd Fix RemoteConfig sample (#6113) 2020-07-23 10:01:02 -07:00
Paul Beusterien 97e9eb32bf Fix internal ABT imports (#6108) 2020-07-22 11:17:56 -07:00
Nick Cooke 2ceb9d64c1 Remote Config Console API for Testing (#6009)
* Added Remote Config Console API and some tests

* Added workflow scripts

* Update path in remote config workflow

* Update path in remote config workflow 2.0

* Adding print statements to debug

* Update generate_access_token.sh

* Style and script cleanup

* Updated README and script

* reordering workflow tests for faster dev

* Updated generate_access_token.sh

* Removed unneeded part of path

* Set env var in GHA rather than script

* Fix env var in GHA

* Fix env var in GHA 2.0

* Refactored actions into one script

* removed back slash

* Removed unneeded workflow step

* Refactored script and added comments

* Minor tweaks

* Added new line

* well nvm that tweak

* Reordered workflow steps back to original order

* Only generate access token for ios runs

* Fixed readme, organized tests, improved RemoteConfigConsole

* Fixed test

* reordering tests for dev

* Removed README.md

* Added local dev mode for script

* Reset the ordering of tests to original order

* Update README

* Update README again

* Trailing space

* trailing space..again

* Cleanup up cloned repo in script

* Resolved feedback

* Style

* Gotta love trailing spaces

* Resolved feedback 2.0

* Resolved feedback 3.0

* Changed param type for update APIs

* Fixed type in updateRemoteConfigValue  method
2020-07-16 11:13:04 -04:00
Paul Beusterien 19b65ead65 RC: Repo-relative imports and SwiftPM (#6015) 2020-07-10 14:25:05 -07:00
Paul Beusterien 2660d49c7d ABTesting - Repo-relative imports and SwiftPM (#6013) 2020-07-09 15:48:47 -07:00
christibbsandPaul Beusterien 9b484519f2 Remove Protobuf from the ABT SDK (#5890)
* Remove Protobuf dependency, add struct-ish class that mimics ABTExperimentPayload

* Remove a lot of the compiler errors, but not all of them. We need to figure out how RC serializes the NSData objects passed to FIRExperimentController in updateExperimentsWithServiceOrigin:

* Add ABTExperimentPayload class that replaces generated proto, refactor classes that depend on it

* Add unit testing class for ABTExperimentPayload

* Updates to ABTExperimentPayload API, tests for ABTConditionalUserPropertyTest, add tests for ABTExperimentPayload

* Update podspec to pull in testing resources

* Add utility class for parsing test files. Use it in ABTExperimentPayloadTests

* Fix FIRExperimentController tests

* Better documentation

* Run scripts/styles.sh

* Fix whitespace

* Remove protobuf imports

* Bump pod spec version for ABT SDK, depend on new ABT SDK in RC. Fix up RemoteConfigExperiment to use new ABTExperimentPayload object

* scripts/style.sh

* Update In-app messaging to use new ABTExperimentPayload class, which involves extending the ABTExperimentPayload initializer to accept different values for overflowPolicy and experimentStartTime

* Delete test payload

* Revert scripts/check_imports.swift

* Better initialization tags for ABTExperimentLite

* Update CHANGELOGs

* Remove private headers in podspec, use integerValue to parse integers

* Refactor ABTExperimentPayload header into Private headers. Fix integer types for millisecond metadata

* scripts/styles.sh

* Fix integer parsing

* Fix copyrights

* Fix CHANGELOG typo:

* Add private_header_files to public_header_files

* Try just using NSInteger for experimentStartTimeMillis

* Bump FIAM dependency on ABTesting

* Use long long for milli parameters (32-bit apps)

* Use longlong in test timestamps

* Don't cast to nsnumber in tests

* Use in64_t

* Fix Test Overflow

* Bump major version on ABT SDK

* Bump ABTesting version in Firebase.podspec

Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
2020-07-06 13:06:39 -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 e15724a436 Migrate from interop pods to source_files header access (#5760) 2020-06-09 06:09:27 -07:00
Paul Beusterien d4621a636f Use preserve_paths instead of CocoaPods private (#5758) 2020-06-09 05:21:28 -07:00
Paul Beusterien 17933c5ac5 Import updates in unported tests (#5685) 2020-05-27 06:25:33 -07:00
Paul Beusterien 2affb24d4a Better completion callback for activate (#5646) 2020-05-26 18:01:04 -07:00
Paul Beusterien cc233d68d8 Fake Remote Config console for testing (#5633) 2020-05-26 16:14:24 -07:00
Paul Beusterien 349608b6df Remove unused source file (#5639) 2020-05-19 17:37:43 -07:00
Paul Beusterien d82361409c Initial RC Swift API tests (#5602) 2020-05-13 18:00:34 -07:00
dmandar 4d1d9cd7de Add support for sending CFBundleVersion along with the CFBundleShortV… (#5452)
* Add support for sending CFBundleVersion along with the CFBundleShortVersionString.

* Style fixes.
2020-04-28 09:26:13 -07:00
Maksym Malyhin 3576a305fe Revert "Revert "Migrate from using IID SDK for Remote Config to the new FIS SDK (#5096)" (#5156)" (#5367)
This reverts commit 230d56260f.
2020-04-15 17:05:21 -04:00
Maksym Malyhin 230d56260f Revert "Migrate from using IID SDK for Remote Config to the new FIS SDK (#5096)" (#5156)
This reverts commit 887ff82494.
2020-03-19 19:02:50 -04:00
887ff82494 Migrate from using IID SDK for Remote Config to the new FIS SDK (#5096)
* Update podspec to replace IID with installations SDK.

* Update sample app podfile to include installations sdk.

* Source code changes to support migration to FIS. The FIS SDK now supports multi-app FIS ids and tokens.

* Update RC test app to use FIS SDK.

* WIP: Unit tests for incorporating FIS with Remote Config.

* Remote Config: fix Installations tests (#5109)

* Fix Installations tests.

* Fix Firebase/Auth version (#5106)

* Remote Config: enable ARC for tests.

* run ./scripts/style.sh

* Fix warnings

* Remote Config: enable ARC for tests. (#5108)

* Remote Config: enable ARC for tests.

* run ./scripts/style.sh

* Fix warnings

Co-authored-by: Paul Beusterien <paulbeusterien@google.com>

* Add the installations token as an HTTP header.

* Add changelog for FIS changes.

Co-authored-by: Maksym Malyhin <mmaksym@google.com>
Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
2020-03-16 18:16:12 -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
christibbs 8f29236b8c Ignore deprecation warnings for FIRExperimentController.updateExperiments(serviceOrigin:events:policy:lastStartTime:payloads:) (#4934) 2020-02-19 13:04:36 -05: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 cb9e083f92 Make sure we turn of fetchInProgress flag on any fetch completion for error scenarios. Also add UT and add UT file to podspec. (#4844) 2020-02-06 12:55:55 -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
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 MalyhinandChen Liang f62c7ddcec IID: version dependent on FirebaseInstallations (#4533)
* Firebase Installations: Instance ID now uses FIS under the hood. (#3398)

* Fix merge errors

* Use modular import for FIRInstanceID_Private.h

* Use modular imports for FirebaseInstanceID.h (#3509)

* Changes missing during the fix.

* Changes missing during merge.

* Fix header import.

* ./scripts/style.sh

* Fix FCM tests. (#3888)

* Fix IID FCM token check.

* FirebaseInstallation: merge master into FIS integration branch (#4076)

* Fix IID FCM token check.

* Unused constant deleted.

* FCM tests: fix bad merge.

* Remote Config test app: use local IID and FIS. (#4089)

* token request should pass through if token is not fresh (#4104)

* Merge errors fix.

* IID with FIS: send FIS auth token with IID token request (#4152)

* FIRInstanceIDTokenOperation: add FIS auth token to the IID token request.

* IID tests: don't use FIS private headers.

* IID: indication of compatibility with FIS (#4262)

* FIS: IID incompatible version exception.

* FirebaseInstallations.podspec: set preprocessor flags based on env vars.

* FIS Travis: set required env vars

* /scripts/style.sh

* IID: method to indicate FIS usege added.

* FIS: FIRInstantiationTimingEagerInDefaultApp

* FIS: FIRInstantiationTimingAlwaysEager

* IID: make compatibility method static.

* Make -[FIRInstanceID appInstanceID:] safe to be called from any thread (#4482)

* IID: use a cached value of FID for -[FIRInstanceID appInstanceID:]

* TODO comment

* TODO updated

* FirebaseInstallations: prepare IID with FIS dependency for release (#4522)

* Bump FIrebaseInstallations to 1.0.0

* Travis: remove mm/fis-integration-master branch

* Travis: if_changed script updated to reflect IID dependency on FIS.

* Revert "Travis: remove mm/fis-integration-master branch"

This reverts commit 534dff990a.

* Travis: remove mm/fis-integration-master branch (#4526)

* Formatting and spelling.

* Firebase example proj: pod deintegrate

Co-authored-by: Chen Liang <chliang@google.com>
2019-12-20 10:54:11 -05: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
Maksym Malyhin 795a72bfa3 Remote Config test app: use local IID version. (#4088) 2019-10-16 12:12:31 -04:00
dmandar 6f5c203f20 The instanceID sync API is deprecated. Implement the async instanceID API (#3993)
* The instanceID sync API is deprecated. Implement the async instanceID API.

* Fix for review comments
2019-10-09 10:52:11 -07:00