Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
d5012f3
Version bump for 4.8.1 Release
bstpierr Jan 11, 2018
a8aec78
Update from master
bstpierr Jan 11, 2018
0db5255
Merge pull request #650 from firebase/bstpierre-version-bump
bstpierr Jan 11, 2018
b36d92f
Update Core info for M21.1
bstpierr Jan 11, 2018
bdf14ce
Merge pull request #651 from firebase/bstpierre-version-bump
bstpierr Jan 11, 2018
551f5b2
Merge pull request #654 from firebase/master
bstpierr Jan 12, 2018
c9f91e3
Remove over-aggressive assert.
Jan 12, 2018
9f39872
Merge pull request #657 from firebase/mikelehen/closeWithFinalState-c…
bstpierr Jan 12, 2018
a8f7e20
Remove over-aggressive closeWithFinalState: delegate assert. (#656)
mikelehen Jan 12, 2018
63fe2d7
Increase FirebaseAuth version for M21.1
bstpierr Jan 12, 2018
2a5c397
Merge pull request #659 from firebase/bstpierre-autb-bump
bstpierr Jan 12, 2018
17f5a9b
Fix import formatting (#660)
paulb777 Jan 12, 2018
8a44abb
Merge remote-tracking branch 'origin/master' into release-4.8.1
paulb777 Jan 12, 2018
da506b8
Fix issue @morganchen12 discovered where we weren't properly creating…
mikelehen Jan 12, 2018
b5454f1
Validate clang-format compliance in travis (#648)
paulb777 Jan 13, 2018
b15283b
Build gRPC for Firestore C++ (#652)
wilhuff Jan 13, 2018
2c0cacd
Inject infoDictionary to fix flakey tests. (#664)
ryanwilson Jan 15, 2018
f2f0da7
Fix issue @morganchen12 discovered where we weren't properly creating…
mikelehen Jan 12, 2018
caa6944
Travis - run tests only for changed code (#665)
paulb777 Jan 15, 2018
722b83c
Merge pull request #667 from firebase/bs-cherrypick
bstpierr Jan 15, 2018
2700198
Add assert_test to the Xcode build (#671)
wilhuff Jan 16, 2018
df71c9a
Enable warnings in the CMake build (#669)
wilhuff Jan 16, 2018
128e9cb
Fix C++ lint errors (#668)
wilhuff Jan 17, 2018
cac2c3f
implement FieldValue for null, boolean, and array in C++. (#637)
zxu123 Jan 17, 2018
c366497
Simplify integration with googletest (#672)
wilhuff Jan 17, 2018
6a3379d
Add a cc_library to the CMake build (#670)
wilhuff Jan 17, 2018
b341356
Fix CMake build and lint warnings in field_value.cc (#677)
wilhuff Jan 17, 2018
70d401d
Listen sequence numbers (#675)
Jan 17, 2018
cda67e4
Merge pull request #680 from firebase/release-4.8.1
paulb777 Jan 18, 2018
6a6e148
Fix build warnings by making void parameter explicit (#681)
paulb777 Jan 19, 2018
9f7c094
Add platform detection logic for SecureRandom (#676)
wilhuff Jan 19, 2018
39d8252
Port comparison to C++ (#678)
wilhuff Jan 19, 2018
cd0cbe9
Use Comparator in FieldValue. (#686)
wilhuff Jan 19, 2018
c4feb51
style.sh - output unformatted files in test-only and ignore generated…
paulb777 Jan 21, 2018
5bfcb3b
Cleanup imports and isEqual (#685)
wilhuff Jan 22, 2018
b5c44bc
Fixing spelling error in FIRStorageErrors
schmidt-sebastian Jan 22, 2018
1db4718
Merge pull request #691 from firebase/schmidt-sebastian-patch-5
schmidt-sebastian Jan 22, 2018
d764ad2
Update travis to use CocoaPods 1.4.0 (#692)
paulb777 Jan 23, 2018
66bf845
add FIRUser behavior to documentation
morganchen12 Jan 23, 2018
cc0ecd8
Disable Messaging build warnings (#697)
paulb777 Jan 24, 2018
8f0c325
Update FirebaseMessaging protos (#696)
paulb777 Jan 24, 2018
44a2bc0
Adding enable/disable property to FCM token auto Initialization
charlotteliang Jan 24, 2018
a5efe7a
revert unrelated changes
charlotteliang Jan 24, 2018
74ea475
revert unrelated changes
charlotteliang Jan 24, 2018
4125066
revert unrelated changes
charlotteliang Jan 24, 2018
fa81c48
Merge branch 'master' into messaging-copy
charlotteliang Jan 24, 2018
0481e1e
Merge pull request #699 from firebase/messaging-copy
charlotteliang Jan 24, 2018
2ff7f48
Adds explicit core graphics dependency to auth (#700)
protocol86 Jan 24, 2018
1f77212
Properly publish Abseil sources as a part of the podspec (#704)
wilhuff Jan 25, 2018
bfa0e40
Implement the rest of FieldValue types for C++ (#687)
zxu123 Jan 25, 2018
e5745d1
README - FirebaseCore source pod must be included with all source pod…
paulb777 Jan 25, 2018
f027214
Fix incorrect deprecation message (#688)
revolter Jan 25, 2018
15a2926
Update CHANGELOG for M21.1 release (#679)
ryanwilson Jan 25, 2018
5fdda3f
normalize string_util (#708)
zxu123 Jan 25, 2018
821fb90
implement `TargetIdGenerator` in C++ for Firestore (#701)
zxu123 Jan 25, 2018
5306474
adding unit test for auto init enable function (#710)
charlotteliang Jan 25, 2018
7226b4a
port TargetIdGenerator to iOS (#709)
zxu123 Jan 25, 2018
af6976a
normalize and port the rest of Firebase/Port code (#713)
zxu123 Jan 27, 2018
4d7c973
Fix b/72502745: OnlineState changes cause limbo document crash. (#470…
mikelehen Jan 27, 2018
cceeec3
travis: check for copyright in sources (#717)
paulb777 Jan 28, 2018
856c3a0
Add the C++ linter to the repo (#720)
wilhuff Jan 28, 2018
a74d39f
Fix a number of c++ build errors (#715)
rsgowman Jan 28, 2018
6dc1373
Version updates to 4.8.2 (#722)
paulb777 Jan 28, 2018
63a380b
Use fixed-sized types (#719)
wilhuff Jan 29, 2018
5a280ca
Import iterator_adaptors from google3 (#718)
wilhuff Jan 29, 2018
03a0069
Add changelog entry for my last PR (oops) and also add a few that we …
mikelehen Jan 29, 2018
05ef5ae
Add absl_strings to firebase_firestore_util_test dependencies (#725)
rsgowman Jan 29, 2018
6474a82
Firestore DatabaseId in C++ (#727)
zxu123 Jan 29, 2018
3cbdbf2
Schema migrations for LevelDB (#728)
Jan 30, 2018
799a808
[FCM] Add completion handler to subscribe/unsubscribe topic actions
Jan 31, 2018
4e4c82b
Fix tests.
Jan 31, 2018
693d064
Merge pull request #732 from OleksiyA/FCM-subscribe-completion-1
OleksiyA Jan 31, 2018
729b8d1
Move all Firestore Objective-C to Objective-C++ (#734)
wilhuff Jan 31, 2018
ac30522
Start on ArraySortedMap in C++ (#721)
wilhuff Jan 31, 2018
515625c
Remove predecessorKey,Object,Document, etc (#735)
wilhuff Feb 1, 2018
d45900b
Align tests and integration test header search paths (#737)
wilhuff Feb 1, 2018
47d81fd
fix (#739)
charlotteliang Feb 1, 2018
13f572e
Increase expectation timeout to 25 seconds. (#744)
mikelehen Feb 2, 2018
7422f62
fix null block execution crash
morganchen12 Feb 2, 2018
070c0ea
Merge pull request #746 from morganchen12/unguarded-block
morganchen12 Feb 2, 2018
32266c5
Make sure Firestore/core/include is in the podspec (#748)
wilhuff Feb 2, 2018
f124067
Eliminate sequencing dependencies
rsgowman Feb 2, 2018
15206e8
Skip 'update' step for external dependencies
rsgowman Jan 31, 2018
ace2ed1
Add ability to build nanopb and protobuf
rsgowman Jan 31, 2018
11d28d8
Add instructions for building nanopb protos
rsgowman Jan 31, 2018
78e16f5
Add generated nanopb protos.
rsgowman Jan 31, 2018
9a71ce8
Import "well-known" protos (and generated nanopb files)
rsgowman Feb 2, 2018
3fcdf51
Hook up nanopb to firestorep project
rsgowman Feb 2, 2018
d29a6db
style.sh now ignores generated nanopb files
rsgowman Feb 2, 2018
c896fab
./style.sh
rsgowman Feb 2, 2018
fd0b332
Downgrade nanopb from 0.4.0-dev to 0.3.8.
rsgowman Feb 5, 2018
189313e
Minor refactoring
rsgowman Feb 6, 2018
1176693
Ignore trailing whitespace in autogenerated nanopb files
rsgowman Feb 6, 2018
2885029
Update abseil-cpp to a new upstream (#754)
wilhuff Feb 6, 2018
582e4ba
Add StrCat, StrJoin and the rest of //strings from abseil-cpp (#756)
wilhuff Feb 6, 2018
53a1255
Merge commit 'abseil-mirror' into merge
wilhuff Feb 6, 2018
ef59c11
Merge branch 'abseil-mirror' into merge
wilhuff Feb 6, 2018
82a65ee
Fix xcode build errors re nanopb
rsgowman Feb 6, 2018
7cac9dc
Fix firebaes typo (#755)
paulb777 Feb 6, 2018
a441190
Implement Firestore DatabaseInfo and port both Database{Id,Info} C++ …
zxu123 Feb 6, 2018
20d6b9f
Merge pull request #757 from firebase/wilhuff/merge
wilhuff Feb 6, 2018
aa0dba7
Merge pull request #747 from firebase/rsgowman/nanopb
rsgowman Feb 6, 2018
b31fe35
C++ port: port FSTFieldPath and FSTResourcePath to C++ (#749)
var-const Feb 7, 2018
4b0dc13
Creating CHANGELOG for FCM (#764)
charlotteliang Feb 7, 2018
976635f
avoid using initWithSuiteName which does not support iOS 7 (#765)
charlotteliang Feb 7, 2018
e2293da
Updates version of Firebase Auth in Changelog (#771)
protocol86 Feb 7, 2018
2ad24f8
Update CHANGELOG for Firestore v0.10.1 (#768)
wilhuff Feb 8, 2018
ff3b5ca
Explicitly specify the default constructor to FieldPath (#773)
wilhuff Feb 8, 2018
ecef4aa
Update deprecation message for Firestore. (#758)
ryanwilson Feb 8, 2018
ac13e30
Version bumps for 4.9.0 (#774)
paulb777 Feb 8, 2018
274fe52
cmake build fixes (#770)
rsgowman Feb 9, 2018
633eb7b
Let Travis run for `CMake` test and `lint.sh` (#769)
zxu123 Feb 9, 2018
d70c23e
port Firestore Auth module in C++ (#733)
zxu123 Feb 9, 2018
bf45a15
port Firestore SnapshotVersion in C++ (#767)
zxu123 Feb 9, 2018
612d99c
Fix Core CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warnings (#779)
paulb777 Feb 9, 2018
8003348
C++ port: add C++ equivalent of FSTDocumentKey. (#762)
var-const Feb 10, 2018
fd83e07
Strawman C++ API (#763)
rsgowman Feb 12, 2018
4afcfb1
Move to explicit nil check. (#782)
ryanwilson Feb 12, 2018
adf9fb3
Update FieldValue of type Reference (#775)
zxu123 Feb 12, 2018
9504582
Port Firestore Document to C++ (#777)
zxu123 Feb 13, 2018
12faf20
Cleaning up implicit retain for the RTDB and Storage
schmidt-sebastian Feb 13, 2018
c7c51a7
Fix double parsing on 32 bit devices. (#787)
ryanwilson Feb 13, 2018
5f5f808
Keep track of number of queries in the query cache (#776)
Feb 13, 2018
6496eca
style fix
paulb777 Feb 13, 2018
b6613bd
Cleaning up implicit retain for the RTDB and Storage
schmidt-sebastian Feb 13, 2018
95d0411
fix flaky test (#788)
zxu123 Feb 13, 2018
2c10769
Fix off-by-one error in Auth changelog (#789)
paulb777 Feb 13, 2018
fe19fca
Serialize and deserialize null (#783)
rsgowman Feb 13, 2018
0f3c24b
Actually ignore events on inactive streams, rather than just logging …
Feb 14, 2018
933be73
Improve documentation on auto-init property in FCM. (#792)
charlotteliang Feb 14, 2018
e4be254
Fixed capitalization of init in test function. (#797)
ryanwilson Feb 14, 2018
0d6b540
Update README.md with code markup (#800)
ryanwilson Feb 14, 2018
6889850
Merge pull request #801 from firebase/release-4.9.0
paulb777 Feb 14, 2018
fd9fd27
replacing Auth/FSTUser by C++ auth implementation (#804)
zxu123 Feb 15, 2018
81ee594
DispatchQueue delayed callback improvements + testing (#784)
mikelehen Feb 16, 2018
7a97f6c
Enable -Wcomma for our build; disable it for abseil. (#799)
rsgowman Feb 16, 2018
7cddb97
Serialize (and deserialize) bool values (#791)
rsgowman Feb 16, 2018
ef55eef
Require official 1.4.0 for min CocoaPods version (#806)
paulb777 Feb 16, 2018
aa6f1ae
Disable -Wrange-loop-analysis for abseil (#807)
rsgowman Feb 16, 2018
a9f3f35
Delete stale Firestore instances after FIRApp is deleted. (#809)
ryanwilson Feb 16, 2018
7a4a2ea
replacing FSTGetTokenResult by C++ Token implementation (#805)
zxu123 Feb 20, 2018
9bf73ab
Fix two stream close issues (b/73167987, b/73382103). (#810)
mikelehen Feb 20, 2018
de00de2
[En|De]codeUnsignedVarint -> [En|De]codeVarint (#817)
rsgowman Feb 20, 2018
14ea068
Make FSTTimestamp into a public Firestore class (#698)
var-const Feb 20, 2018
67b068e
Fix implicit retain self warnings (#808)
rsgowman Feb 21, 2018
50f9df9
Accept FIRTimestamp where NSDate is currently accepted as a parameter…
var-const Feb 21, 2018
41dcd4b
Fix trivial mem leak in the test suite (#828)
rsgowman Feb 21, 2018
6ce954a
Serialize (and deserialize) int64 values (#818) (#829)
rsgowman Feb 22, 2018
935f3ca
Avoid wrapping and rewrapping NSStrings when constructing DatabaseId…
wilhuff Feb 22, 2018
4dc63f8
Fix Firestore tests for M22 (#834)
wilhuff Feb 22, 2018
442d46f
Avoid warnings about failing to override a designated initializer (#832)
wilhuff Feb 22, 2018
a21ccc6
address PR comments
morganchen12 Feb 22, 2018
ddc12c0
Merge pull request #694 from morganchen12/auth-docs
morganchen12 Feb 22, 2018
b5c60ad
Refactor [En|De]codeVarint to be symetric wrt tags (#837)
rsgowman Feb 22, 2018
f7d9f29
Fix lint warnings (#840)
wilhuff Feb 22, 2018
f75267b
Don't build firebase_firestore_testutil_apple on non-apple platforms.…
rsgowman Feb 22, 2018
db1cf74
Initial Carthage distribution instructions (#821)
paulb777 Feb 23, 2018
f735461
Update CHANGELOG for release (#845)
charlotteliang Feb 23, 2018
13e3667
Add build infrastructure for Codable support in Firestore (#815)
wilhuff Feb 26, 2018
dfda142
Move -messageWasLogged to FIRTestCase
bstpierr Feb 26, 2018
f851ca9
Add third-party library version registration
bstpierr Feb 26, 2018
d4ec105
Fixes clang warnings for Auth (#848)
protocol86 Feb 26, 2018
ac33d9b
Revert "Move -messageWasLogged to FIRTestCase"
bstpierr Feb 26, 2018
34dd1db
Add tests for useragent
bstpierr Feb 26, 2018
ac06a94
Auto-style swift sources (#847)
wilhuff Feb 26, 2018
6f5eebb
PR feedback
bstpierr Feb 26, 2018
bc9dacf
Add FirebaseCore version reporting
bstpierr Feb 26, 2018
e281a21
Deflake tests
bstpierr Feb 26, 2018
b18e09c
Merge pull request #850 from firebase/bs-useragent
bstpierr Feb 26, 2018
e9879a6
Merge branch 'master' into bs-firebasecore-version
bstpierr Feb 26, 2018
3f47579
Merge branch 'master' into bs-firebasecore-version
bstpierr Feb 26, 2018
c8d8699
Updating RTDB Changelog for v4.1..5
schmidt-sebastian Feb 26, 2018
d1f7cda
Update CHANGELOG.md
schmidt-sebastian Feb 26, 2018
3d03426
Style fixes
bstpierr Feb 26, 2018
37c70ec
Change library name
bstpierr Feb 26, 2018
add61e6
Update CHANGELOG.md
schmidt-sebastian Feb 26, 2018
992541b
Update CHANGELOG.md
schmidt-sebastian Feb 26, 2018
0960a06
Merge pull request #853 from firebase/schmidt-sebastian-patch-6
schmidt-sebastian Feb 26, 2018
26a78ec
Merge pull request #855 from firebase/schmidt-sebastian-patch-7
schmidt-sebastian Feb 26, 2018
1321688
Add XCode and Apple SDK versions
bstpierr Feb 26, 2018
6e73c78
Update CHANGELOG for Firestore v0.10.2 (#856)
wilhuff Feb 26, 2018
23a6f90
Manually fix clang-format issues
bstpierr Feb 27, 2018
11b431f
Remove unnecessary nonnull annotations
bstpierr Feb 27, 2018
e55079e
Merge pull request #851 from firebase/bs-firebasecore-version
bstpierr Feb 27, 2018
f3e412f
Update changelog for release (#857)
protocol86 Feb 27, 2018
a6c0e3f
Update Core CHANGELOG for 4.0.16 (#858)
paulb777 Feb 27, 2018
f058881
Convert cmake build to (mostly) use urls rather than git clones (#852)
rsgowman Feb 27, 2018
13aeb61
Eliminate TypedValue and serialize direct from FieldValue to bytes. (…
rsgowman Feb 27, 2018
3e7c062
replacing Auth by C++ auth implementation (#802)
zxu123 Feb 27, 2018
1ecf690
Add FieldValue.boolean_value() (#862)
rsgowman Feb 27, 2018
473506c
Merge remote-tracking branch 'origin/master' into firestore-api-changes
rsgowman Feb 28, 2018
7adedb3
style.sh (for swift)
rsgowman Feb 28, 2018
697980b
remove forward declarations for classes that no longer exist
rsgowman Mar 8, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ Pods/
Podfile.lock
*.xcworkspace

# Firestore's build configuration, as generated by CocoaPods
Firestore/core/src/firebase/firestore/util/config.h

# CMake
.downloads
Debug
Expand Down
39 changes: 36 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,46 @@ before_install:
- gem install xcpretty
- bundle exec pod install --project-directory=Example --repo-update
- bundle exec pod install --project-directory=Firestore/Example --no-repo-update
- brew install clang-format
- brew install swiftformat
- brew install cmake
- brew install go # Somehow the build for Abseil requires this.
- echo "$TRAVIS_COMMIT_RANGE"
- echo "$TRAVIS_PULL_REQUEST"
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
SKIP_FIREBASE=0
SKIP_FIRESTORE=0
else
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -Eq '^(Firebase|Example)'
SKIP_FIREBASE="$?"
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q Firestore
SKIP_FIRESTORE="$?"
fi

script:
- "! git grep -I ' $'" # Fail on trailing whitespace in non-binary files
- ./test.sh
# Fail on trailing whitespace in non-binary, non-generated-nanopb files
- "! git grep -I ' $' ':(exclude)Firestore/Protos/nanopb'"
- "! git grep -EL --name-only 'Copyright [0-9]{4}.*Google' | grep -v third_party | egrep '\\.(m|h|cc|mm|c)$'"
- ./scripts/style.sh test-only # Validate clang-format compliance
- |
if [ $SKIP_FIREBASE != 1 ]; then
./test.sh
fi
- |
if [ $SKIP_FIRESTORE != 1 ]; then
./scripts/lint.sh # Google C++ style compliance
fi
- |
if [ $SKIP_FIRESTORE != 1 ]; then
./Firestore/test.sh
fi

# TODO fix os_log deprecation warning in FIRLogger to remove --allow-warnings
- bundle exec pod lib lint FirebaseCore.podspec --allow-warnings
- |
if [ $SKIP_FIREBASE != 1 ]; then
bundle exec pod lib lint FirebaseCore.podspec --allow-warnings
fi

# TODO - Uncomment subsequent lines once FirebaseCore source repo is in public Specs repo
# - bundle exec pod lib lint FirebaseAuth.podspec
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ set(FIREBASE_INSTALL_DIR ${PROJECT_BINARY_DIR})
enable_testing()

include(external/FirebaseCore)

include(external/googletest)
include(external/leveldb)
include(external/grpc)
include(external/protobuf)
include(external/nanopb)
include(external/firestore)
72 changes: 72 additions & 0 deletions Carthage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Firebase Carthage

## Context

This page introduces and provides instructions for an **experimental** Firebase
[Carthage](https://github.com/Carthage/Carthage) implementation. Based on
feedback and usage, the Firebase team may decide to make the Carthage
distribution official.

FirebaseFirestore and FirebaseInvites are not yet supported from Carthage.
Please [let us know](https://github.com/firebase/firebase-ios-sdk/issues) if you
have suggestions about how best to distribute Carthage binaries that include
resource bundles.

## Carthage Installation

[Homebrew](http://brew.sh/) is one way to install Carthage.

```bash
$ brew update
$ brew install carthage
```

See the
[Carthage page](https://github.com/Carthage/Carthage#installing-carthage) for
more details and additional installation methods.

## Carthage Usage

- Create a Cartfile with a **subset** of the following components. Note that
**FirebaseAnalytics** must always be included.
```
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAdMobBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.json"
```
- Run `carthage update`
- Use Finder to open `Carthage/Build/iOS`.
- Copy the contents into the top level of your Xcode project and make sure
they're added to the right build target(s).
- Add the -ObjC flag to "Other Linker Flags".
- Make sure that the build target(s) includes your project's `GoogleService-Info.plist`.

## Versioning

Unlike the CocoaPods distribution, the Carthage distribution is like the
Firebase zip release in that all the Firebase components share the same version.
Mixing and matching components with different versions may cause linker errors.

## Static Frameworks

Note that the Firebase frameworks in the distribution include static libraries.
While it is fine to link these into apps, it will generally not work to depend
on them from wrapper dynamic frameworks.

## Acknowledgements

Thanks to the Firebase community for encouraging this implementation including
those who have made this the most updated
[firebase-ios-sdk](https://github.com/firebase/firebase-ios-sdk)
[issue](https://github.com/firebase/firebase-ios-sdk/issues/9).

Thanks also to those who have already done Firebase Carthage implementations,
such as https://github.com/soheilbm/Firebase.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/** @var gCreateNewObject
@brief A block that returns a new object everytime it is called.
*/
static id _Nullable (^gCreateNewObject)() = ^id _Nullable() {
static id _Nullable (^gCreateNewObject)(void) = ^id _Nullable() {
return [[NSObject alloc] init];
};

Expand Down
21 changes: 21 additions & 0 deletions Example/Core/Tests/FIRAppTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,27 @@ - (void)testIsAppConfigured {
XCTAssertFalse([FIRApp isDefaultAppConfigured]);
}

- (void)testIllegalLibraryName {
[FIRApp registerLibrary:@"Oops>" withVersion:@"1.0.0"];
XCTAssertTrue([[FIRApp firebaseUserAgent] isEqualToString:@""]);
}

- (void)testIllegalLibraryVersion {
[FIRApp registerLibrary:@"LegalName" withVersion:@"1.0.0+"];
XCTAssertTrue([[FIRApp firebaseUserAgent] isEqualToString:@""]);
}

- (void)testSingleLibrary {
[FIRApp registerLibrary:@"LegalName" withVersion:@"1.0.0"];
XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"LegalName/1.0.0"]);
}

- (void)testMultipleLibraries {
[FIRApp registerLibrary:@"LegalName" withVersion:@"1.0.0"];
[FIRApp registerLibrary:@"LegalName2" withVersion:@"2.0.0"];
XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"LegalName/1.0.0 LegalName2/2.0.0"]);
}

#pragma mark - private

- (NSDictionary<NSString *, NSObject *> *)expectedUserInfoWithAppName:(NSString *)name
Expand Down
8 changes: 4 additions & 4 deletions Example/Core/Tests/FIRLoggerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@

extern const char *kFIRLoggerCustomASLMessageFormat;

extern void FIRResetLogger();
extern void FIRResetLogger(void);

extern aslclient getFIRLoggerClient();
extern aslclient getFIRLoggerClient(void);

extern dispatch_queue_t getFIRClientQueue();
extern dispatch_queue_t getFIRClientQueue(void);

extern BOOL getFIRLoggerDebugMode();
extern BOOL getFIRLoggerDebugMode(void);

// Define the message format again to make sure the format doesn't accidentally change.
static NSString *const kCorrectASLMessageFormat =
Expand Down
50 changes: 27 additions & 23 deletions Example/Core/Tests/FIROptionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

@interface FIROptions (Test)

@property(nonatomic, readonly) NSDictionary *analyticsOptionsDictionary;
- (nullable NSDictionary *)analyticsOptionsDictionaryWithInfoDictionary:
(nullable NSDictionary *)infoDictionary;

@end

Expand Down Expand Up @@ -127,7 +128,7 @@ - (void)testInitCustomizedOptions {
#pragma clang diagnostic pop
}

- (void)testinitWithContentsOfFile {
- (void)testInitWithContentsOfFile {
NSString *filePath =
[[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
Expand Down Expand Up @@ -263,22 +264,20 @@ - (void)testAnalyticsConstants {
}

- (void)testAnalyticsOptions {
id mainBundleMock = OCMPartialMock([NSBundle mainBundle]);

// No keys anywhere.
NSDictionary *optionsDictionary = nil;
FIROptions *options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
NSDictionary *mainDictionary = nil;
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
NSDictionary *expectedAnalyticsOptions = @{};
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
NSDictionary *analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:nil];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

optionsDictionary = @{};
options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
mainDictionary = @{};
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = @{};
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

// Main has no keys.
optionsDictionary = @{
Expand All @@ -288,9 +287,9 @@ - (void)testAnalyticsOptions {
};
options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
mainDictionary = @{};
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = optionsDictionary;
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

// Main overrides all the keys.
optionsDictionary = @{
Expand All @@ -304,9 +303,9 @@ - (void)testAnalyticsOptions {
kFIRIsAnalyticsCollectionEnabled : @NO,
kFIRIsMeasurementEnabled : @NO
};
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = mainDictionary;
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

// Keys exist only in main.
optionsDictionary = @{};
Expand All @@ -316,9 +315,9 @@ - (void)testAnalyticsOptions {
kFIRIsAnalyticsCollectionEnabled : @YES,
kFIRIsMeasurementEnabled : @YES
};
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = mainDictionary;
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

// Main overrides single keys.
optionsDictionary = @{
Expand All @@ -328,13 +327,13 @@ - (void)testAnalyticsOptions {
};
options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
mainDictionary = @{ kFIRIsAnalyticsCollectionDeactivated : @NO };
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = @{
kFIRIsAnalyticsCollectionDeactivated : @NO, // override
kFIRIsAnalyticsCollectionEnabled : @YES,
kFIRIsMeasurementEnabled : @YES
};
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

optionsDictionary = @{
kFIRIsAnalyticsCollectionDeactivated : @YES,
Expand All @@ -343,13 +342,13 @@ - (void)testAnalyticsOptions {
};
options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
mainDictionary = @{ kFIRIsAnalyticsCollectionEnabled : @NO };
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = @{
kFIRIsAnalyticsCollectionDeactivated : @YES,
kFIRIsAnalyticsCollectionEnabled : @NO, // override
kFIRIsMeasurementEnabled : @YES
};
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

optionsDictionary = @{
kFIRIsAnalyticsCollectionDeactivated : @YES,
Expand All @@ -358,18 +357,18 @@ - (void)testAnalyticsOptions {
};
options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
mainDictionary = @{ kFIRIsMeasurementEnabled : @NO };
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);
expectedAnalyticsOptions = @{
kFIRIsAnalyticsCollectionDeactivated : @YES,
kFIRIsAnalyticsCollectionEnabled : @YES,
kFIRIsMeasurementEnabled : @NO // override
};
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);
analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);
}

- (void)testAnalyticsOptions_combinatorial {
// Complete combinatorial test.
id mainBundleMock = OCMPartialMock([NSBundle mainBundle]);

// Possible values for the flags in the plist, where NSNull means the flag is not present.
NSArray *values = @[ [NSNull null], @NO, @YES ];

Expand Down Expand Up @@ -398,6 +397,7 @@ - (void)testAnalyticsOptions_combinatorial {
if (![optionsMeasurementEnabled isEqual:[NSNull null]]) {
optionsDictionary[kFIRIsMeasurementEnabled] = optionsMeasurementEnabled;
}

FIROptions *options =
[[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary];
if (![uniqueOptionsCombinations containsObject:optionsDictionary]) {
Expand All @@ -415,7 +415,8 @@ - (void)testAnalyticsOptions_combinatorial {
if (![mainMeasurementEnabled isEqual:[NSNull null]]) {
mainDictionary[kFIRIsMeasurementEnabled] = mainMeasurementEnabled;
}
OCMExpect([mainBundleMock infoDictionary]).andReturn(mainDictionary);

// Add mainDictionary to uniqueMainCombinations if it isn't included yet.
if (![uniqueMainCombinations containsObject:mainDictionary]) {
[uniqueMainCombinations addObject:mainDictionary];
}
Expand All @@ -427,7 +428,10 @@ - (void)testAnalyticsOptions_combinatorial {
NSMutableDictionary *expectedAnalyticsOptions =
[[NSMutableDictionary alloc] initWithDictionary:optionsDictionary];
[expectedAnalyticsOptions addEntriesFromDictionary:mainDictionary];
XCTAssertEqualObjects(options.analyticsOptionsDictionary, expectedAnalyticsOptions);

NSDictionary *analyticsOptions =
[options analyticsOptionsDictionaryWithInfoDictionary:mainDictionary];
XCTAssertEqualObjects(analyticsOptions, expectedAnalyticsOptions);

combinationCount++;
}
Expand Down
6 changes: 5 additions & 1 deletion Example/Database/Tests/Integration/FData.m
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ - (void) testLargeNumericKeysDontGetTurnedIntoArrays {
[[ref child:@"100003354884401"] setValue:@"alpha"];

__block BOOL ready = NO;
[ref observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) {
[ref observeSingleEventOfType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) {
id val = [snapshot value];
XCTAssertTrue([val isKindOfClass:[NSDictionary class]], @"Expected a dictionary.");
ready = YES;
Expand Down Expand Up @@ -678,6 +678,8 @@ - (void) testSetAndThenListenForValueEventsAreCorrect {
[self waitUntil:^BOOL{
return setDone && calls == 1;
}];

[node removeAllObservers];
}

- (void) testHasChildrenWorksCorrectly {
Expand Down Expand Up @@ -878,6 +880,7 @@ - (void) testListenForValueAndThenWriteOnANodeWithExistingData {
[self waitUntil:^BOOL{
return calls == 1;
}];
[reader removeAllObservers];
}

- (void) testSetPriorityOnNonexistentNodeFails {
Expand Down Expand Up @@ -2208,6 +2211,7 @@ - (void) testParentDeleteShadowsChildListeners {
}];

WAIT_FOR(done);
[deleter removeAllObservers];
}

- (void) testParentDeleteShadowsChildListenersWithNonDefaultQuery {
Expand Down
Loading