Commit Graph
16 Commits
Author SHA1 Message Date
Benoit St-Pierre 54659e8d99 Database Interop Rollforward (#2095)
* Register Database with Interop

+ Add AuthInterop dependency
+ Have Database register with Interop component container
+ Add weak dependency on Auth
~ Cleaned up imports

* Use Interop for Auth token fetching

+ Use macro to get auth component
~ Change `getTokenForcingRefresh:withCallback:` call to use Interop component version of Auth
~ Clean up imports

* Implement necessary protocols

+ Added FIRComponentRegistrant and FIRDatabaseNilProtocol to FIRDatabase

* Squash of my previous local commits for Database Interop

Register Database with Interop:

  + Add AuthInterop dependency
  + Have Database register with Interop component container
  + Add weak dependency on Auth
  ~ Cleaned up imports

Use Interop for Auth token fetching:

  + Use macro to get auth component
  ~ Change `getTokenForcingRefresh:withCallback:` call to use Interop component version of Auth
  ~ Clean up imports

Implement necessary protocols:

  + Added FIRComponentRegistrant and FIRDatabaseNilProtocol to FIRDatabase

Clean up Database tests:

  - Removed all unnecessary header files
  ~ Ran style.sh across all the tests

Cleaned Up project file:

  Some header removals were missed in the last commit.

Sorted some test files

Fix Database Fake App Tests:

  + Added container property
  + Added an Auth fake in the container
  + Added the Shared utils files to the necessary targets
  + Added a missing XCTest reference in a test that didn't compile for me

* Revert "Squash of my previous local commits for Database Interop"

This reverts commit c0d0421237.

* Cleaned Up project file

Some header removals were missed in the last commit.

* Sorted some test files

* Fix Database Fake App Tests

+ Added container property
+ Added an Auth fake in the container
+ Added the Shared utils files to the necessary targets
+ Added a missing XCTest reference in a test that didn't compile for me

* PR Feedback Changes

+ Created new FIRDatabaseComponent class to encapsulate instance creation
+ Updated FAuthTokenProvider to only use an auth instance rather than an app.

* PR Feedback Follow-Up

- Removed FIRDatabase registration code

* pod deintegrate

* Move instance management

Somes tests may still be out of date.

* Fix Auth integration test

* pod deintegrate -- again

* PR Feedback

* PR Feedback

Added the FIRComponentLifecycleMaintainer protocol to FIRDatabaseComponent

* Update Firebase/Database/Api/FIRDatabaseComponent.m

Missed some small changes

* Get integration tests compiling

* Fix some tests

* Fixed more tests

Component needs to be cacheable in order to get the appWIllBeDeleted callback.

* Update target memberships

* Revert project file changes

* Add FIRAuthInteropFake for broken targets

* PR feedback

* Spacing and Style

* Moved `instances` to ivar

* Simplify FIRDatabaseDictionary

It's now keyed on the URL with the app being implied since each app will get its own `FIRDatabaseComponent`

* Fix Database Integration Tests

Have the FakeApp cache DB instances
Use the Full host/URL path to cache DB instances
Simplified shared scheme

```
Test Suite 'Database_IntegrationTests_iOS.xctest' passed at 2018-11-20 07:09:30.520.
	 Executed 326 tests, with 0 failures (0 unexpected) in 66.251 (66.528) seconds
Test Suite 'All tests' passed at 2018-11-20 07:09:30.522.
	 Executed 326 tests, with 0 failures (0 unexpected) in 66.251 (66.530) seconds
```

* Clarify defaultApp use
2018-11-22 06:44:42 -05:00
Benoit St-Pierre 50d27eb6ac Revert "Database Interop (#1865)" (#2093)
This reverts commit 4090195f15.
2018-11-19 09:52:42 -05:00
Benoit St-Pierre 4090195f15 Database Interop (#1865)
* Register Database with Interop

+ Add AuthInterop dependency
+ Have Database register with Interop component container
+ Add weak dependency on Auth
~ Cleaned up imports

* Use Interop for Auth token fetching

+ Use macro to get auth component
~ Change `getTokenForcingRefresh:withCallback:` call to use Interop component version of Auth
~ Clean up imports

* Implement necessary protocols

+ Added FIRComponentRegistrant and FIRDatabaseNilProtocol to FIRDatabase

* Squash of my previous local commits for Database Interop

Register Database with Interop:

  + Add AuthInterop dependency
  + Have Database register with Interop component container
  + Add weak dependency on Auth
  ~ Cleaned up imports

Use Interop for Auth token fetching:

  + Use macro to get auth component
  ~ Change `getTokenForcingRefresh:withCallback:` call to use Interop component version of Auth
  ~ Clean up imports

Implement necessary protocols:

  + Added FIRComponentRegistrant and FIRDatabaseNilProtocol to FIRDatabase

Clean up Database tests:

  - Removed all unnecessary header files
  ~ Ran style.sh across all the tests

Cleaned Up project file:

  Some header removals were missed in the last commit.

Sorted some test files

Fix Database Fake App Tests:

  + Added container property
  + Added an Auth fake in the container
  + Added the Shared utils files to the necessary targets
  + Added a missing XCTest reference in a test that didn't compile for me

* Revert "Squash of my previous local commits for Database Interop"

This reverts commit c0d0421237.

* Cleaned Up project file

Some header removals were missed in the last commit.

* Sorted some test files

* Fix Database Fake App Tests

+ Added container property
+ Added an Auth fake in the container
+ Added the Shared utils files to the necessary targets
+ Added a missing XCTest reference in a test that didn't compile for me

* PR Feedback Changes

+ Created new FIRDatabaseComponent class to encapsulate instance creation
+ Updated FAuthTokenProvider to only use an auth instance rather than an app.

* PR Feedback Follow-Up

- Removed FIRDatabase registration code

* pod deintegrate

* Move instance management

Somes tests may still be out of date.

* Fix Auth integration test

* pod deintegrate -- again

* PR Feedback

* PR Feedback

Added the FIRComponentLifecycleMaintainer protocol to FIRDatabaseComponent

* Update Firebase/Database/Api/FIRDatabaseComponent.m

Missed some small changes

* Get integration tests compiling

* Fix some tests

* Fixed more tests

Component needs to be cacheable in order to get the appWIllBeDeleted callback.

* Update target memberships

* Revert project file changes

* Add FIRAuthInteropFake for broken targets

* PR feedback

* Spacing and Style

* Moved `instances` to ivar

* Simplify FIRDatabaseDictionary

It's now keyed on the URL with the app being implied since each app will get its own `FIRDatabaseComponent`
2018-11-19 07:36:05 -05:00
Paul Beusterien c27db6d477 Fix analyze errors (#2047) 2018-11-05 13:07:22 -08:00
Paul Beusterien 8e70791465 Update travis to use Xcode 9.3 (#1163)
* Workaround already installed brew error message
* NSJSONSerialization of doubles is now fixed on OSX
2018-04-23 10:00:02 -07:00
Sebastian Schmidt 12faf205f3 Cleaning up implicit retain for the RTDB and Storage 2018-02-13 10:27:53 -08:00
Paul Beusterien da9308408d Use brackets for module imports (#487) 2017-11-22 09:19:10 -08:00
Paul Beusterien 3e592526ec Buildable and interoperable source pods (#444) 2017-11-21 17:02:22 -08:00
Paul Beusterien dec86df553 Disable another test that depended on broken pre-iOS 11 small doubles (#152) 2017-07-26 14:32:28 -07:00
Sebastian Schmidt 4a22dc2a18 Purge persistence cache if we can't load from it (#153)
* Purge persistence cache if we can't load from it

* Adding unit test

* Review comments
2017-07-26 13:50:34 -07:00
Sebastian Schmidt f1fbbf3adb Disabling NSJSON edge case test on iOS 11 (#148)
* Disabling NSJSON edge case test on iOS 11

* Adding check for iOS

* Fix formatting

* Using TARGET_OS_IOS instead of TARGET_OS_IPHONE
2017-07-20 14:20:07 -07:00
Paul Beusterien 053b2f11ea Use modulemap to fix exposure of FirebaseCore's internal headers (#121) 2017-07-10 14:57:03 -07:00
Paul Beusterien ddbfd4cc66 Add travis trailing whitespace check (#116)
* Add travis trailing whitespace check

* Remove trailing white space
2017-06-30 13:47:37 -04:00
Sebastian Schmidt c67a8bdc58 Fixing parsing for double numbers (#107)
NSJSONSerialization parses long values as doubles and returns NSNumber that are backed by doubles to the users. For NSNumbers that can be stored as longs, we can overwrite this behavior by re-running the initialization step.
2017-06-27 10:04:47 -07:00
Mathew Huusko V 5c59342e6e macOS (#38)
* Example/Core: create macOS app/tests target

* Example/Core: Core_Example/Tests -> Core_Example/Tests_iOS

* Example/Core: macOS building/tests passing

* Example/Database: separate iOS/macOS targets

* BuildFrameworks: macOS

* .travis.yml, test.sh: AllUnitTests -> AllUnitTests_iOS

* test.sh: add AllUnitTests_macOS

* Example/Storage: Example/Tests->_iOS

* Example/Storage: macOS

* test.sh: try to prevent double error 65

* test.sh: build before test

* Example/Auth|Messaging: -> _iOS

* Example/Auth: macOS build

* Example/Auth: macOS passing

* Example/Firebase: pod de/re-integrate; fix static DerivedData references; copy phase for OCMock

* Example/Firebase: manually copied OCMock, Products Dir vs. Frameworks

* Example/Firebase: copied OCMock, prevent header removal

* Example/Storage: integration tests sdk fix

* Example/Auth: macOS exclude FIRAuthAppCredentialManager; cleanup

* Firebase/Core: remove nullability annotation

* Firebase/Core|Database: correct TARGET_X usage for correctness and anticipation of OS_WATCH|TV branches

* build.swift: style fix

* Firebase/Core: FIRLogger: fix macOS intermittent va_list error
2017-06-02 10:42:17 -07:00
Paul Beusterien 98ba64449a Initial 2017-05-15 12:27:07 -07:00