Commit Graph
240 Commits
Author SHA1 Message Date
Ryan Wilson e4ac5b9e89 Fix documentation comments for the Container. (#4178) 2019-10-28 09:56:36 -04:00
Paul Beusterien 351a917787 FirebaseCore M58 release notes (#4069) 2019-10-15 08:06:45 -07: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
Ryan Wilson bbcac27b72 Release 6.10.0 (#4022)
* Update versions for Release 6.10.0

* Cherrypick #3983 and include Database in release. (#3986)

* Remove log argument that causes SocketRocket crash (#3983)

* Add FirebaseDatabase to release.

* Update CHANGELOG with version.

* Cherrypick for #3984 along with CHANGELOG update. (#3988)

* Fix race condition in FIRComponentContainer instance creation (#3984)

* Fix race condition in FIRComponentContainer instance creation

Reported in #3967. Users sometimes seeing a crash when multiple threads
concurrently try to create Firestore instances. By inspection I found
that there's a race here where two threads can check for presence in the
cache, see nothing, proceed to creation, both store a value in the cache,
and both return their copies. This would lead to two Firestores being
created for a single App.

This replaces `dispatch_sync` on a serial queue with good old
`@synchronized` blocks. `dispatch_sync` will self-deadlock if called
from a thread already on the queue while `@synchronized` allows
recursion.

No new tests are added because several tests like
`testDependencyDoesntBlock` already cover this case.

* format

* Update Core CHANGELOG

* Update Core CHANGELOG again

* Fix merge from CHANGELOG
2019-10-09 12:10:33 -04:00
Gil 308e36a276 Fix race condition in FIRComponentContainer instance creation (#3984)
* Fix race condition in FIRComponentContainer instance creation

Reported in #3967. Users sometimes seeing a crash when multiple threads
concurrently try to create Firestore instances. By inspection I found
that there's a race here where two threads can check for presence in the
cache, see nothing, proceed to creation, both store a value in the cache,
and both return their copies. This would lead to two Firestores being
created for a single App.

This replaces `dispatch_sync` on a serial queue with good old
`@synchronized` blocks. `dispatch_sync` will self-deadlock if called
from a thread already on the queue while `@synchronized` allows
recursion.

No new tests are added because several tests like
`testDependencyDoesntBlock` already cover this case.

* format
2019-10-03 11:35:33 -04:00
Paul Beusterien fb353c22d4 Merge 6.9.0 (#3907)
* Update versions for Release 6.9.0

* Fix unbalanced background task creation in GDTCCTUploader (#3838) (#3839)

* Add Manifest

* dependency version update

* Cherry picks for 6.9.0 (#3871)

* fixed "expiclitlySet" typo. (#3853)

* Mark unused variables (#3854)

* Mute FCM deprecated warnings with Xcode 11 and min iOS >= 10 (#3857)

* Add a third slash to make sure generated docs include these comments.b/13812238 (#3846)
2019-09-23 10:41:33 -07:00
square c917c87165 fixed "expiclitlySet" typo. (#3853) 2019-09-14 07:22:44 -07:00
Michael Haney 1671040a1f Update CHANGELOGs (#3810)
* Update CHANGELOGs

* Additional changes to CHANGELOGs
2019-09-09 16:07:04 -07:00
Ryan Wilson 27e67868e8 Gate access to cached instances. (#3766)
* Gate access to cached instances.

This is causing an issue in #3728. Hopefully this will fix it, but no
repro is available yet to test. There's still an underlying race
condition where a `creationBlock` could be called twice for a component
that is supposed to cache the instance returned, but that should be
addressed in a follow up PR.

* Review feedback.
2019-09-04 12:06:59 -04:00
Gil 766e8723d7 Rework CMake builds of Firebase Frameworks (#3499)
* Add sed scripts that find the versions of podspecs

... without fully loading those via Pod::Spec, which is slow.

* Avoid compiling with different visibility settings

... in different translation units. This removes warnings about linking
googletest causing weak symbols becoming strong.

* Add CMake objc_framework

* Define FirebaseCore via objc_framework

* Define FIRCoreDiagnosticsInterop via objc_framework

* Define GoogleUtilities with objc_framework

* Define FirebaseCoreDiagnosticsInterop via objc_framework

* Define FirebaseAuthInterop via objc_framework

* Don't duplicate Core's dependency information everywhere

* Remove podspec_framework

* Fix compilation error with -Wstrict-prototyes
2019-08-05 16:46:28 -07:00
Morgan Chen 70b9feb9c0 Update core changelog for M53 (#3487) 2019-08-01 16:11:53 -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 74a42ed61a Storage for M52 (#3367) 2019-07-16 09:35:11 -07:00
Maksym Malyhin e5ff23cc3e FirebaseCore M52 changelog updates (#3366) 2019-07-16 12:07:43 -04:00
Maksym Malyhin c665b6e94e FIROptions.appGroupID introduced (#3293) 2019-07-02 17:09:03 -04:00
Chen Liang c366a4bdf3 fix the typo error that cause bundle identifier checking failed for app extension (#3013) 2019-05-21 12:32:16 -07:00
Maksym Malyhin f64b15a492 FirebaseCore 6.0.1 changelog (#2997) 2019-05-14 11:52:24 -04:00
Maksym Malyhin e04b6ba953 FIRApp - validate app name using NSCharacterSet (#2906) 2019-04-26 20:10:20 -04: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 423959ae0b Fix headers imports moved private (#2784) 2019-04-10 10:55:48 -04:00
Paul Beusterien 65c7c9f6bd M47 FirebaseCore release notes (#2779) 2019-04-09 12:54:45 -07:00
Maksym Malyhin 423e3741fd FirebaseCore changelog - cocoapods 1.7.0 (#2776) 2019-04-09 10:47:49 -04: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
Paul Beusterien 6f040b31ae Stop requiring multiple Core version updates (#2745) 2019-04-07 19:56:18 -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 9bdcf3fb67 Remove missing analytics runtime warning (#2734) 2019-04-05 08:24:36 -07:00
Paul Beusterien 1a32a1f7d3 Delete references to deprecated Crash and Invites (#2668) 2019-04-01 19:06:05 -07:00
Paul Beusterien 17f9064cd0 Release 5.20.0 (#2677) 2019-03-29 11:04:13 -07:00
Paul Beusterien 3a24929307 M46 Core Changelog (#2655) 2019-03-27 07:45:19 -07:00
Maksym Malyhin 67c35d2db7 FIRApp: thread safety fixes (#2639) 2019-03-26 13:45:20 -04:00
Paul Beusterien b76c8436e0 Improve error message (#2614) 2019-03-22 16:33:20 -07:00
Paul Beusterien ef6c538748 Release 5.19.0 (#2589)
* Update versions for Release 5.19.0

* update the changelog (#2583)

* Revert #2491 (#2582)
2019-03-19 17:29:18 -07:00
Ryan Wilson 2d297eb62a Fix method names in CHANGELOG (#2570)
* Fix method names in CHANGELOG
* Delete reverted os_log Core CHANGELOG
2019-03-15 14:19:25 -07:00
Maksym Malyhin 2ac4f6d4bc Avoid using NSRegularExpression in FIRApp (b/65122393) (#2529) 2019-03-15 11:38:48 -04:00
Paul Beusterien 9502e8dda1 Restore GoogleUtilities 5.3.7 - revert os_log changes (#2556) 2019-03-14 13:01:41 -07:00
Ryan Wilson 7cbd945aff Moving FIRAnalyticsConfiguration calls to Analytics. (#2516)
* Moving FIRAnalyticsConfiguration calls to Analytics.

These APIS are specific to the Analytics SDK and have been moved there.
The instance methods have become static methods on the `FIRAnalytics`
class.

* Ignore more clang warnings.

* Added more context in the changelog.

* Updated CHANGELOG.
2019-03-13 10:15:24 -04:00
Paul Beusterien bf0a2cc421 M45 Core release notes (#2537) 2019-03-13 06:46:32 -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 d100e02496 Restore GULLogger APIs, unit tests, and contents (#2504) 2019-03-11 08:59:12 -07:00
Ryan Wilson 9848883d69 Release 5.18.0 (#2477) 2019-03-05 15:29:36 -08:00
Benoit St-Pierre 6b026aac76 os_log Implementation of GULLogger (#2374)
* Step 1: Duplicate ASL Logger

This copies over the ASL logging system to a standalone Objective-C class.

* Step 2: Replace Logger with ObjC Implementation

This also moved the `forcedDebug` information to a property.

* Step 3: Remove unnecessary test methods

It does not seem necessary to drain the queue. If this is an issue on a platform I didn't test, we should implement the tests differently, such that surfacing the queue is not necessary.

* Style Fixes

* Test cleanup

* Removed FIRLoggerTest as they mostly actually test `GULASLLogger` functionality now.
* Renamed `GULLoggerInitializeASL` to `GULLoggerInitialize`.
* Use dot-notation for the defaultLogger class property.
* Removed unused debug only test methods.

* Rename FIRLoggerInitializeASL

* Style fixes

* ASL Logger cleanup and leaking

* Move ivar synthesis to the top of the implementation.
* Add dealloc logic to avoid leaking asl_obj memory.
* Add forced logic at the message level.

* GULLogger Testing

* Moved over old tests to correct ASLLogger location.
* Added new GULLogger tests
* Changed version `char *` to `NSString *`
* Tidied up some documentation

* Re-introduce ASL in the functions names

* os_log GULLogger Implementation

* Moved common logic from `GULASLLogger` to `GULLogger+Internal` class methods.
* Added `os_log` implementation of `GULLoggerSystem`
* Added `os_log` level information to `GULLoggerLevel`
* Removed unused test variable

TODO: Tests

* Remove iOS version check from ASLLogger

* Style Fixes

* Refer to ivar directly in property setter

* Refer to ivar directly in property setter

* Being os_log tests

* Setup dependency injection for os_log tests

* Rename C functions according to style and correctly test macOS version compatibility

* Further refinement of os_log testing

* Add Some OSLogger tests and update some ASLLogger ones

* Re-add getter for logLevel

* Fix up some warnings

* Remove private headers from local testing podspec

* More OSLogger tests & bug fixes

* Style Fixes

* Fix Travis build

* Update GULOSLoggerTest.m

* Do nt override method argument

* Fix test on tvOS

* Test Fixes

* Copybara test fixes

* PR Feedback
2019-02-22 16:32:57 -05:00
Ryan Wilson 4209aeaa3c Merging the 5.17.0 release into master (#2416)
* Update versions for Release 5.17.0

* Fix the tag in the FIAM podspec.

* Update dependencies for FIAM.

* Updated the FirebaseCore version.

* Fix FIROptions version.

* Temporarily remove FIAM version deps for pod linting.

* Create umbrella header for FIAM (#2392)

This causes an issue when building the zip file - similar to #1857

* Remove FIAM from 5.17.0 release.
2019-02-21 21:29:31 -05:00
Allen Vicencio 83b5683626 Deprecate setMinimumSessionInterval (#2305) 2019-02-13 16:21:38 -05:00
Chen Liang 90b77714f0 update changelog for release (#2264) 2019-01-15 15:23:28 -08:00
Paul Beusterien 35ff2cfc52 FirebaseCore 5.2.0 release notes (#2259) 2019-01-14 15:41:55 -08:00
Paul Beusterien 3990f6d0c5 Update FirebaseCore deps to 5.2 (#2255)
* SpecsStaging for Firestore
2019-01-14 11:19:52 -08:00