Commit Graph
57 Commits
Author SHA1 Message Date
Ryan Wilson e4ac5b9e89 Fix documentation comments for the Container. (#4178) 2019-10-28 09:56:36 -04:00
Ryan Wilson 56b37d2543 Fix container instantiation timing, IID startup. (#4030)
* Fix container instantiation timing, IID startup.

The container instantiation could happen at the wrong time, before all
components have been added to the container. This fixes it, and also
moves IID to use the proper instantiation timing instead of relying on
the `configureWithApp:` call. This is part continuation of #3147, where
I'll be fixing the rest of the SDKs in follow up PRs.

* Typo

* Further work on instantiation timing.

This moves the instantiation of components to after the FirebaseApp is
completely configured and assigned, as it should be. This also exposed
a recursive issue with IID calling the Messaging singleton, which in
turn called IID and instantiated multiple instances.

A change was made to break the cycle: the Messaging `isAutoInitEnabled`
call was changed to a static method vs an instance method, allowing IID
to call it during initialization without instantiating the Messaging
instance (since it doesn't have a direct dependency on it).

* Revert unintentional formatting of entire FIRMessaging file.

* Fix tests.

* Format InstanceID.m

* Remove unused import.

* Fix ComponentContainer test.

* Minor PR feedback.
2019-10-11 17:20:46 -04:00
square c917c87165 fixed "expiclitlySet" typo. (#3853) 2019-09-14 07:22:44 -07:00
Maksym Malyhin f2536cf71f FirebaseApp: send Core Diagnostics data on appDidBecomeActive (#3437)
* FIRApp: send CoreDiagnostics data on appDidBecomeActive.

* ./scripts/style.sh

* Renaming.

* FIRAppTest: stub  FIRCoreDiagnosticsConnector to avoid invoking FIRCoreDiagnostics methods in the tests.

* Run ./scripts/style.sh

* Rename to `logCoreTelemetry`
2019-07-29 06:56:09 -04:00
Michael Haney 783ee5b126 Implement Firebase CoreDiagnostics (#3129)
* Implement CoreDiagnostics interop

For use by FirebaseCore.

Please pay special attention to the changes in FIRApp, I've replaced passing FIRApp in the notification with a data object that will eventually replace the same information that FIRDiagnostics extracted.

* Add CoreDiagnosticsInterop to the Example Podfile

* Style and xcodeproj updates

* Update Podfiles that dep on FirebaseCore

So that they also have a dep on FirebaseCoreDiagnosticsInterop

* ran pod deintegrate to remove unintended xcodeproj changes

* Fix Podfile paths

* Add FCD to if_changed and travis.yml

* Fix building with Firestore

* Style

* Whitespace

* Fix a changed internal API

* Make pod paths consistent

* Restore connectivity_monitor_noop.cc style

* Remove logging prior to [FIRApp configure]

Also remove sendLogsWithServiceName:version:

* style

* Remove nil checks from diagnostics data

* Put back some deleted symbols

* Restore the sendLogsWithServiceName:version: method, but as a no-op

* Restore the original version of sendLogs...

* Allow an unused parameter

* Remove obsolete nsnotificationcenter related stuff

* Whoops, missed the header change.

* Final changes to support FIRCoreDiagnostics

These changes are necessary because FIRCore has a hard dep on FIRCoreDiagnostics (FIRCD) and FIRCoreDiagnosticsInterop.

Components can't be used because FIRCD would need to have a hard dep on FIRCore to get access to FIRLibrary, FIRComponent, FIRComponentContainer, and FIRComponentCreationBlock and this would create a dep cycle. So, an extern has been put into the interop lib and the variable is implemented in the connector class inside of FIRCore, but it's unset. FIRCD actually sets that variable in +load, allowing use of FIRCD.

FIRCD can also be removed as a dependency with no ill effect by end users setting the environment variable DISABLE_FIREBASE_DIAGNOSTICS=1

* Add nanopb and project generation infrastructure

* Convert FIRCoreDiagnostics to canonical nanopb, and move to OSS.

* Remove custom build steps for CoreDiagnostics

* Addressing review comments

* Update versions, tags, and port the relevant unit tests for FIRCD

* Version and platform fixes

* Fix podspec expected tags

* A hack to solve a chicken-and-egg problem with pod lib linting.

* Heartbeat implementation

* FIRDiagnosticsDateFileStorageTests

* Fix tests for non-iOS platforms

* Heartbeat tests

* Fix initialization.

* Cleanup Installation ID.

* Fix testProtoPopulation.

* Merge conflict fix

* Typo fix.

* Remove FIRCore dep from FIRCD unit tests and move symbols to interop

* Run ./scripts/style.sh

* Typo

* #ifdef comment

* File license header.

* Import FIRDiagnosticsDateFileStorage.h using relative path.

* FIRDiagnostics -> FIRCoreDiagnostics

* Docs syntax

* Docs

* Docs typo

* Add shared variables to the interop lib

I know this goes against the convention, but it's actually the only way to resolve this very unique problem.

* Fix comment

* Style

* Removed lib version passing.

* Remove env checking for conditional deps

* Style

* Address whitespace issues

* Add copyright notice

* Add new deps to Podfiles

* Fix trailing space

* Some changes to fix working in an extension.

* Fix type in Podfile

* GDT: begin/end background task only for iOS and TVOS applications.

* Fix typo

* Style

* Stop sharing kFIRService strings across pods

* Travis test

* Change all TARGET_OS_TVOS macros to TARGET_OS_TV

TARGET_OS_TVOS doesn't exist.

Also macro out a UIApplication reference.

* style

* Update all Podfiles with deps on FIRCore

* Fix trailing whitespace

* Update Firestore cmake

* Fix FIAM build break (#3254)

* Additional cmake changes

* Fix linker issue with deprecated CoreDiagnostics (#3257)

* Adding more deps to cmake

* Fix linker error (#3266)

* Rerun only IAM tests

* whitespace

* No xcpretty or frameworks run

* Fix typo

* Revert "No xcpretty or frameworks run"

This reverts commit afc1abba37.

* Revert "whitespace"

This reverts commit fd06955a56.

* Revert "Rerun only IAM tests"

This reverts commit 98ce07600f.

* Run travis on this branch

* Add support for expanding PODS_TARGET_SRCROOT in CMake (#3267)

* Fix a few things that should have been splatted but weren't

* Define PODS_TARGET_SRCROOT in CMake for compatibility with CocoaPods

* Compile pods we depend upon with looser settings

* Rename the nanopb dependency to match what CMake actually has

* Make #include <nanopb/pb.h> work

Remove the old way of #include <pb.h> once we change the Firestore
nanopb generator to match.

* Fix warnings that fail the build

* Remove typed enum and fix a comment.

* Fix an import

* Change a line so it's not altered by Copybara

* More changes to stop copybara from altering the wrong sources

* Remove trailing whitespace

* Fix copybara modifying python.

* Add additional field in firebasecore.proto (#3273)

* Remove the dependency on interop to populate a shared variable.

* style

* Create travis jobs for FirebaseCoreDiagnostics (#3245)

* Create travis jobs for FirebaseCoreDiagnostics

And update the pod lib lints for GDT.

Remove the mph-master branch before merging to master.

* Add support for FIRCD to if_changed.sh

* Adjust tests

* Unavailable init methods should not be nullable (#3276)

* Allow firestore api to work with Codable objects + ExplicitNull + Integration tests (#3261)

* Convinience api for codables

* Integration Tests

* ExplicitNull implementation

* Update to CocoaPods 1.7.3 (#3280)

* Import GULLoggerLevel.h via public framework header (#3277)

* Put the need to include Firestore/Source/Public in the podspec (#3288)

This removes the need to munge the pods project after the fact and makes
it so that customers can click through to our headers too.

* Ensure Storage initializer doesn't get called (#3294)

* FIROptions.appGroupID introduced (#3293)

* Use a consistent set of dependencies on all platforms (#3289)

* Use a consistent set of dependencies on all platforms

* pod install for uniform dependencies

* Store the coerced base value in the BaseMutation (#3292)

* In card message: set the text color on the body text view (#3286)

* In card message: set the text color on the body text view

* Fix bug where card messages in test app were showing up with two of the same buttons

* Revert change to text color

* [docs] add missing semicolon (#3305)

Add missing semicolon to code example

* Add explicit Foundation import. (#3309)

This is causing issues when building an XCFramework.

* Pass the correct compiler flag for CoreDiagnostics. (#3312)

* Pass the correct compiler flag for CoreDiagnostics.

When CoreDiagnostics is open sourced, we'll need to ensure that the
right compiler flag is passed. This doesn't add support for Carthage yet
but allows the frameworkbuilder to pass the flag for carthage as well.
An update to the zipbuilder to allow for carthage will follow shortly.

* Remove accidental change.

* Fix and rewrite sync_project.rb (#3296)

* Fix and rewrite sync_project.rb

Ever since we added multiple platforms, removing a file has been broken.
This fixes that issue.

Also, rewrite target synchronization to make more sense. Essentially now
there's one diff between the filesystem and the groups and then an
explicit diff is done between project files and target contents.

* Run sync_project.rb on post-install

* pod lib linting should output something every minute while running

* DEBUG: This commit should be reverted

* DEBUG: This commit should be reverted

* DEBUG: This commit should be reverted

* Remove mph-master from travis

* Fix constant name conflic between old and new diagnostics (#3329)

* Rename kFIRDiagnosticsHeartbeatDateFileName -> kFIRCoreDiagnosticsHeartbeatDateFileName to avoid conflicts with FIRDiagnostics.

* Travis: temporary add `mph-master` to run tests.

* Rempve mph-master again

* Fix imports in FIRCDConnector

* Fix another import

* Fix yet another import

* Attempt to read crashing test logs from disk

* Implement printing of failed/crashed test logs.

* Print only crashed tests, rmdir between runs

* Revert reading crashing log changes

* Write CHANGELOG for all new FIRCD associated libraries

* Change all GUL deps to >= 6.2

* Revert ZipBuilder changes and do some last bits of cleanup

* Remove an assertion and populate an error instead
2019-07-18 09:54:06 -07:00
Paul Beusterien 2815f14985 Restore kFIRLoggerCrash for internal clients (#2809) 2019-04-11 10:47:43 -07:00
Paul Beusterien 64b270b6d0 Temporarily restore setAnalyticsCollectionEnabled (#2803) 2019-04-10 18:08:51 -07:00
Maksym Malyhin 55814996a1 Cocoapods 1.7.0 multiproject support (b/128794527) (#2751) 2019-04-08 22:38:51 -04:00
Paul Beusterien fd6f93d89d Begin migrating FIRLoggerService declarations to clients (#2720) 2019-04-08 08:54:21 -07:00
Paul Beusterien 76a003f4c8 Clean up unused Core error codes (#2737)
* Core patches can only be 2 digits
2019-04-08 06:58:49 -07:00
Ryan Wilson 626bfb513c Remove FIRAnalyticsConfiguration from Public header. (#2728)
* Remove FIRAnalyticsConfiguration from Public header.

We haven't removed it entirely yet because we need to make changes
within Analytics to verify that the global data collection switch is
still honored and tested well. This can wait until after the breaking
change because the header and code will be internal after this change.

* Fixed incomplete comment.

* Remove self importing header.
2019-04-07 22:49:54 -04:00
Paul Beusterien 1a32a1f7d3 Delete references to deprecated Crash and Invites (#2668) 2019-04-01 19:06:05 -07:00
Maksym Malyhin e53d552d5e Allow Bundle IDs that have a valid prefix - strict validation (#2515)
Allow Bundle IDs that have a valid prefix - strict validation
2019-03-11 21:33:07 -04:00
Paul Beusterien 943141e0cd Use registerLibrary for pods in Firebase workspace (#2137)
* Add versioning to Functions and convert to FIRLibrary
* Convert Firestore to FIRLibrary
* Point travis to FirebaseCore pre-release for its deps
* Update user agent strings to match spec
2018-12-13 08:36:08 -08:00
Benoit St-Pierre bc0855048a Clean up FIRAuth bits from FIRApp (#2110)
* Clean up FIRAuth bits from FIRApp
2018-12-07 09:31:10 -05:00
Ryan Wilson 4c50de65d4 Reduce singleton usage in FIRApp tests. (#1995)
* Reduce singleton usage in FIRApp tests.

There have been some issues while creating new tests of conflicts with
mocks of classes and instances, this should alleviate some of those
conflicts in the future.

* Remove bad style changes.

* Use default app name flag instead of local variable.
2018-10-24 11:03:54 -04:00
Michael Lehenbauer b88f95c44f Reformat using 'clang-format version 7.0.0 (tags/google/stable/2018-04-24)' (#1681)
This is the version of clang-format that travis is currently using.
2018-08-13 14:18:02 -07:00
Ryan Wilson 804ed0f146 Move global data collection switch to public API. (#1583) 2018-07-25 11:08:58 -04:00
Ryan Wilson 1d484d33a7 Rename global data collection switch. (#1560) 2018-07-23 10:34:16 -07:00
Paul Beusterien 98b6eef71e Split GoogleUtilities from FirebaseCore (#1370) 2018-07-06 09:37:23 -07:00
Ryan Wilson 2f6bf8d669 Add FirebaseCore component interoperability. (#1437)
* Add FirebaseCore component interoperability.

This puts in place the system that will allow SDKs to register with
Core and retrieve functionalities provided by other SDKs.

* Updated documentation.

* Add copywrite, fix log messages.

* Explicitly import headers from Private dir
2018-06-28 13:48:13 -04:00
Ryan Wilson 503d2debdd Add conformance to data collection switch for Analytics. (#1296)
* Add conformance to data collection switch for Analytics.

* Fix method documentation per PR comments.
2018-05-21 21:49:57 -04:00
Ryan Wilson 08f447cd3f Add global data collection switch. (#1219)
* Addition of global data collection switch.
* Added Messaging conformance to data switch.
  Also formatted code.
* Move data collection flag internal until all SDKs conform to it.
* Formatting in response to code review.
2018-05-14 10:02:25 -07:00
Ryan Wilson af4bf66cfe Add MLKit to FIRLogger constants. (#1263) 2018-05-11 11:28:30 -07:00
Paul Beusterien a9909ebc90 Eliminate duplicate symbol in CocoaPods -all_load build (#1223) 2018-05-03 16:35:33 -07:00
Ryan Wilson 421cd3c248 Remove logging count for this release. (#1201) 2018-05-01 06:42:57 -07:00
Ryan Wilson 260557691f Add counter for errors and warnings logged. (#1168)
* Moved writes outside of dispatch_async block.
2018-04-25 06:45:36 -07:00
Ryan Wilson eed6e194ba Remove unused URL scheme files. (#1157) 2018-04-20 16:18:36 -04:00
Paul Beusterien 54fe9ba7fc Add Logger Service for Swizzler (#1002) 2018-03-29 16:44:46 -07:00
Ben Hamilton (Ben Gertzfield) cb1f65dfcf Migrate Firebase off ObjC module @import statements (#992)
* Migrate Firebase off @import statements

* - Migrate tests and test utils from @import to #import.
  - Update Xcode projects for tests to explicitly link in framework deps.
  - Update check_no_module_imports.sh to look for @imports in tests/test utils/
    integration tests.

* Ensure check_no_module_imports.sh explicitly exits with code 0 on success.
2018-03-29 08:44:48 -07:00
Benoit St-Pierre 11b431fa34 Remove unnecessary nonnull annotations 2018-02-26 19:17:17 -05:00
Benoit St-Pierre 23a6f901be Manually fix clang-format issues 2018-02-26 19:16:34 -05:00
Benoit St-Pierre 3d03426e0e Style fixes 2018-02-26 15:58:37 -05:00
Benoit St-Pierre 6f5eebb77f PR feedback 2018-02-26 13:58:28 -05:00
Benoit St-Pierre f851ca9ffa Add third-party library version registration
This will allow us to collect the version of platform libraries that
developers use in conjunction with Firebase.
2018-02-26 11:23:44 -05:00
Paul Beusterien e7347dc2f0 Delete unused private FIRCreateError (#631) 2018-01-09 07:43:37 -08:00
Greg Soltis 412e759a19 Expose library version, move it out of options (#588)
* slight cleanup

* Use -D defines for versions

* Undo FIROptionsTest change

* Drop failed macro attempt

* Add correct version to podspec

* Add newline

* Shuffle files around

* Bring back log change

* Fix change

* Fix space
2018-01-01 17:43:54 -08:00
rsgowman a251259f3c Include UID when sending (internal) auth state change notifications (#507)
This is to allow firestore to not require an explicit dependency on auth.
2017-11-30 13:26:25 -05:00
Gil 86f429b2f0 Make FSTIntegrationTestCase Objective-C++ (#439)
* Make all FIRLogger functions extern "C"

* Make FSTIntegrationTestCase Objective-C++

Keep external interface to FSTIntegrationTestCase Objective-C

* Add explicit dependency on Firebase/Community/Core from Tests

This fixes a linkage error on a missing _FIRSetLoggerLevel symbol
2017-11-09 09:16:20 -08:00
Ryan Wilson b561342aa6 Remove unused internal function. (#383)
This isn't referenced anywhere internally or externally.
2017-10-17 16:47:08 -04:00
Paul Beusterien 8156da3f32 Fix warnings exposed by Xcode 9.1 in Auth (#350) 2017-10-09 12:22:11 -07:00
Paul Beusterien b8d39fcabe Fix a warning that shows up in Xcode 9 (#342) 2017-10-06 14:19:01 -07:00
Gil bde743ed25 Release 4.3.0 (#327)
Initial release of Firestore at 0.8.0
Bump FirebaseCommunity to 0.1.3
2017-10-03 08:55:22 -07:00
Sebastian Schmidt dc36b0a5d7 Clang-formatting FIRLogger (#312) 2017-09-25 15:09:16 -07:00
Paul Beusterien 187c762137 Enable FIRLogger to be weakly linked (#244) 2017-09-10 11:47:23 -07:00
Paul Beusterien e27a3072f6 Non-functional changes to reduce FirebaseCore by 792 bytes (#250) 2017-09-10 06:38:25 -07:00
Michael Haney 50c0900787 Ensure that FIRLogger functions are declared as C (#238)
Wrap the FIRLogger functions in an extern "C" when being compiled as C++.
2017-09-06 06:55:01 -07:00
Ryan Wilson 5e1e35ebb9 Clean up FIRBundleUtil. (#191)
Remove `relevantBundleIdentifiers method that isn't used anywhere.
2017-08-14 17:26:39 -04:00
Ryan Wilson 6e00706604 Move Auth notification constant into Core. (#155)
* Move Auth notification constant into Core.

SDKs that want to listen for the internal Auth notifications needed
to copy the notification strings to their own SDK instead of relying
on Auth's definition in order to avoid a dependency on Auth. By moving
them to Core, SDKs can use the constants without taking on another
dependency.

* Remove Auth stub, add app instance to notification.
2017-08-04 15:42:14 -07:00
Marek Gilbert e4af03818c Formatting updates based on the latest clang-format
clang-format version 5.0.0 (tags/google/stable/2017-06-22)
2017-08-02 09:52:48 -07:00