Przeglądaj źródła

Merge integrated open source build updates from master (#491)

Paul Beusterien 8 lat temu
rodzic
commit
4365bed449
100 zmienionych plików z 1571 dodań i 1980 usunięć
  1. 8 2
      .travis.yml
  2. 0 484
      BuildFrameworks/FrameworkMaker.xcodeproj/project.pbxproj
  3. 0 91
      BuildFrameworks/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_iOS.xcscheme
  4. 0 91
      BuildFrameworks/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_macOS.xcscheme
  5. 0 20
      BuildFrameworks/Podfile
  6. 0 38
      BuildFrameworks/README.md
  7. 0 209
      BuildFrameworks/build.swift
  8. 0 49
      BuildFrameworks/iOS-Info.plist
  9. 0 32
      BuildFrameworks/macOS-Info.plist
  10. 62 0
      CMAKE.md
  11. 33 0
      CMakeLists.txt
  12. 2 1
      Example/Auth/App/tvOS/AppDelegate.m
  13. 3 2
      Example/Auth/Sample/ApplicationDelegate.m
  14. 116 10
      Example/Auth/Sample/MainViewController.m
  15. 1 1
      Example/Auth/Sample/SettingsViewController.m
  16. 1 1
      Example/Auth/SwiftSample/AppDelegate.swift
  17. 1 1
      Example/Auth/SwiftSample/Stubs.swift
  18. 1 1
      Example/Auth/SwiftSample/ViewController.swift
  19. 1 1
      Example/Auth/Tests/FIRApp+FIRAuthUnitTests.h
  20. 1 1
      Example/Auth/Tests/FIRApp+FIRAuthUnitTests.m
  21. 183 6
      Example/Auth/Tests/FIRAuthTests.m
  22. 1 1
      Example/Auth/Tests/FIRPhoneAuthProviderTests.m
  23. 6 5
      Example/Auth/Tests/FIRUserTests.m
  24. 2 1
      Example/Core/App/iOS/FIRAppDelegate.m
  25. 1 1
      Example/Core/App/tvOS/AppDelegate.m
  26. 1 1
      Example/Core/Tests/FIRAppAssociationRegistrationUnitTests.m
  27. 2 2
      Example/Core/Tests/FIRAppTest.m
  28. 1 1
      Example/Core/Tests/FIRBundleUtilTest.m
  29. 1 1
      Example/Core/Tests/FIRLoggerTest.m
  30. 3 3
      Example/Core/Tests/FIROptionsTest.m
  31. 3 1
      Example/Database/Tests/Helpers/FDevice.m
  32. 3 1
      Example/Database/Tests/Helpers/FEventTester.m
  33. 3 2
      Example/Database/Tests/Helpers/FTestBase.m
  34. 3 2
      Example/Database/Tests/Integration/FConnectionTest.m
  35. 3 1
      Example/Database/Tests/Integration/FIRAuthTests.m
  36. 3 1
      Example/Database/Tests/Integration/FIRDatabaseTests.m
  37. 3 1
      Example/Database/Tests/Unit/FSyncPointTests.m
  38. 274 324
      Example/Firebase.xcodeproj/project.pbxproj
  39. 2 1
      Example/Messaging/App/iOS/AppDelegate.swift
  40. 1 1
      Example/Messaging/App/iOS/MessagingViewController.swift
  41. 1 1
      Example/Messaging/App/iOS/NotificationsController.swift
  42. 1 1
      Example/Messaging/Tests/FIRMessagingClientTest.m
  43. 77 80
      Example/Podfile
  44. 1 5
      Example/Shared/FIRSampleAppUtilities.m
  45. 2 0
      Example/Storage/App/iOS/FIRAppDelegate.m
  46. 2 1
      Example/Storage/App/tvOS/AppDelegate.m
  47. 1 1
      Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m
  48. 1 1
      Example/Storage/Tests/Unit/FIRStorageMetadataTests.m
  49. 1 1
      Example/Storage/Tests/Unit/FIRStorageTokenAuthorizerTests.m
  50. 4 4
      Example/tvOSSample/Podfile
  51. 33 35
      Example/tvOSSample/tvOSSample.xcodeproj/project.pbxproj
  52. 1 1
      Example/tvOSSample/tvOSSample/AppDelegate.swift
  53. 1 1
      Example/tvOSSample/tvOSSample/AuthLoginViewController.swift
  54. 1 1
      Example/tvOSSample/tvOSSample/AuthViewController.swift
  55. 1 1
      Example/tvOSSample/tvOSSample/DatabaseViewController.swift
  56. 1 1
      Example/tvOSSample/tvOSSample/EmailLoginViewController.swift
  57. 1 1
      Example/tvOSSample/tvOSSample/StorageViewController.swift
  58. 1 1
      Firebase/Auth/Source/FIRAdditionalUserInfo.m
  59. 1 1
      Firebase/Auth/Source/FIRAdditionalUserInfo_Internal.h
  60. 169 28
      Firebase/Auth/Source/FIRAuth.m
  61. 2 2
      Firebase/Auth/Source/FirebaseAuthVersion.m
  62. 90 0
      Firebase/Auth/Source/Public/FIRAuth.h
  63. 2 2
      Firebase/Auth/Source/Public/FirebaseAuthVersion.h
  64. 2 2
      Firebase/Auth/Source/RPCs/FIRAuthBackend.m
  65. 0 29
      Firebase/Core/FirebaseCore.podspec
  66. 3 0
      Firebase/Database/CHANGELOG.md
  67. 0 77
      Firebase/Firebase/FirebaseCommunity.h
  68. 0 6
      Firebase/Firebase/module.modulemap
  69. 0 17
      Firebase/Messaging/FIRMessagingDataMessageManager.m
  70. 3 0
      Firebase/Storage/CHANGELOG.md
  71. 68 0
      FirebaseAuth.podspec
  72. 0 116
      FirebaseCommunity.podspec
  73. 32 0
      FirebaseCore.podspec
  74. 40 0
      FirebaseDatabase.podspec
  75. 64 0
      FirebaseFirestore.podspec
  76. 46 0
      FirebaseMessaging.podspec
  77. 38 0
      FirebaseStorage.podspec
  78. 18 0
      Firestore/CMakeLists.txt
  79. 21 65
      Firestore/Example/Firestore.xcodeproj/project.pbxproj
  80. 11 5
      Firestore/Example/Podfile
  81. 1 1
      Firestore/Example/SwiftBuildTest/main.swift
  82. 2 2
      Firestore/Example/Tests/API/FIRGeoPointTests.m
  83. 2 2
      Firestore/Example/Tests/Core/FSTDatabaseInfoTests.m
  84. 6 6
      Firestore/Example/Tests/Core/FSTEventManagerTests.m
  85. 9 9
      Firestore/Example/Tests/Core/FSTQueryListenerTests.m
  86. 7 7
      Firestore/Example/Tests/Core/FSTQueryTests.m
  87. 1 1
      Firestore/Example/Tests/Core/FSTSyncEngine+Testing.h
  88. 1 1
      Firestore/Example/Tests/Core/FSTTargetIDGeneratorTests.m
  89. 3 3
      Firestore/Example/Tests/Core/FSTTimestampTests.m
  90. 6 6
      Firestore/Example/Tests/Core/FSTViewSnapshotTest.m
  91. 12 12
      Firestore/Example/Tests/Core/FSTViewTests.m
  92. 26 26
      Firestore/Example/Tests/GoogleTest/FSTGoogleTestTests.mm
  93. 2 2
      Firestore/Example/Tests/Integration/API/FIRCursorTests.m
  94. 4 4
      Firestore/Example/Tests/Integration/API/FIRDatabaseTests.m
  95. 3 3
      Firestore/Example/Tests/Integration/API/FIRFieldsTests.m
  96. 4 4
      Firestore/Example/Tests/Integration/API/FIRListenerRegistrationTests.m
  97. 3 3
      Firestore/Example/Tests/Integration/API/FIRQueryTests.m
  98. 4 4
      Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.m
  99. 2 2
      Firestore/Example/Tests/Integration/API/FIRTypeTests.m
  100. 3 3
      Firestore/Example/Tests/Integration/API/FIRValidationTests.m

+ 8 - 2
.travis.yml

@@ -16,9 +16,15 @@ before_install:
 script:
   - "! git grep -I ' $'" # Fail on trailing whitespace in non-binary files
   - ./test.sh
-  - bundle exec pod lib lint FirebaseCommunity.podspec --allow-warnings #pending #390 fix
+  - bundle exec pod lib lint FirebaseCore.podspec
+
+# TODO - Uncomment subsequent lines once FirebaseCore source repo is in public Specs repo
+#  - bundle exec pod lib lint FirebaseAuth.podspec
+#  - bundle exec pod lib lint FirebaseDatabase.podspec
+#  - bundle exec pod lib lint FirebaseMessaging.podspec --allow-warnings #pending #390 fix
+#  - bundle exec pod lib lint FirebaseStorage.podspec
+#  - bundle exec pod lib lint Firestore/Firestore.podspec
 
 branches:
   only:
     - master
-

+ 0 - 484
BuildFrameworks/FrameworkMaker.xcodeproj/project.pbxproj

@@ -1,484 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		03BED32F297D77A489B80DBA /* libPods-FrameworkMaker_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 93482F41CCA683759459AC1E /* libPods-FrameworkMaker_macOS.a */; };
-		621808027FC20B1A1B769E50 /* libPods-FrameworkMaker_iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AB2E4F8834D5EA87A8F7124C /* libPods-FrameworkMaker_iOS.a */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		01F29B956E7F6E45EF34DE72 /* Pods-FrameworkMaker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker.release.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker/Pods-FrameworkMaker.release.xcconfig"; sourceTree = "<group>"; };
-		04058317A2F1A863FB91F84F /* Pods-FrameworkMaker_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS.release.xcconfig"; sourceTree = "<group>"; };
-		05A46BD71CC9B2BE007BDB33 /* FrameworkMaker_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FrameworkMaker_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		1D25AC01A0F56F8BC5375DD2 /* libPods-FrameworkMaker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameworkMaker.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-		5BDF11E206B3015647181AB8 /* Pods-FrameworkMaker_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS.debug.xcconfig"; sourceTree = "<group>"; };
-		93482F41CCA683759459AC1E /* libPods-FrameworkMaker_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameworkMaker_macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-		AB2E4F8834D5EA87A8F7124C /* libPods-FrameworkMaker_iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameworkMaker_iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-		B9CD818DD62BFDAC11008E2A /* Pods-FrameworkMaker_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker_macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker_macOS/Pods-FrameworkMaker_macOS.debug.xcconfig"; sourceTree = "<group>"; };
-		C8DA4EE8A169B227B0576C02 /* Pods-FrameworkMaker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker/Pods-FrameworkMaker.debug.xcconfig"; sourceTree = "<group>"; };
-		D013F9FF1ED9EB9900FD68A9 /* FrameworkMaker_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FrameworkMaker_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		D013FA131ED9EC0B00FD68A9 /* iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS-Info.plist"; sourceTree = "<group>"; };
-		D013FA141ED9EC1500FD68A9 /* macOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "macOS-Info.plist"; sourceTree = "<group>"; };
-		DD9F6D0B1597A9F327565EDE /* Pods-FrameworkMaker_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker_macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker_macOS/Pods-FrameworkMaker_macOS.release.xcconfig"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		05A46BD41CC9B2BE007BDB33 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				621808027FC20B1A1B769E50 /* libPods-FrameworkMaker_iOS.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		D013F9FC1ED9EB9900FD68A9 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				03BED32F297D77A489B80DBA /* libPods-FrameworkMaker_macOS.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		05A46BCE1CC9B2BE007BDB33 = {
-			isa = PBXGroup;
-			children = (
-				D013FA131ED9EC0B00FD68A9 /* iOS-Info.plist */,
-				D013FA141ED9EC1500FD68A9 /* macOS-Info.plist */,
-				05A46BD81CC9B2BE007BDB33 /* Products */,
-				AA03828B8B59297B5A3389B0 /* Pods */,
-				D3884AD1918E82D7FD21433D /* Frameworks */,
-			);
-			sourceTree = "<group>";
-		};
-		05A46BD81CC9B2BE007BDB33 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				05A46BD71CC9B2BE007BDB33 /* FrameworkMaker_iOS.app */,
-				D013F9FF1ED9EB9900FD68A9 /* FrameworkMaker_macOS.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		AA03828B8B59297B5A3389B0 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				C8DA4EE8A169B227B0576C02 /* Pods-FrameworkMaker.debug.xcconfig */,
-				01F29B956E7F6E45EF34DE72 /* Pods-FrameworkMaker.release.xcconfig */,
-				5BDF11E206B3015647181AB8 /* Pods-FrameworkMaker_iOS.debug.xcconfig */,
-				04058317A2F1A863FB91F84F /* Pods-FrameworkMaker_iOS.release.xcconfig */,
-				B9CD818DD62BFDAC11008E2A /* Pods-FrameworkMaker_macOS.debug.xcconfig */,
-				DD9F6D0B1597A9F327565EDE /* Pods-FrameworkMaker_macOS.release.xcconfig */,
-			);
-			name = Pods;
-			sourceTree = "<group>";
-		};
-		D3884AD1918E82D7FD21433D /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1D25AC01A0F56F8BC5375DD2 /* libPods-FrameworkMaker.a */,
-				AB2E4F8834D5EA87A8F7124C /* libPods-FrameworkMaker_iOS.a */,
-				93482F41CCA683759459AC1E /* libPods-FrameworkMaker_macOS.a */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		05A46BD61CC9B2BE007BDB33 /* FrameworkMaker_iOS */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 05A46BEE1CC9B2BE007BDB33 /* Build configuration list for PBXNativeTarget "FrameworkMaker_iOS" */;
-			buildPhases = (
-				AC1C2B143A86214CE77C9932 /* [CP] Check Pods Manifest.lock */,
-				05A46BD31CC9B2BE007BDB33 /* Sources */,
-				05A46BD41CC9B2BE007BDB33 /* Frameworks */,
-				05A46BD51CC9B2BE007BDB33 /* Resources */,
-				11182BBE1E5DB1C0F58623BB /* [CP] Embed Pods Frameworks */,
-				5040608D1004852F08A22A14 /* [CP] Copy Pods Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = FrameworkMaker_iOS;
-			productName = FrameworkMaker;
-			productReference = 05A46BD71CC9B2BE007BDB33 /* FrameworkMaker_iOS.app */;
-			productType = "com.apple.product-type.application";
-		};
-		D013F9FE1ED9EB9900FD68A9 /* FrameworkMaker_macOS */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = D013FA121ED9EB9900FD68A9 /* Build configuration list for PBXNativeTarget "FrameworkMaker_macOS" */;
-			buildPhases = (
-				76A7EF97A6A2306CED685487 /* [CP] Check Pods Manifest.lock */,
-				D013F9FB1ED9EB9900FD68A9 /* Sources */,
-				D013F9FC1ED9EB9900FD68A9 /* Frameworks */,
-				D013F9FD1ED9EB9900FD68A9 /* Resources */,
-				83F5D2024D97A1D542B7932F /* [CP] Embed Pods Frameworks */,
-				C712E44DB1FAE1B023552B35 /* [CP] Copy Pods Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = FrameworkMaker_macOS;
-			productName = FrameworkMaker_macOS;
-			productReference = D013F9FF1ED9EB9900FD68A9 /* FrameworkMaker_macOS.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		05A46BCF1CC9B2BE007BDB33 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0730;
-				ORGANIZATIONNAME = "Google, Inc.";
-				TargetAttributes = {
-					05A46BD61CC9B2BE007BDB33 = {
-						CreatedOnToolsVersion = 7.3;
-					};
-					D013F9FE1ED9EB9900FD68A9 = {
-						CreatedOnToolsVersion = 8.3.2;
-						ProvisioningStyle = Automatic;
-					};
-				};
-			};
-			buildConfigurationList = 05A46BD21CC9B2BE007BDB33 /* Build configuration list for PBXProject "FrameworkMaker" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				Base,
-			);
-			mainGroup = 05A46BCE1CC9B2BE007BDB33;
-			productRefGroup = 05A46BD81CC9B2BE007BDB33 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				05A46BD61CC9B2BE007BDB33 /* FrameworkMaker_iOS */,
-				D013F9FE1ED9EB9900FD68A9 /* FrameworkMaker_macOS */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		05A46BD51CC9B2BE007BDB33 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		D013F9FD1ED9EB9900FD68A9 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		11182BBE1E5DB1C0F58623BB /* [CP] Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "[CP] Embed Pods Frameworks";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		5040608D1004852F08A22A14 /* [CP] Copy Pods Resources */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "[CP] Copy Pods Resources";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS-resources.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		76A7EF97A6A2306CED685487 /* [CP] Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
-				"${PODS_ROOT}/Manifest.lock",
-			);
-			name = "[CP] Check Pods Manifest.lock";
-			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-FrameworkMaker_macOS-checkManifestLockResult.txt",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
-			showEnvVarsInLog = 0;
-		};
-		83F5D2024D97A1D542B7932F /* [CP] Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "[CP] Embed Pods Frameworks";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_macOS/Pods-FrameworkMaker_macOS-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		AC1C2B143A86214CE77C9932 /* [CP] Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
-				"${PODS_ROOT}/Manifest.lock",
-			);
-			name = "[CP] Check Pods Manifest.lock";
-			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-FrameworkMaker_iOS-checkManifestLockResult.txt",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
-			showEnvVarsInLog = 0;
-		};
-		C712E44DB1FAE1B023552B35 /* [CP] Copy Pods Resources */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "[CP] Copy Pods Resources";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_macOS/Pods-FrameworkMaker_macOS-resources.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		05A46BD31CC9B2BE007BDB33 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		D013F9FB1ED9EB9900FD68A9 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		05A46BEC1CC9B2BE007BDB33 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				MACOSX_DEPLOYMENT_TARGET = 10.10;
-				MTL_ENABLE_DEBUG_INFO = YES;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		05A46BED1CC9B2BE007BDB33 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				MACOSX_DEPLOYMENT_TARGET = 10.10;
-				MTL_ENABLE_DEBUG_INFO = NO;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		05A46BEF1CC9B2BE007BDB33 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = 5BDF11E206B3015647181AB8 /* Pods-FrameworkMaker_iOS.debug.xcconfig */;
-			buildSettings = {
-				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				INFOPLIST_FILE = "$(SRCROOT)/iOS-Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = "google.FrameworkMaker-iOS";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		05A46BF01CC9B2BE007BDB33 /* Release */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = 04058317A2F1A863FB91F84F /* Pods-FrameworkMaker_iOS.release.xcconfig */;
-			buildSettings = {
-				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				INFOPLIST_FILE = "$(SRCROOT)/iOS-Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = "google.FrameworkMaker-iOS";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		D013FA101ED9EB9900FD68A9 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = B9CD818DD62BFDAC11008E2A /* Pods-FrameworkMaker_macOS.debug.xcconfig */;
-			buildSettings = {
-				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				COMBINE_HIDPI_IMAGES = YES;
-				INFOPLIST_FILE = "$(SRCROOT)/macOS-Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = "com.google.FrameworkMaker-macOS";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-			};
-			name = Debug;
-		};
-		D013FA111ED9EB9900FD68A9 /* Release */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = DD9F6D0B1597A9F327565EDE /* Pods-FrameworkMaker_macOS.release.xcconfig */;
-			buildSettings = {
-				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				COMBINE_HIDPI_IMAGES = YES;
-				INFOPLIST_FILE = "$(SRCROOT)/macOS-Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = "com.google.FrameworkMaker-macOS";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		05A46BD21CC9B2BE007BDB33 /* Build configuration list for PBXProject "FrameworkMaker" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				05A46BEC1CC9B2BE007BDB33 /* Debug */,
-				05A46BED1CC9B2BE007BDB33 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		05A46BEE1CC9B2BE007BDB33 /* Build configuration list for PBXNativeTarget "FrameworkMaker_iOS" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				05A46BEF1CC9B2BE007BDB33 /* Debug */,
-				05A46BF01CC9B2BE007BDB33 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		D013FA121ED9EB9900FD68A9 /* Build configuration list for PBXNativeTarget "FrameworkMaker_macOS" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				D013FA101ED9EB9900FD68A9 /* Debug */,
-				D013FA111ED9EB9900FD68A9 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 05A46BCF1CC9B2BE007BDB33 /* Project object */;
-}

+ 0 - 91
BuildFrameworks/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_iOS.xcscheme

@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0830"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
-               BuildableName = "FrameworkMaker_iOS.app"
-               BlueprintName = "FrameworkMaker_iOS"
-               ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
-            BuildableName = "FrameworkMaker_iOS.app"
-            BlueprintName = "FrameworkMaker_iOS"
-            ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
-            BuildableName = "FrameworkMaker_iOS.app"
-            BlueprintName = "FrameworkMaker_iOS"
-            ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
-            BuildableName = "FrameworkMaker_iOS.app"
-            BlueprintName = "FrameworkMaker_iOS"
-            ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 0 - 91
BuildFrameworks/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_macOS.xcscheme

@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0830"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
-               BuildableName = "FrameworkMaker_macOS.app"
-               BlueprintName = "FrameworkMaker_macOS"
-               ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
-            BuildableName = "FrameworkMaker_macOS.app"
-            BlueprintName = "FrameworkMaker_macOS"
-            ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
-            BuildableName = "FrameworkMaker_macOS.app"
-            BlueprintName = "FrameworkMaker_macOS"
-            ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
-            BuildableName = "FrameworkMaker_macOS.app"
-            BlueprintName = "FrameworkMaker_macOS"
-            ReferencedContainer = "container:FrameworkMaker.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 0 - 20
BuildFrameworks/Podfile

@@ -1,20 +0,0 @@
-project 'FrameworkMaker.xcodeproj'
-
-target 'FrameworkMaker_iOS' do
-  platform :ios, '7.0'
-
-  pod 'FirebaseAuth', :path => '../Firebase/Auth'
-  pod 'FirebaseCore', :path => '../Firebase/Core'
-  pod 'FirebaseDatabase', :path => '../Firebase/Database'
-  pod 'FirebaseMessaging', :path => '../Firebase/Messaging'
-  pod 'FirebaseStorage', :path => '../Firebase/Storage'
-end
-
-target 'FrameworkMaker_macOS' do
-  platform :osx, '10.10'
-
-  pod 'FirebaseAuth', :path => '../Firebase/Auth'
-  pod 'FirebaseCore', :path => '../Firebase/Core'
-  pod 'FirebaseDatabase', :path => '../Firebase/Database'
-  pod 'FirebaseStorage', :path => '../Firebase/Storage'
-end

+ 0 - 38
BuildFrameworks/README.md

@@ -1,38 +0,0 @@
-# Build Firebase static frameworks
-
-[build.swift](build.swift) is a script that will build a static framework for
-one or more of FirebaseAuth, FirebaseCore, FirebaseDatabase, FirebaseMessaging,
-and FirebaseStorage.
-
-Frameworks built with this script can be used alongside the official [Firebase
-CocoaPods](https://cocoapods.org/pods/Firebase) and
-[zip](https://firebase.google.com/docs/ios/setup#frameworks) distributions.
-
-
-## Usage
-
-The CocoaPods version must be at least 1.3.1.
-
-```
-$ pod --version
-```
-
-```
-$ ./build.swift -f FirebaseAuth -f FirebaseMessaging ....
-```
-or
-```
-$ ./build.swift -all
-```
-
-The script will output the location of the new frameworks when it finishes
-the build.
-
-
-## Issues
-
-* Xcode's module cache may not properly update after a framework is replaced.
-The workaround is `rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache/`
-
-* To replace the 4.0.0 version of FirebaseDatabase, the leveldb-library pod
-will need to be linked in. Add `pod 'leveldb-library'` to your Podfile.

+ 0 - 209
BuildFrameworks/build.swift

@@ -1,209 +0,0 @@
-#!/usr/bin/env xcrun swift
-
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Foundation
-
-enum Colors: String {
-  case black = "\u{001B}[0;30m"
-  case red = "\u{001B}[0;31m"
-  case green = "\u{001B}[0;32m"
-  case yellow = "\u{001B}[0;33m"
-  case blue = "\u{001B}[0;34m"
-  case magenta = "\u{001B}[0;35m"
-  case cyan = "\u{001B}[0;36m"
-  case white = "\u{001B}[0;37m"
-}
-
-func colorPrint(color: Colors, text: String) {
-  print(color.rawValue + text + "\u{001B}[0;0m")
-}
-
-enum Platform: String {
-  case iOS
-  case macOS
-  case tvOS
-  case watchOS
-}
-
-let allFrameworks: [String: [Platform]] = [
-  "FirebaseAuth": [.iOS, .macOS],
-  "FirebaseCore": [.iOS, .macOS],
-  "FirebaseDatabase": [.iOS, .macOS],
-  "FirebaseMessaging": [.iOS],
-  "FirebaseStorage": [.iOS, .macOS]
-]
-
-let currentDirectoryURL = URL(fileURLWithPath: FileManager.default.currentDirectoryPath)
-let url = URL(fileURLWithPath: CommandLine.arguments[0], relativeTo: currentDirectoryURL)
-let commandPath = url.deletingLastPathComponent().path
-
-func usage() -> Never {
-  print("usage: ./build.swift -f {framework1} -f {framework2} ....")
-  print("usage: ./build.swift -all")
-  print("Valid frameworks are \(allFrameworks)")
-  exit(1)
-}
-
-func processOptions() -> [String] {
-  guard CommandLine.arguments.count > 1 else {
-    usage()
-  }
-  var doFrameworks = [String]()
-  var optIndex = 1
-  whileLoop: while optIndex < CommandLine.arguments.count {
-    switch CommandLine.arguments[optIndex] {
-    case "-all":
-      guard doFrameworks.count == 0, CommandLine.arguments.count == 2 else {
-        colorPrint(color:Colors.red, text:"-all must be a solo option")
-        usage()
-      }
-      doFrameworks = Array(allFrameworks.keys)
-      break whileLoop
-    case "-f":
-      optIndex += 1
-      guard optIndex < CommandLine.arguments.count else {
-        colorPrint(color:Colors.red, text:"The -f option must be followed by a framework name")
-        usage()
-      }
-      let framework = CommandLine.arguments[optIndex]
-      guard allFrameworks.keys.contains(framework) else {
-        colorPrint(color:Colors.red, text:"\(framework) is not a valid framework")
-        usage()
-      }
-      doFrameworks += [framework]
-      optIndex += 1
-    default:
-      colorPrint(color:Colors.red, text: "Invalid option: \(CommandLine.arguments[optIndex])")
-      usage()
-    }
-  }
-  return doFrameworks
-}
-
-func tempDir() -> String {
-  let directory = NSTemporaryDirectory()
-  let fileName = NSUUID().uuidString
-  guard let dir = NSURL.fileURL(withPathComponents:[directory, fileName]) else {
-    colorPrint(color:Colors.red, text:"Failed to create temp directory")
-    exit(1)
-  }
-  return dir.path
-}
-
-func syncExec(command: String, args: [String] = []) {
-  let task = Process()
-  task.launchPath = command
-  task.arguments = args
-  task.currentDirectoryPath = commandPath
-  task.launch()
-  task.waitUntilExit()
-  guard (task.terminationStatus == 0) else {
-    colorPrint(color:Colors.red, text:"Command failed:")
-    colorPrint(color:Colors.red, text:command + " " + args.joined(separator:" "))
-    exit(1)
-  }
-}
-
-func buildThin(framework: String, multiplatform: Bool, arch: String, multisdk: Bool, sdk: String, parentDir: String) -> [String] {
-  let schemeSuffix: String
-  if !multiplatform {
-    schemeSuffix = ""
-  } else if sdk.hasPrefix("mac") {
-    schemeSuffix = "-macOS"
-  } else if sdk.hasPrefix("iphone") {
-    schemeSuffix = "-iOS"
-  } else {
-    fatalError("TODO: tvOS/watchOS")
-  }
-
-  let buildDir = parentDir + "/" + arch
-  let standardOptions = [ "build",
-                          "-configuration", "release",
-                          "-workspace", "FrameworkMaker.xcworkspace",
-                          "-scheme", framework + schemeSuffix,
-                          "GCC_GENERATE_DEBUGGING_SYMBOLS=No"]
-  let bitcode = (sdk == "iphoneos") ? ["OTHER_CFLAGS=\"" + "-fembed-bitcode\""] : []
-  let args = standardOptions + ["ARCHS=" + arch, "BUILD_DIR=" + buildDir, "-sdk", sdk] + bitcode
-  syncExec(command:"/usr/bin/xcodebuild", args:args)
-  let sdk = multisdk ? "-\(sdk)" : ""
-  return [buildDir + "/Release" + sdk + "/" + framework + schemeSuffix + "/lib" + framework + schemeSuffix + ".a"]
-}
-
-func createFile(file: String, content: String) {
-  let data = content.data(using:String.Encoding.utf8)
-  guard FileManager.default.createFile(atPath:file, contents: data, attributes: nil) else {
-    print("Error creating " + file)
-    exit(1)
-  }
-}
-
-// TODO: Add support for adding library and framework dependencies to makeModuleMap
-func makeModuleMap(framework: String, dir: String) {
-  let moduleDir = dir + "/Modules"
-  syncExec(command:"/bin/mkdir", args:["-p", moduleDir])
-  let moduleFile = moduleDir + "/module.modulemap"
-  let content = "framework module " + framework + " {\n" +
-    "  umbrella header \"" + framework + ".h\"\n" +
-    "  export *\n" +
-    "  module * { export *}\n" +
-    "}\n"
-  createFile(file:moduleFile, content:content)
-}
-
-func buildFramework(withName framework: String, multiplatform: Bool, platform: Platform, outputDir: String) {
-  let buildDir = tempDir()
-  var thinArchives = [String]()
-  switch platform {
-  case .iOS:
-    thinArchives += buildThin(framework:framework, multiplatform: multiplatform, arch:"arm64", multisdk: true, sdk:"iphoneos", parentDir:buildDir)
-    thinArchives += buildThin(framework:framework, multiplatform: multiplatform, arch:"armv7", multisdk: true, sdk:"iphoneos", parentDir:buildDir)
-    thinArchives += buildThin(framework:framework, multiplatform: multiplatform, arch:"i386", multisdk: true, sdk:"iphonesimulator", parentDir:buildDir)
-    thinArchives += buildThin(framework:framework, multiplatform: multiplatform, arch:"x86_64", multisdk: true, sdk:"iphonesimulator", parentDir:buildDir)
-  case .macOS:
-    thinArchives += buildThin(framework:framework, multiplatform: multiplatform, arch:"x86_64", multisdk: false, sdk:"macosx", parentDir:buildDir)
-  default: fatalError("TODO: tvOS/watchOS")
-  }
-
-  let frameworkDir = outputDir + "/" + framework + "_" + platform.rawValue + ".framework"
-  syncExec(command:"/bin/mkdir", args:["-p", frameworkDir])
-  let fatArchive = frameworkDir + "/" + framework
-  syncExec(command:"/usr/bin/lipo", args:["-create", "-output", fatArchive] + thinArchives)
-  syncExec(command:"/bin/rm", args:["-rf"] + thinArchives)
-  let headersDir = frameworkDir + "/Headers"
-  syncExec(command:"/bin/mv", args:[NSString(string:thinArchives[0]).deletingLastPathComponent, headersDir])
-  syncExec(command:"/bin/rm", args:["-rf", buildDir])
-  makeModuleMap(framework:framework, dir:frameworkDir)
-}
-
-let frameworks = processOptions()
-colorPrint(color:Colors.green, text:"Building \(frameworks)")
-
-let outputDir = tempDir()
-
-syncExec(command:"/usr/local/bin/pod", args:["update"])
-
-for f in frameworks {
-  let platforms = allFrameworks[f]!
-  for p in platforms {
-    buildFramework(withName:f, multiplatform:platforms.count > 1, platform:p, outputDir:outputDir)
-  }
-}
-
-print()
-colorPrint(color:Colors.magenta, text:"The frameworks are available at the locations below:")
-syncExec(command:"/usr/bin/find", args:[outputDir, "-depth", "1"])

+ 0 - 49
BuildFrameworks/iOS-Info.plist

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>UILaunchStoryboardName</key>
-	<string>LaunchScreen</string>
-	<key>UIMainStoryboardFile</key>
-	<string>Main</string>
-	<key>UIRequiredDeviceCapabilities</key>
-	<array>
-		<string>armv7</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-</dict>
-</plist>

+ 0 - 32
BuildFrameworks/macOS-Info.plist

@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSMinimumSystemVersion</key>
-	<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2017 Google, Inc. All rights reserved.</string>
-	<key>NSMainStoryboardFile</key>
-	<string>Main</string>
-	<key>NSPrincipalClass</key>
-	<string>NSApplication</string>
-</dict>
-</plist>

+ 62 - 0
CMAKE.md

@@ -0,0 +1,62 @@
+# Building with CMake
+
+Some portions of this repository are portable beyond iOS and can be built using
+CMake.
+
+## Dependencies
+
+You need:
+  * A C++ compiler
+  * `cmake`
+
+### macOS
+
+You need [Xcode](https://developer.apple.com/xcode/), which you can get from
+the Mac App Store.
+
+You can get other development tools via [homebrew](https://brew.sh). Adjust as
+needed for other package managers.
+```
+brew install cmake
+```
+
+### Ubuntu
+
+Ubuntu Trusty includes CMake 2.8.12 which should be sufficient. Newer versions
+are fine too.
+
+```
+sudo apt-get install cmake
+```
+
+### Windows
+
+An easy way to get development tools is via [Chocolatey](https://chocolatey.org/).
+
+Unfortunately, the `cmake.install` package is semi-broken, so use the portable
+version.
+
+```
+choco install cmake.portable
+```
+
+## Setup
+
+CMake builds out-of source, so create a separate build directory for the target
+you want to work on.
+
+```
+mkdir build
+cd build
+cmake ..
+```
+
+## Testing
+
+Once CMake has run once, you can just run `make` repeatedly and it will
+regenerate Makefiles as needed.
+
+To build everything and run tests:
+```
+make -j all test
+```

+ 33 - 0
CMakeLists.txt

@@ -0,0 +1,33 @@
+# Copyright 2017 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cmake_minimum_required(VERSION 2.8.11)
+project(firebase C CXX)
+
+# We use C++11
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+# Fully qualified imports, project wide
+include_directories("${PROJECT_SOURCE_DIR}")
+
+# CMake's test target does not build tests before running them. This adds a
+# check target that
+add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
+
+include(cmake/utils.cmake)
+
+enable_testing()
+add_subdirectory(Firestore)

+ 2 - 1
Example/Auth/App/tvOS/AppDelegate.m

@@ -12,7 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-@import FirebaseCommunity;
+@import FirebaseCore;
+@import FirebaseAuth;
 
 #import "AppDelegate.h"
 

+ 3 - 2
Example/Auth/Sample/ApplicationDelegate.m

@@ -16,10 +16,11 @@
 
 #import "ApplicationDelegate.h"
 
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIRLogger.h>
+
 #import "AuthProviders.h"
-#import "FirebaseCommunity/FIRApp.h"
 #import "FirebaseAuth.h"
-#import "FirebaseCommunity/FIRLogger.h"
 #import "GTMSessionFetcherLogging.h"
 #import "MainViewController.h"
 

+ 116 - 10
Example/Auth/Sample/MainViewController.m

@@ -18,12 +18,13 @@
 
 #import <objc/runtime.h>
 
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIRAppInternal.h>
+#import <FirebaseCore/FIRAppAssociationRegistration.h>
+
 #import "AppManager.h"
 #import "AuthCredentials.h"
 #import "FIRAdditionalUserInfo.h"
-#import "FirebaseCommunity/FIRApp.h"
-#import "FirebaseCommunity/FIRAppInternal.h"
-#import "FirebaseCommunity/FIRAppAssociationRegistration.h"
 #import "FIROAuthProvider.h"
 #import "FIRPhoneAuthCredential.h"
 #import "FIRPhoneAuthProvider.h"
@@ -79,11 +80,6 @@ static NSString *const kUserInfoButtonText = @"[Show User Info]";
  */
 static NSString *const kSetPhotoURLText = @"Set Photo url";
 
-/** @var kSignInButtonText
-    @brief The text of the "Sign In" button.
- */
-static NSString *const kSignInButtonText = @"Sign In (HEADFUL)";
-
 /** @var kSignInGoogleButtonText
     @brief The text of the "Google SignIn" button.
  */
@@ -111,6 +107,12 @@ static NSString *const kSignInFacebookAndRetrieveDataButtonText =
  */
 static NSString *const kSignInEmailPasswordButtonText = @"Sign in with Email/Password";
 
+/** @var kSignInEmailPasswordAuthDataResultButtonText
+    @brief The text of the "Email/Password SignIn (AuthDataResult)" button.
+ */
+static NSString *const kSignInEmailPasswordAuthDataResultButtonText =
+    @"Sign in with Email/Password (AuthDataReult)";
+
 /** @var kSignInWithCustomTokenButtonText
     @brief The text of the "Sign In (BYOAuth)" button.
  */
@@ -121,6 +123,12 @@ static NSString *const kSignInWithCustomTokenButtonText = @"Sign In (BYOAuth)";
  */
 static NSString *const kSignInAnonymouslyButtonText = @"Sign In Anonymously";
 
+/** @var kSignInAnonymouslyWithAuthResultButtonText
+    @brief The text of the "Sign In Anonymously (AuthDataResult)" button.
+ */
+static NSString *const kSignInAnonymouslyWithAuthResultButtonText =
+    @"Sign In Anonymously (AuthDataResult)";
+
 /** @var kSignedInAlertTitle
     @brief The text of the "Sign In Succeeded" alert.
  */
@@ -383,6 +391,11 @@ static NSString *const kSectionTitleApp = @"APP";
  */
 static NSString *const kCreateUserTitle = @"Create User";
 
+/** @var kCreateUserAuthDataResultTitle
+    @brief The text of the "Create User (AuthDataResult)" button.
+ */
+static NSString *const kCreateUserAuthDataResultTitle = @"Create User (AuthDataResult)";
+
 /** @var kDeleteAppTitle
     @brief The text of the "Delete App" button.
  */
@@ -693,6 +706,8 @@ typedef enum {
                                             value:nil
                                            action:^{ [weakSelf createUser]; }
                                   accessibilityID:kCreateUserAccessibilityID],
+        [StaticContentTableViewCell cellWithTitle:kCreateUserAuthDataResultTitle
+                                           action:^{ [weakSelf createUserAuthDataResult]; }],
         [StaticContentTableViewCell cellWithTitle:kSignInGoogleButtonText
                                            action:^{ [weakSelf signInGoogle]; }],
         [StaticContentTableViewCell cellWithTitle:kSignInGoogleAndRetrieveDataButtonText
@@ -703,10 +718,14 @@ typedef enum {
                                            action:^{ [weakSelf signInFacebookAndRetrieveData]; }],
         [StaticContentTableViewCell cellWithTitle:kSignInEmailPasswordButtonText
                                            action:^{ [weakSelf signInEmailPassword]; }],
+        [StaticContentTableViewCell cellWithTitle:kSignInEmailPasswordAuthDataResultButtonText
+                                           action:^{ [weakSelf signInEmailPasswordAuthDataResult]; }],
         [StaticContentTableViewCell cellWithTitle:kSignInWithCustomTokenButtonText
                                            action:^{ [weakSelf signInWithCustomToken]; }],
         [StaticContentTableViewCell cellWithTitle:kSignInAnonymouslyButtonText
                                            action:^{ [weakSelf signInAnonymously]; }],
+        [StaticContentTableViewCell cellWithTitle:kSignInAnonymouslyWithAuthResultButtonText
+                                           action:^{ [weakSelf signInAnonymouslyAuthDataResult]; }],
         [StaticContentTableViewCell cellWithTitle:kGitHubSignInButtonText
                                            action:^{ [weakSelf signInWithGitHub]; }],
         [StaticContentTableViewCell cellWithTitle:kSignOutButtonText
@@ -1640,10 +1659,11 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
       }
       FIRAuthCredential *credential =
           [FIREmailAuthProvider credentialWithEmail:email
-                                                   password:password];
+                                           password:password];
       [self showSpinner:^{
         [[AppManager auth] signInWithCredential:credential
-                                     completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+                                     completion:^(FIRUser *_Nullable user,
+                                                  NSError *_Nullable error) {
           [self hideSpinner:^{
             if (error) {
               [self logFailure:@"sign-in with Email/Password failed" error:error];
@@ -1658,6 +1678,38 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
   }];
 }
 
+- (void)signInEmailPasswordAuthDataResult {
+  [self showTextInputPromptWithMessage:@"Email Address:"
+                          keyboardType:UIKeyboardTypeEmailAddress
+                       completionBlock:^(BOOL userPressedOK, NSString *_Nullable email) {
+    if (!userPressedOK || !email.length) {
+      return;
+    }
+    [self showTextInputPromptWithMessage:@"Password:"
+                         completionBlock:^(BOOL userPressedOK, NSString *_Nullable password) {
+      if (!userPressedOK) {
+        return;
+      }
+      [self showSpinner:^{
+        [[AppManager auth] signInAndRetrieveDataWithEmail:email
+                                                 password:password
+                                               completion:^(FIRAuthDataResult *_Nullable authResult,
+                                                            NSError *_Nullable error) {
+          [self hideSpinner:^{
+            if (error) {
+              [self logFailure:@"sign-in with Email/Password failed" error:error];
+            } else {
+              [self logSuccess:@"sign-in with Email/Password succeeded."];
+              [self log:[NSString stringWithFormat:@"UID: %@",authResult.user.uid]];
+            }
+            [self showTypicalUIForUserUpdateResultsWithTitle:@"Sign-In Error" error:error];
+          }];
+        }];
+      }];
+    }];
+  }];
+}
+
 /** @fn signUpNewEmail
     @brief Invoked if sign-in is attempted with new email/password.
     @remarks Should only be called if @c FIRAuthErrorCodeInvalidEmail is encountered on attepmt to
@@ -2490,6 +2542,43 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
   }];
 }
 
+/** @fn createUserAuthDataResult
+    @brief Creates a new user.
+ */
+- (void)createUserAuthDataResult {
+  [self showTextInputPromptWithMessage:@"Email:"
+                          keyboardType:UIKeyboardTypeEmailAddress
+                       completionBlock:^(BOOL userPressedOK, NSString *_Nullable email) {
+    if (!userPressedOK || !email.length) {
+      return;
+    }
+
+    [self showTextInputPromptWithMessage:@"Password:"
+                         completionBlock:^(BOOL userPressedOK, NSString *_Nullable password) {
+      if (!userPressedOK) {
+        return;
+      }
+
+      [self showSpinner:^{
+        [[AppManager auth] createUserAndRetrieveDataWithEmail:email
+                                                     password:password
+                                                   completion:^(FIRAuthDataResult *_Nullable result,
+                                                                NSError *_Nullable error) {
+          if (error) {
+            [self logFailure:@"create user failed" error:error];
+          } else {
+            [self logSuccess:@"create user succeeded."];
+            [self log:result.user.uid];
+          }
+          [self hideSpinner:^{
+            [self showTypicalUIForUserUpdateResultsWithTitle:kCreateUserTitle error:error];
+          }];
+        }];
+      }];
+    }];
+  }];
+}
+
 /** @fn signInWithPhoneNumber
     @brief Allows sign in with phone number.
  */
@@ -2786,6 +2875,23 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
   }];
 }
 
+/** @fn signInAnonymouslyAuthDataResult
+    @brief Signs in as an anonymous user, receiving an auth result containing a signed in user upon
+        success.
+ */
+- (void)signInAnonymouslyAuthDataResult {
+  [[AppManager auth] signInAnonymouslyAndRetrieveDataWithCompletion:
+      ^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error) {
+    if (error) {
+      [self logFailure:@"sign-in anonymously failed" error:error];
+    } else {
+      [self logSuccess:@"sign-in anonymously succeeded."];
+      [self log:[NSString stringWithFormat:@"User ID : %@", authResult.user.uid]];
+    }
+    [self showTypicalUIForUserUpdateResultsWithTitle:kSignInAnonymouslyButtonText error:error];
+  }];
+}
+
 /** @fn signInWithGitHub
     @brief Signs in as a GitHub user. Prompts the user for an access token and uses this access
         token to create a GitHub (generic) credential for signing in.

+ 1 - 1
Example/Auth/Sample/SettingsViewController.m

@@ -160,7 +160,7 @@ static NSString *truncatedString(NSString *string, NSUInteger length) {
     [StaticContentTableViewSection sectionWithTitle:@"Versions" cells:@[
       [StaticContentTableViewCell cellWithTitle:@"FirebaseAuth"
                                           value:versionString(
-          FirebaseAuthVersionString, FirebaseAuthVersionNumber)],
+          FirebaseAuthVersionStr, FirebaseAuthVersionNum)],
     ]],
     [StaticContentTableViewSection sectionWithTitle:@"API Hosts" cells:@[
       [StaticContentTableViewCell cellWithTitle:@"Identity Toolkit"

+ 1 - 1
Example/Auth/SwiftSample/AppDelegate.swift

@@ -16,7 +16,7 @@
 
 import UIKit
 
-import FirebaseCommunity.FirebaseCore
+import FirebaseCore
 import GoogleSignIn
 
 @UIApplicationMain

+ 1 - 1
Example/Auth/SwiftSample/Stubs.swift

@@ -18,7 +18,7 @@
 /// APIs in Swift for those that are not already covered by other parts of the app.
 /// These functions are never executed, but just for passing compilation.
 
-import FirebaseCommunity.FirebaseAuth
+import FirebaseAuth
 
 func actionCodeSettingsStubs() {
   let actionCodeSettings = ActionCodeSettings()

+ 1 - 1
Example/Auth/SwiftSample/ViewController.swift

@@ -16,7 +16,7 @@
 
 import UIKit
 
-import FirebaseCommunity.FirebaseAuth
+import FirebaseAuth
 import GoogleSignIn
 
 final class ViewController: UIViewController, UITextFieldDelegate, AuthUIDelegate {

+ 1 - 1
Example/Auth/Tests/FIRApp+FIRAuthUnitTests.h

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#import "FirebaseCommunity/FIRAppInternal.h"
+#import <FirebaseCore/FIRAppInternal.h>
 
 /** @category FIRApp (FIRAuthUnitTests)
     @brief Tests for @c FIRAuth.

+ 1 - 1
Example/Auth/Tests/FIRApp+FIRAuthUnitTests.m

@@ -16,7 +16,7 @@
 
 #import "FIRApp+FIRAuthUnitTests.h"
 
-#import "FirebaseCommunity/FIROptionsInternal.h"
+#import <FirebaseCore/FIROptionsInternal.h>
 
 @implementation FIRApp (FIRAuthUnitTests)
 

+ 183 - 6
Example/Auth/Tests/FIRAuthTests.m

@@ -18,10 +18,12 @@
 
 #import <XCTest/XCTest.h>
 
-#import "FirebaseCommunity/FIRAppInternal.h"
-#import "FirebaseCommunity/FIREmailAuthProvider.h"
-#import "FirebaseCommunity/FIRGoogleAuthProvider.h"
-#import "FirebaseCommunity/FIRAdditionalUserInfo.h"
+#import <FirebaseCore/FIRAppInternal.h>
+
+#import <FirebaseAuth/FIREmailAuthProvider.h>
+#import <FirebaseAuth/FIRGoogleAuthProvider.h>
+#import <FirebaseAuth/FIRAdditionalUserInfo.h>
+
 #import "FIRAuth_Internal.h"
 #import "FIRAuthOperationType.h"
 #import "FIRAuthErrorUtils.h"
@@ -548,6 +550,66 @@ static const NSTimeInterval kWaitInterval = .5;
   OCMVerifyAll(_mockBackend);
 }
 
+/** @fn testSignInAndRetrieveDataWithEmailPasswordSuccess
+    @brief Tests the flow of a successful @c signInAndRetrieveDataWithEmail:password:completion:
+        call.
+ */
+- (void)testSignInAndRetrieveDataWithEmailPasswordSuccess {
+  OCMExpect([_mockBackend verifyPassword:[OCMArg any] callback:[OCMArg any]])
+      .andCallBlock2(^(FIRVerifyPasswordRequest *_Nullable request,
+                       FIRVerifyPasswordResponseCallback callback) {
+    XCTAssertEqualObjects(request.APIKey, kAPIKey);
+    XCTAssertEqualObjects(request.email, kEmail);
+    XCTAssertEqualObjects(request.password, kFakePassword);
+    XCTAssertTrue(request.returnSecureToken);
+    dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
+      id mockVerifyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
+      [self stubTokensWithMockResponse:mockVerifyPasswordResponse];
+      callback(mockVerifyPasswordResponse, nil);
+    });
+  });
+  [self expectGetAccountInfo];
+  XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
+  [[FIRAuth auth] signOut:NULL];
+  [[FIRAuth auth] signInAndRetrieveDataWithEmail:kEmail
+                                        password:kFakePassword
+                                      completion:^(FIRAuthDataResult *_Nullable result,
+                                                   NSError *_Nullable error) {
+    XCTAssertTrue([NSThread isMainThread]);
+    [self assertUser:result.user];
+    XCTAssertFalse(result.additionalUserInfo.isNewUser);
+    XCTAssertEqualObjects(result.additionalUserInfo.providerID, FIREmailAuthProviderID);
+    XCTAssertNil(error);
+    [expectation fulfill];
+  }];
+  [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil];
+  [self assertUser:[FIRAuth auth].currentUser];
+  OCMVerifyAll(_mockBackend);
+}
+
+/** @fn testSignInAndRetrieveDataWithEmailPasswordFailure
+    @brief Tests the flow of a failed @c signInAndRetrieveDataWithEmail:password:completion: call.
+ */
+- (void)testSignInAndRetrieveDataWithEmailPasswordFailure {
+  OCMExpect([_mockBackend verifyPassword:[OCMArg any] callback:[OCMArg any]])
+      .andDispatchError2([FIRAuthErrorUtils wrongPasswordErrorWithMessage:nil]);
+  XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
+  [[FIRAuth auth] signOut:NULL];
+  [[FIRAuth auth] signInAndRetrieveDataWithEmail:kEmail
+                                        password:kFakePassword
+                                      completion:^(FIRAuthDataResult *_Nullable result,
+                                                   NSError *_Nullable error) {
+    XCTAssertTrue([NSThread isMainThread]);
+    XCTAssertNil(result);
+    XCTAssertEqual(error.code, FIRAuthErrorCodeWrongPassword);
+    XCTAssertNotNil(error.userInfo[NSLocalizedDescriptionKey]);
+    [expectation fulfill];
+  }];
+  [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil];
+  XCTAssertNil([FIRAuth auth].currentUser);
+  OCMVerifyAll(_mockBackend);
+}
+
 /** @fn testResetPasswordSuccess
     @brief Tests the flow of a successful @c confirmPasswordResetWithCode:newPassword:completion:
         call.
@@ -1029,7 +1091,7 @@ static const NSTimeInterval kWaitInterval = .5;
 }
 
 /** @fn testSignInAnonymouslySuccess
-    @brief Tests the flow of a successful @c signInAnonymously:completion: call.
+    @brief Tests the flow of a successful @c signInAnonymouslyWithCompletion: call.
  */
 - (void)testSignInAnonymouslySuccess {
   OCMExpect([_mockBackend signUpNewUser:[OCMArg any] callback:[OCMArg any]])
@@ -1061,7 +1123,7 @@ static const NSTimeInterval kWaitInterval = .5;
 }
 
 /** @fn testSignInAnonymouslyFailure
-    @brief Tests the flow of a failed @c signInAnonymously:completion: call.
+    @brief Tests the flow of a failed @c signInAnonymouslyWithCompletion: call.
  */
 - (void)testSignInAnonymouslyFailure {
   OCMExpect([_mockBackend signUpNewUser:[OCMArg any] callback:[OCMArg any]])
@@ -1081,6 +1143,59 @@ static const NSTimeInterval kWaitInterval = .5;
   OCMVerifyAll(_mockBackend);
 }
 
+/** @fn testSignInAnonymouslyAndRetrieveDataSuccess
+    @brief Tests the flow of a successful @c signInAnonymouslyAndRetrieveDataWithCompletion: call.
+ */
+- (void)testSignInAnonymouslyAndRetrieveDataSuccess {
+  OCMExpect([_mockBackend signUpNewUser:[OCMArg any] callback:[OCMArg any]])
+      .andCallBlock2(^(FIRSignUpNewUserRequest *_Nullable request,
+                       FIRSignupNewUserCallback callback) {
+    XCTAssertEqualObjects(request.APIKey, kAPIKey);
+    XCTAssertNil(request.email);
+    XCTAssertNil(request.password);
+    XCTAssertTrue(request.returnSecureToken);
+    dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
+      id mockSignUpNewUserResponse = OCMClassMock([FIRSignUpNewUserResponse class]);
+      [self stubTokensWithMockResponse:mockSignUpNewUserResponse];
+      callback(mockSignUpNewUserResponse, nil);
+    });
+  });
+  [self expectGetAccountInfoAnonymous];
+  XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
+  [[FIRAuth auth] signOut:NULL];
+  [[FIRAuth auth] signInAnonymouslyAndRetrieveDataWithCompletion:
+      ^(FIRAuthDataResult *_Nullable result, NSError *_Nullable error) {
+    XCTAssertTrue([NSThread isMainThread]);
+    [self assertUserAnonymous:result.user];
+    XCTAssertNil(error);
+    [expectation fulfill];
+  }];
+  [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil];
+  [self assertUserAnonymous:[FIRAuth auth].currentUser];
+  OCMVerifyAll(_mockBackend);
+}
+
+/** @fn testSignInAnonymouslyAndRetrieveDataFailure
+    @brief Tests the flow of a failed @c signInAnonymouslyAndRetrieveDataWithCompletion: call.
+ */
+- (void)testSignInAnonymouslyAndRetrieveDataFailure {
+  OCMExpect([_mockBackend signUpNewUser:[OCMArg any] callback:[OCMArg any]])
+      .andDispatchError2([FIRAuthErrorUtils operationNotAllowedErrorWithMessage:nil]);
+  XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
+  [[FIRAuth auth] signOut:NULL];
+  [[FIRAuth auth] signInAnonymouslyAndRetrieveDataWithCompletion:
+      ^(FIRAuthDataResult *_Nullable result, NSError *_Nullable error) {
+    XCTAssertTrue([NSThread isMainThread]);
+    XCTAssertNil(result);
+    XCTAssertEqual(error.code, FIRAuthErrorCodeOperationNotAllowed);
+    XCTAssertNotNil(error.userInfo[NSLocalizedDescriptionKey]);
+    [expectation fulfill];
+  }];
+  [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil];
+  XCTAssertNil([FIRAuth auth].currentUser);
+  OCMVerifyAll(_mockBackend);
+}
+
 /** @fn testSignInWithCustomTokenSuccess
     @brief Tests the flow of a successful @c signInWithCustomToken:completion: call.
  */
@@ -1190,6 +1305,68 @@ static const NSTimeInterval kWaitInterval = .5;
   OCMVerifyAll(_mockBackend);
 }
 
+/** @fn testCreateUserAndRetrieveDataWithEmailPasswordSuccess
+    @brief Tests the flow of a successful @c createUserAndRetrieveDataWithEmail:password:completion:
+        call.
+ */
+- (void)testCreateUserAndRetrieveDataWithEmailPasswordSuccess {
+  OCMExpect([_mockBackend signUpNewUser:[OCMArg any] callback:[OCMArg any]])
+      .andCallBlock2(^(FIRSignUpNewUserRequest *_Nullable request,
+                       FIRSignupNewUserCallback callback) {
+    XCTAssertEqualObjects(request.APIKey, kAPIKey);
+    XCTAssertEqualObjects(request.email, kEmail);
+    XCTAssertEqualObjects(request.password, kFakePassword);
+    XCTAssertTrue(request.returnSecureToken);
+    dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
+      id mockSignUpNewUserResponse = OCMClassMock([FIRSignUpNewUserResponse class]);
+      [self stubTokensWithMockResponse:mockSignUpNewUserResponse];
+      callback(mockSignUpNewUserResponse, nil);
+    });
+  });
+  [self expectGetAccountInfo];
+  XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
+  [[FIRAuth auth] signOut:NULL];
+  [[FIRAuth auth] createUserAndRetrieveDataWithEmail:kEmail
+                                            password:kFakePassword
+                                          completion:^(FIRAuthDataResult *_Nullable result,
+                                                       NSError *_Nullable error) {
+    XCTAssertTrue([NSThread isMainThread]);
+    [self assertUser:result.user];
+    XCTAssertTrue(result.additionalUserInfo.isNewUser);
+    XCTAssertNil(error);
+    [expectation fulfill];
+  }];
+  [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil];
+  [self assertUser:[FIRAuth auth].currentUser];
+  OCMVerifyAll(_mockBackend);
+}
+
+/** @fn testCreateUserAndRetrieveDataWithEmailPasswordFailure
+    @brief Tests the flow of a failed @c createUserAndRetrieveDataWithEmail:password:completion:
+        call.
+ */
+- (void)testCreateUserAndRetrieveDataWithEmailPasswordFailure {
+  NSString *reason = @"Password shouldn't be a common word.";
+  OCMExpect([_mockBackend signUpNewUser:[OCMArg any] callback:[OCMArg any]])
+      .andDispatchError2([FIRAuthErrorUtils weakPasswordErrorWithServerResponseReason:reason]);
+  XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
+  [[FIRAuth auth] signOut:NULL];
+  [[FIRAuth auth] createUserAndRetrieveDataWithEmail:kEmail
+                                            password:kFakePassword
+                                          completion:^(FIRAuthDataResult *_Nullable result,
+                                                       NSError *_Nullable error) {
+    XCTAssertTrue([NSThread isMainThread]);
+    XCTAssertNil(result);
+    XCTAssertEqual(error.code, FIRAuthErrorCodeWeakPassword);
+    XCTAssertNotNil(error.userInfo[NSLocalizedDescriptionKey]);
+    XCTAssertEqualObjects(error.userInfo[NSLocalizedFailureReasonErrorKey], reason);
+    [expectation fulfill];
+  }];
+  [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil];
+  XCTAssertNil([FIRAuth auth].currentUser);
+  OCMVerifyAll(_mockBackend);
+}
+
 /** @fn testCreateUserEmptyPasswordFailure
     @brief Tests the flow of a failed @c createUserWithEmail:password:completion: call due to an
         empty password. This error occurs on the client side, so there is no need to fake an RPC

+ 1 - 1
Example/Auth/Tests/FIRPhoneAuthProviderTests.m

@@ -18,7 +18,7 @@
 #import <OCMock/OCMock.h>
 #import <XCTest/XCTest.h>
 
-#import "FirebaseCommunity/FIRAuth.h"
+#import "FIRAuth.h"
 #import "FIRPhoneAuthProvider.h"
 #import "FIRApp.h"
 #import "FIRAuth_Internal.h"

+ 6 - 5
Example/Auth/Tests/FIRUserTests.m

@@ -18,11 +18,12 @@
 
 #import <XCTest/XCTest.h>
 
-#import "FirebaseCommunity/FIRUser.h"
-#import "FirebaseCommunity/FIREmailAuthProvider.h"
-#import "FirebaseCommunity/FIRFacebookAuthProvider.h"
-#import "FirebaseCommunity/FIRGoogleAuthProvider.h"
-#import "FirebaseCommunity/FIRAdditionalUserInfo.h"
+#import <FirebaseAuth/FIRUser.h>
+#import <FirebaseAuth/FIREmailAuthProvider.h>
+#import <FirebaseAuth/FIRFacebookAuthProvider.h>
+#import <FirebaseAuth/FIRGoogleAuthProvider.h>
+#import <FirebaseAuth/FIRAdditionalUserInfo.h>
+
 #import "FIRAuth_Internal.h"
 #import "FIRAuthErrorUtils.h"
 #import "FIRAuthBackend.h"

+ 2 - 1
Example/Core/App/iOS/FIRAppDelegate.m

@@ -12,7 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-@import FirebaseCommunity;
+@import Firebase;  // verify the Firebase module import is working
+
 #import "FIRAppDelegate.h"
 
 @implementation FIRAppDelegate

+ 1 - 1
Example/Core/App/tvOS/AppDelegate.m

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-@import FirebaseCommunity;
+@import FirebaseCore;
 
 #import "AppDelegate.h"
 

+ 1 - 1
Example/Core/Tests/FIRAppAssociationRegistrationUnitTests.m

@@ -14,7 +14,7 @@
 
 #import <XCTest/XCTest.h>
 
-#import "FirebaseCommunity/FIRAppAssociationRegistration.h"
+#import <FirebaseCore/FIRAppAssociationRegistration.h>
 
 /** @var kKey
     @brief A unique string key.

+ 2 - 2
Example/Core/Tests/FIRAppTest.m

@@ -14,8 +14,8 @@
 
 #import "FIRTestCase.h"
 
-#import "FirebaseCommunity/FIRAppInternal.h"
-#import "FirebaseCommunity/FIROptionsInternal.h"
+#import <FirebaseCore/FIRAppInternal.h>
+#import <FirebaseCore/FIROptionsInternal.h>
 
 NSString *const kFIRTestAppName1 = @"test_app_name_1";
 NSString *const kFIRTestAppName2 = @"test-app-name-2";

+ 1 - 1
Example/Core/Tests/FIRBundleUtilTest.m

@@ -14,7 +14,7 @@
 
 #import "FIRTestCase.h"
 
-#import "FirebaseCommunity/FIRBundleUtil.h"
+#import <FirebaseCore/FIRBundleUtil.h>
 
 static NSString *const kResultPath = @"resultPath";
 static NSString *const kResourceName = @"resourceName";

+ 1 - 1
Example/Core/Tests/FIRLoggerTest.m

@@ -14,7 +14,7 @@
 
 #import "FIRTestCase.h"
 
-#import "FirebaseCommunity/FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
 
 #import <asl.h>
 

+ 3 - 3
Example/Core/Tests/FIROptionsTest.m

@@ -14,9 +14,9 @@
 
 #import "FIRTestCase.h"
 
-#import "FirebaseCommunity/FIRAppInternal.h"
-#import "FirebaseCommunity/FIRBundleUtil.h"
-#import "FirebaseCommunity/FIROptionsInternal.h"
+#import <FirebaseCore/FIRAppInternal.h>
+#import <FirebaseCore/FIRBundleUtil.h>
+#import <FirebaseCore/FIROptionsInternal.h>
 
 extern NSString *const kFIRIsMeasurementEnabled;
 extern NSString *const kFIRIsAnalyticsCollectionEnabled;

+ 3 - 1
Example/Database/Tests/Helpers/FDevice.m

@@ -16,7 +16,9 @@
 
 #import <XCTest/XCTest.h>
 #import "FDevice.h"
-#import "FirebaseCommunity/FIRDatabaseReference.h"
+
+#import <FirebaseDatabase/FIRDatabaseReference.h>
+
 #import "FRepoManager.h"
 #import "FIRDatabaseReference_Private.h"
 #import "FIRDatabaseConfig_Private.h"

+ 3 - 1
Example/Database/Tests/Helpers/FEventTester.m

@@ -15,7 +15,9 @@
  */
 
 #import "FEventTester.h"
-#import "FirebaseCommunity/FIRDatabaseReference.h"
+
+#import <FirebaseDatabase/FIRDatabaseReference.h>
+
 #import "FTupleBoolBlock.h"
 #import "FTupleEventTypeString.h"
 #import "FTestHelpers.h"

+ 3 - 2
Example/Database/Tests/Helpers/FTestBase.m

@@ -14,8 +14,9 @@
  * limitations under the License.
  */
 
-#import "FirebaseCommunity/FIRApp.h"
-#import "FirebaseCommunity/FIROptions.h"
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIROptions.h>
+
 #import "FTestBase.h"
 #import "FTestAuthTokenGenerator.h"
 #import "FIRDatabaseQuery_Private.h"

+ 3 - 2
Example/Database/Tests/Integration/FConnectionTest.m

@@ -16,8 +16,9 @@
 
 #import <Foundation/Foundation.h>
 
-#import "FirebaseCommunity/FIRApp.h"
-#import "FirebaseCommunity/FIROptions.h"
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIROptions.h>
+
 #import "FTestHelpers.h"
 #import "FConnection.h"
 #import "FTestBase.h"

+ 3 - 1
Example/Database/Tests/Integration/FIRAuthTests.m

@@ -15,7 +15,9 @@
  */
 
 #import <XCTest/XCTest.h>
-#import "FirebaseCommunity/FIRApp.h"
+
+#import <FirebaseCore/FIRApp.h>
+
 #import "FTestHelpers.h"
 #import "FTestAuthTokenGenerator.h"
 #import "FIRTestAuthTokenProvider.h"

+ 3 - 1
Example/Database/Tests/Integration/FIRDatabaseTests.m

@@ -15,7 +15,9 @@
  */
 
 #import <XCTest/XCTest.h>
-#import "FirebaseCommunity/FIRApp.h"
+
+#import <FirebaseCore/FIRApp.h>
+
 #import "FIRDatabaseReference.h"
 #import "FIRDatabaseReference_Private.h"
 #import "FIRDatabase.h"

+ 3 - 1
Example/Database/Tests/Unit/FSyncPointTests.m

@@ -15,7 +15,9 @@
  */
 
 #import <Foundation/Foundation.h>
-#import "FirebaseCommunity/FIRLogger.h"
+
+#import <FirebaseCore/FIRLogger.h>
+
 #import "FSyncPointTests.h"
 #import "FListenProvider.h"
 #import "FQuerySpec.h"

Plik diff jest za duży
+ 274 - 324
Example/Firebase.xcodeproj/project.pbxproj


+ 2 - 1
Example/Messaging/App/iOS/AppDelegate.swift

@@ -15,7 +15,8 @@
  */
 
 import UIKit
-import FirebaseCommunity
+import FirebaseCore
+import FirebaseMessaging
 import UserNotifications
 
 @UIApplicationMain

+ 1 - 1
Example/Messaging/App/iOS/MessagingViewController.swift

@@ -16,7 +16,7 @@
 
 import UIKit
 
-import FirebaseCommunity
+import FirebaseMessaging
 
 enum Row: String {
   case apnsToken = "apnsToken"

+ 1 - 1
Example/Messaging/App/iOS/NotificationsController.swift

@@ -17,7 +17,7 @@
 import UIKit
 import UserNotifications
 
-import FirebaseCommunity
+import FirebaseMessaging
 
 enum NotificationsControllerAllowedNotificationType: String {
   case none = "None"

+ 1 - 1
Example/Messaging/Tests/FIRMessagingClientTest.m

@@ -31,7 +31,7 @@
 #import "FIRMessagingUtilities.h"
 #import "NSError+FIRMessaging.h"
 
-#import "FirebaseCommunity/FIRReachabilityChecker.h"
+#import <FirebaseCore/FIRReachabilityChecker.h>
 
 static NSString *const kFIRMessagingUserDefaultsSuite = @"FIRMessagingClientTestUserDefaultsSuite";
 

+ 77 - 80
Example/Podfile

@@ -1,9 +1,14 @@
 use_frameworks!
 
+pod 'FirebaseCore', :path => '../'
+
 target 'Core_Example_iOS' do
   platform :ios, '8.0'
 
-  pod 'FirebaseCommunity/Core', :path => '../'
+  # The next line is the forcing function for the Firebase pod. The Firebase
+  # version's subspecs should depend on the component versions in their
+  # corresponding podspec's.
+  pod 'Firebase/Core', '4.6.0'
 
   target 'Core_Tests_iOS' do
     inherit! :search_paths
@@ -11,56 +16,56 @@ target 'Core_Example_iOS' do
   end
 end
 
-target 'Core_Example_macOS' do
-  platform :osx, '10.10'
+target 'Auth_Example_iOS' do
+  platform :ios, '8.0'
 
-  pod 'FirebaseCommunity/Core', :path => '../'
+  pod 'FirebaseAuth', :path => '../'
 
-  target 'Core_Tests_macOS' do
+  target 'Auth_Tests_iOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
 end
 
-target 'Core_Example_tvOS' do
-  platform :tvos, '10.0'
+target 'Database_Example_iOS' do
+  platform :ios, '8.0'
 
-  pod 'FirebaseCommunity/Core', :path => '../'
+  pod 'FirebaseDatabase', :path => '../'
 
-  target 'Core_Tests_tvOS' do
+  target 'Database_Tests_iOS' do
+    inherit! :search_paths
+    pod 'OCMock'
+  end
+
+  target 'Database_IntegrationTests_iOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
 end
 
-target 'Auth_Example_iOS' do
+target 'Messaging_Example_iOS' do
   platform :ios, '8.0'
 
-  pod 'FirebaseCommunity/Auth', :path => '../'
+  pod 'FirebaseMessaging' , :path => '../'
+  pod 'FirebaseInstanceID'
 
-  target 'Auth_Tests_iOS' do
+  target 'Messaging_Tests_iOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
 end
 
-target 'Auth_Example_macOS' do
-  platform :osx, '10.10'
+target 'Storage_Example_iOS' do
+  platform :ios, '8.0'
 
-  pod 'FirebaseCommunity/Auth', :path => '../'
+  pod 'FirebaseStorage', :path => '../'
 
-  target 'Auth_Tests_macOS' do
+  target 'Storage_Tests_iOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
-end
-
-target 'Auth_Example_tvOS' do
-  platform :tvos, '10.0'
 
-  pod 'FirebaseCommunity/Auth', :path => '../'
-
-  target 'Auth_Tests_tvOS' do
+  target 'Storage_IntegrationTests_iOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
@@ -68,74 +73,57 @@ end
 
 target 'Auth_Sample' do
   platform :ios, '8.0'
-  pod 'FirebaseCommunity/Auth', :path => '../'
+  pod 'FirebaseAuth', :path => '../'
+  pod 'FirebaseCore', :path => '../'
   pod 'FBSDKLoginKit'
   pod 'GoogleSignIn'
-  # to FirebaseCore
   pod 'FirebaseInstanceID'
   pod 'GTMSessionFetcher/Core'
-end
 
-target 'Auth_SwiftSample' do
-  platform :ios, '8.0'
-  pod 'FirebaseCommunity/Auth', :path => '../'
-  pod 'GoogleSignIn'
-  pod 'FirebaseInstanceID'
-end
+  target 'Auth_ApiTests' do
+    inherit! :search_paths
+  end
 
-target 'Auth_ApiTests' do
-  platform :ios, '8.0'
-  pod 'FirebaseCommunity/Auth', :path => '../'
-  pod 'GoogleSignIn'
-  pod 'FirebaseInstanceID'
-  pod 'GTMSessionFetcher/Core'
+  target 'Auth_EarlGreyTests' do
+    inherit! :search_paths
+    pod 'EarlGrey'
+  end
 end
 
-target 'Auth_EarlGreyTests' do
+target 'Auth_SwiftSample' do
   platform :ios, '8.0'
-  pod 'FirebaseCommunity/Auth', :path => '../'
+  pod 'FirebaseAuth', :path => '../'
+  pod 'FirebaseCore', :path => '../'
   pod 'GoogleSignIn'
   pod 'FirebaseInstanceID'
-  pod 'EarlGrey'
 end
 
-target 'Database_Example_iOS' do
-  platform :ios, '8.0'
+target 'Core_Example_macOS' do
+  platform :osx, '10.10'
 
-  pod 'FirebaseCommunity/Database', :path => '../'
+  pod 'FirebaseCore', :path => '../'
 
-  target 'Database_Tests_iOS' do
-    inherit! :search_paths
-    pod 'OCMock'
-  end
-
-  target 'Database_IntegrationTests_iOS' do
+  target 'Core_Tests_macOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
 end
 
-target 'Database_Example_tvOS' do
-  platform :tvos, '10.0'
+target 'Auth_Example_macOS' do
+  platform :osx, '10.10'
 
-  pod 'FirebaseCommunity/Database', :path => '../'
+  pod 'FirebaseAuth', :path => '../'
 
-  target 'Database_Tests_tvOS' do
+  target 'Auth_Tests_macOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
-
-# TODO
-# target 'Database_IntegrationTests_tvOS' do
-#    inherit! :search_paths
-#    pod 'OCMock'
-#  end
 end
 
 target 'Database_Example_macOS' do
   platform :osx, '10.10'
 
-  pod 'FirebaseCommunity/Database', :path => '../'
+  pod 'FirebaseDatabase', :path => '../'
 
   target 'Database_Tests_macOS' do
     inherit! :search_paths
@@ -148,54 +136,63 @@ target 'Database_Example_macOS' do
   end
 end
 
-target 'Messaging_Example_iOS' do
-  platform :ios, '8.0'
+target 'Storage_Example_macOS' do
+  platform :osx, '10.10'
 
-  pod 'FirebaseCommunity/Messaging', :path => '../'
-  pod 'FirebaseInstanceID'
+  pod 'FirebaseStorage', :path => '../'
 
-  target 'Messaging_Tests_iOS' do
+  target 'Storage_Tests_macOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
-end
-
-target 'Storage_Example_iOS' do
-  platform :ios, '8.0'
 
-  pod 'FirebaseCommunity/Storage', :path => '../'
-
-  target 'Storage_Tests_iOS' do
+  target 'Storage_IntegrationTests_macOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
+end
 
-  target 'Storage_IntegrationTests_iOS' do
+target 'Core_Example_tvOS' do
+  platform :tvos, '10.0'
+
+  target 'Core_Tests_tvOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
 end
 
-target 'Storage_Example_macOS' do
-  platform :osx, '10.10'
+target 'Auth_Example_tvOS' do
+  platform :tvos, '10.0'
 
-  pod 'FirebaseCommunity/Storage', :path => '../'
+  pod 'FirebaseAuth', :path => '../'
 
-  target 'Storage_Tests_macOS' do
+  target 'Auth_Tests_tvOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
+end
 
-  target 'Storage_IntegrationTests_macOS' do
+target 'Database_Example_tvOS' do
+  platform :tvos, '10.0'
+
+  pod 'FirebaseDatabase', :path => '../'
+
+  target 'Database_Tests_tvOS' do
     inherit! :search_paths
     pod 'OCMock'
   end
+
+# TODO
+# target 'Database_IntegrationTests_tvOS' do
+#    inherit! :search_paths
+#    pod 'OCMock'
+#  end
 end
 
 target 'Storage_Example_tvOS' do
   platform :tvos, '10.0'
 
-  pod 'FirebaseCommunity/Storage', :path => '../'
+  pod 'FirebaseStorage', :path => '../'
 
   target 'Storage_Tests_tvOS' do
     inherit! :search_paths

+ 1 - 5
Example/Shared/FIRSampleAppUtilities.m

@@ -16,13 +16,9 @@
 
 #import "FIRSampleAppUtilities.h"
 
+#import <FirebaseCore/FIROptionsInternal.h>
 #import <SafariServices/SafariServices.h>
 
-// Plist file name.
-NSString *const kServiceInfoFileName = @"GoogleService-Info";
-// Plist file type.
-NSString *const kServiceInfoFileType = @"plist";
-// GOOGLE_APP_ID key
 NSString *const kGoogleAppIDPlistKey = @"GOOGLE_APP_ID";
 // Dummy plist GOOGLE_APP_ID
 NSString *const kDummyGoogleAppID = @"1:123:ios:123abc";

+ 2 - 0
Example/Storage/App/iOS/FIRAppDelegate.m

@@ -12,6 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+@import FirebaseStorage;
+
 #import "FIRAppDelegate.h"
 
 @implementation FIRAppDelegate

+ 2 - 1
Example/Storage/App/tvOS/AppDelegate.m

@@ -12,7 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-@import FirebaseCommunity;
+@import FirebaseCore;
+@import FirebaseStorage;
 
 #import "AppDelegate.h"
 

+ 1 - 1
Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import <FirebaseCommunity/FIRStorageMetadata.h>
+#import <FirebaseStorage/FIRStorageMetadata.h>
 #import <XCTest/XCTest.h>
 #import <math.h>
 

+ 1 - 1
Example/Storage/Tests/Unit/FIRStorageMetadataTests.m

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import <FirebaseCommunity/FIRStorageMetadata.h>
+#import <FirebaseStorage/FIRStorageMetadata.h>
 #import <XCTest/XCTest.h>
 
 #import "FIRStorageMetadata.h"

+ 1 - 1
Example/Storage/Tests/Unit/FIRStorageTokenAuthorizerTests.m

@@ -14,7 +14,7 @@
 
 #import "FIRStorageTestHelpers.h"
 
-#import "FirebaseCommunity/FIRAppInternal.h"
+#import <FirebaseCore/FIRAppInternal.h>
 
 @interface FIRStorageTokenAuthorizerTests : XCTestCase
 

+ 4 - 4
Example/tvOSSample/Podfile

@@ -6,9 +6,9 @@ target 'tvOSSample' do
   use_frameworks!
 
   # Pods for tvOSSample
-  pod 'FirebaseCommunity/Core', :path => '../../'
-  pod 'FirebaseCommunity/Auth', :path => '../../'
-  pod 'FirebaseCommunity/Database', :path => '../../'
-  pod 'FirebaseCommunity/Storage', :path => '../../'
+  pod 'FirebaseCore', :path => '../../'
+  pod 'FirebaseAuth', :path => '../../'
+  pod 'FirebaseDatabase', :path => '../../'
+  pod 'FirebaseStorage', :path => '../../'
 
 end

+ 33 - 35
Example/tvOSSample/tvOSSample.xcodeproj/project.pbxproj

@@ -7,11 +7,11 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		63E762032AB89606CF011430 /* Pods_tvOSSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 236713F01E6993CCDF643FED /* Pods_tvOSSample.framework */; };
+		B7F83BACE8E8330E2A5C0861 /* Pods_tvOSSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CCE8CD052953D89D96C9CDC /* Pods_tvOSSample.framework */; };
+		DE397DCB1FC8AD39007CBF0E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED4D5FEB1FBA055300501573 /* GoogleService-Info.plist */; };
 		ED4D5FDD1FBA008200501573 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4D5FDC1FBA008200501573 /* AppDelegate.swift */; };
 		ED4D5FE21FBA008200501573 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED4D5FE01FBA008200501573 /* Main.storyboard */; };
 		ED4D5FE41FBA008200501573 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ED4D5FE31FBA008200501573 /* Assets.xcassets */; };
-		ED4D5FEC1FBA055300501573 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED4D5FEB1FBA055300501573 /* GoogleService-Info.plist */; };
 		ED822C851FBA212600B00A2F /* StorageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED822C841FBA212600B00A2F /* StorageViewController.swift */; };
 		EDFBCF4C1FBB3ACC0041A9FD /* DatabaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDFBCF4B1FBB3ACC0041A9FD /* DatabaseViewController.swift */; };
 		EDFBCF511FBC88D20041A9FD /* AuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDFBCF501FBC88D20041A9FD /* AuthViewController.swift */; };
@@ -20,9 +20,9 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		236713F01E6993CCDF643FED /* Pods_tvOSSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_tvOSSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		2601D666A3E5E759FA0B5D53 /* Pods-tvOSSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample.debug.xcconfig"; sourceTree = "<group>"; };
-		DE35D36E007D9A373D759EF3 /* Pods-tvOSSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample.release.xcconfig"; sourceTree = "<group>"; };
+		3F2496EBDAD58301BC9119C5 /* Pods-tvOSSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample.debug.xcconfig"; sourceTree = "<group>"; };
+		5CCE8CD052953D89D96C9CDC /* Pods_tvOSSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_tvOSSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		E0A4F4B42E46BAA2DF7A366E /* Pods-tvOSSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample.release.xcconfig"; sourceTree = "<group>"; };
 		ED4D5FD91FBA008200501573 /* tvOSSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tvOSSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		ED4D5FDC1FBA008200501573 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		ED4D5FE11FBA008200501573 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -41,26 +41,26 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				63E762032AB89606CF011430 /* Pods_tvOSSample.framework in Frameworks */,
+				B7F83BACE8E8330E2A5C0861 /* Pods_tvOSSample.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		26069E80CF858D417AA648D1 /* Pods */ = {
+		A45A5C3CB0C23372780D9FA9 /* Pods */ = {
 			isa = PBXGroup;
 			children = (
-				2601D666A3E5E759FA0B5D53 /* Pods-tvOSSample.debug.xcconfig */,
-				DE35D36E007D9A373D759EF3 /* Pods-tvOSSample.release.xcconfig */,
+				3F2496EBDAD58301BC9119C5 /* Pods-tvOSSample.debug.xcconfig */,
+				E0A4F4B42E46BAA2DF7A366E /* Pods-tvOSSample.release.xcconfig */,
 			);
 			name = Pods;
 			sourceTree = "<group>";
 		};
-		7031317E255ACED309669EEC /* Frameworks */ = {
+		BA0B7BD0C775F3B6FDDCCEB5 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				236713F01E6993CCDF643FED /* Pods_tvOSSample.framework */,
+				5CCE8CD052953D89D96C9CDC /* Pods_tvOSSample.framework */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";
@@ -70,8 +70,8 @@
 			children = (
 				ED4D5FDB1FBA008200501573 /* tvOSSample */,
 				ED4D5FDA1FBA008200501573 /* Products */,
-				26069E80CF858D417AA648D1 /* Pods */,
-				7031317E255ACED309669EEC /* Frameworks */,
+				A45A5C3CB0C23372780D9FA9 /* Pods */,
+				BA0B7BD0C775F3B6FDDCCEB5 /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
@@ -107,12 +107,12 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = ED4D5FE81FBA008300501573 /* Build configuration list for PBXNativeTarget "tvOSSample" */;
 			buildPhases = (
-				76ABDCEA07EB7642EE7AF7AF /* [CP] Check Pods Manifest.lock */,
+				D5025FECAC3B7FED5FF1A46A /* [CP] Check Pods Manifest.lock */,
 				ED4D5FD51FBA008200501573 /* Sources */,
 				ED4D5FD61FBA008200501573 /* Frameworks */,
 				ED4D5FD71FBA008200501573 /* Resources */,
-				654C57FC66D688FD5B081688 /* [CP] Embed Pods Frameworks */,
-				33E0210335220C6835172729 /* [CP] Copy Pods Resources */,
+				1D04A7E6AB24B35668030EB4 /* [CP] Embed Pods Frameworks */,
+				3A8B26C16219186ABE0EDF0F /* [CP] Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -164,53 +164,51 @@
 			files = (
 				ED4D5FE41FBA008200501573 /* Assets.xcassets in Resources */,
 				ED4D5FE21FBA008200501573 /* Main.storyboard in Resources */,
-				ED4D5FEC1FBA055300501573 /* GoogleService-Info.plist in Resources */,
+				DE397DCB1FC8AD39007CBF0E /* GoogleService-Info.plist in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-		33E0210335220C6835172729 /* [CP] Copy Pods Resources */ = {
+		1D04A7E6AB24B35668030EB4 /* [CP] Embed Pods Frameworks */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
 			inputPaths = (
+				"${SRCROOT}/Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample-frameworks.sh",
+				"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
+				"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
+				"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
 			);
-			name = "[CP] Copy Pods Resources";
+			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample-resources.sh\"\n";
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample-frameworks.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		654C57FC66D688FD5B081688 /* [CP] Embed Pods Frameworks */ = {
+		3A8B26C16219186ABE0EDF0F /* [CP] Copy Pods Resources */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
 			inputPaths = (
-				"${SRCROOT}/Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample-frameworks.sh",
-				"${BUILT_PRODUCTS_DIR}/FirebaseCommunity/FirebaseCommunity.framework",
-				"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
-				"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
-				"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
 			);
-			name = "[CP] Embed Pods Frameworks";
+			name = "[CP] Copy Pods Resources";
 			outputPaths = (
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCommunity.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample-frameworks.sh\"\n";
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOSSample/Pods-tvOSSample-resources.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
-		76ABDCEA07EB7642EE7AF7AF /* [CP] Check Pods Manifest.lock */ = {
+		D5025FECAC3B7FED5FF1A46A /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
@@ -365,7 +363,7 @@
 		};
 		ED4D5FE91FBA008300501573 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 2601D666A3E5E759FA0B5D53 /* Pods-tvOSSample.debug.xcconfig */;
+			baseConfigurationReference = 3F2496EBDAD58301BC9119C5 /* Pods-tvOSSample.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
@@ -383,7 +381,7 @@
 		};
 		ED4D5FEA1FBA008300501573 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = DE35D36E007D9A373D759EF3 /* Pods-tvOSSample.release.xcconfig */;
+			baseConfigurationReference = E0A4F4B42E46BAA2DF7A366E /* Pods-tvOSSample.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;

+ 1 - 1
Example/tvOSSample/tvOSSample/AppDelegate.swift

@@ -13,7 +13,7 @@
 // limitations under the License.
 
 import UIKit
-import FirebaseCommunity
+import FirebaseCore
 
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate {

+ 1 - 1
Example/tvOSSample/tvOSSample/AuthLoginViewController.swift

@@ -13,7 +13,7 @@
 // limitations under the License.
 
 import UIKit
-import FirebaseCommunity
+import FirebaseAuth
 
 class AuthLoginViewController: UIViewController {
 

+ 1 - 1
Example/tvOSSample/tvOSSample/AuthViewController.swift

@@ -7,7 +7,7 @@
 //
 
 import UIKit
-import FirebaseCommunity
+import FirebaseAuth
 
 class AuthViewController: UIViewController {
 

+ 1 - 1
Example/tvOSSample/tvOSSample/DatabaseViewController.swift

@@ -13,7 +13,7 @@
 // limitations under the License.
 
 import UIKit
-import FirebaseCommunity
+import FirebaseDatabase
 
 /// A class to demonstrate the power of the Firebase Realtime Database. This will show a number read
 /// from the Database and increase or decrease it based on the buttons pressed.

+ 1 - 1
Example/tvOSSample/tvOSSample/EmailLoginViewController.swift

@@ -13,7 +13,7 @@
 // limitations under the License.
 
 import UIKit
-import FirebaseCommunity
+import FirebaseAuth
 
 protocol EmailLoginDelegate {
   func emailLogin(_ controller: EmailLoginViewController, signedInAs user: User)

+ 1 - 1
Example/tvOSSample/tvOSSample/StorageViewController.swift

@@ -13,7 +13,7 @@
 // limitations under the License.
 
 import UIKit
-import FirebaseCommunity
+import FirebaseStorage
 
 class StorageViewController: UIViewController {
   /// An enum describing the different states of the view controller.

+ 1 - 1
Firebase/Auth/Source/FIRAdditionalUserInfo.m

@@ -50,7 +50,7 @@ static NSString *const kNewUserKey = @"newUser";
                                 isNewUser:verifyAssertionResponse.isNewUser];
 }
 
-- (nullable instancetype)initWithProviderID:(NSString *)providerID
+- (nullable instancetype)initWithProviderID:(nullable NSString *)providerID
                                     profile:(nullable NSDictionary<NSString *, NSObject *> *)profile
                                    username:(nullable NSString *)username
                                   isNewUser:(BOOL)isNewUser {

+ 1 - 1
Firebase/Auth/Source/FIRAdditionalUserInfo_Internal.h

@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
     @param username The name of the user.
     @param isNewUser Indicates whether or not the current user was signed in for the first time.
  */
-- (nullable instancetype)initWithProviderID:(NSString *)providerID
+- (nullable instancetype)initWithProviderID:(nullable NSString *)providerID
                                     profile:(nullable NSDictionary<NSString *, NSObject *> *)profile
                                    username:(nullable NSString *)username
                                   isNewUser:(BOOL)isNewUser NS_DESIGNATED_INITIALIZER;

+ 169 - 28
Firebase/Auth/Source/FIRAuth.m

@@ -512,9 +512,14 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
                password:(NSString *)password
              completion:(FIRAuthResultCallback)completion {
   dispatch_async(FIRAuthGlobalWorkQueue(), ^{
-    [self signInWithEmail:email
-                 password:password
-                 callback:[self signInFlowAuthResultCallbackByDecoratingCallback:completion]];
+    FIRAuthResultCallback decoratedCallback =
+        [self signInFlowAuthResultCallbackByDecoratingCallback:completion];
+    [self internalSignInAndRetrieveDataWithEmail:email
+                                        password:password
+                                      completion:^(FIRAuthDataResult *_Nullable authResult,
+                                                   NSError *_Nullable error) {
+      decoratedCallback(authResult.user, error);
+    }];
   });
 }
 
@@ -554,6 +559,37 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
   }];
 }
 
+- (void)signInAndRetrieveDataWithEmail:(NSString *)email
+                              password:(NSString *)password
+                            completion:(FIRAuthDataResultCallback)completion {
+  dispatch_async(FIRAuthGlobalWorkQueue(), ^{
+  FIRAuthDataResultCallback decoratedCallback =
+      [self signInFlowAuthDataResultCallbackByDecoratingCallback:completion];
+    [self internalSignInAndRetrieveDataWithEmail:email
+                                        password:password
+                                      completion:decoratedCallback];
+  });
+}
+
+/** @fn internalSignInAndRetrieveDataWithEmail:password:callback:
+    @brief Signs in using an email address and password.
+    @param email The user's email address.
+    @param password The user's password.
+    @param completion A block which is invoked when the sign in finishes (or is cancelled.) Invoked
+        asynchronously on the global auth work queue in the future.
+    @remarks This is the internal counterpart of this method, which uses a callback that does not
+        update the current user.
+ */
+- (void)internalSignInAndRetrieveDataWithEmail:(NSString *)email
+                                      password:(NSString *)password
+                                    completion:(FIRAuthDataResultCallback)completion {
+  FIREmailPasswordAuthCredential *credentail =
+      [[FIREmailPasswordAuthCredential alloc] initWithEmail:email password:password];
+  [self internalSignInAndRetrieveDataWithCredential:credentail
+                                 isReauthentication:NO
+                                           callback:completion];
+}
+
 - (void)signInWithCredential:(FIRAuthCredential *)credential
                   completion:(FIRAuthResultCallback)completion {
   dispatch_async(FIRAuthGlobalWorkQueue(), ^{
@@ -595,9 +631,18 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
                  password:emailPasswordCredential.password
                  callback:^(FIRUser *_Nullable user, NSError *_Nullable error) {
       if (callback) {
-        FIRAuthDataResult *result = user ?
-            [[FIRAuthDataResult alloc] initWithUser:user additionalUserInfo:nil] : nil;
-        callback(result, error);
+        if (error) {
+          callback(nil, error);
+          return;
+        }
+        FIRAdditionalUserInfo *additionalUserInfo =
+            [[FIRAdditionalUserInfo alloc] initWithProviderID:FIREmailAuthProviderID
+                                                      profile:nil
+                                                     username:nil
+                                                    isNewUser:NO];
+        FIRAuthDataResult *result = [[FIRAuthDataResult alloc] initWithUser:user
+                                                         additionalUserInfo:additionalUserInfo];
+        callback(result, nil);
       }
     }];
     return;
@@ -676,6 +721,47 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
   }];
 }
 
+- (void)signInAnonymouslyAndRetrieveDataWithCompletion:(FIRAuthDataResultCallback)completion {
+  dispatch_async(FIRAuthGlobalWorkQueue(), ^{
+    FIRAuthDataResultCallback decoratedCallback =
+        [self signInFlowAuthDataResultCallbackByDecoratingCallback:completion];
+    if (_currentUser.anonymous) {
+      FIRAdditionalUserInfo *additionalUserInfo =
+          [[FIRAdditionalUserInfo alloc] initWithProviderID:nil
+                                                    profile:nil
+                                                   username:nil
+                                                  isNewUser:NO];
+      FIRAuthDataResult *authDataResult =
+          [[FIRAuthDataResult alloc] initWithUser:_currentUser
+                               additionalUserInfo:additionalUserInfo];
+      decoratedCallback(authDataResult, nil);
+      return;
+    }
+    [self internalSignInAnonymouslyWithCompletion:^(FIRSignUpNewUserResponse *_Nullable response,
+                                                    NSError *_Nullable error) {
+      if (error) {
+        decoratedCallback(nil, error);
+        return;
+      }
+      [self completeSignInWithAccessToken:response.IDToken
+                accessTokenExpirationDate:response.approximateExpirationDate
+                             refreshToken:response.refreshToken
+                                anonymous:YES
+                                 callback:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+        FIRAdditionalUserInfo *additionalUserInfo =
+          [[FIRAdditionalUserInfo alloc] initWithProviderID:nil
+                                                    profile:nil
+                                                   username:nil
+                                                  isNewUser:YES];
+        FIRAuthDataResult *authDataResult =
+            [[FIRAuthDataResult alloc] initWithUser:user
+                                 additionalUserInfo:additionalUserInfo];
+        decoratedCallback(authDataResult, nil);
+     }];
+    }];
+  });
+}
+
 - (void)signInAnonymouslyWithCompletion:(FIRAuthResultCallback)completion {
   dispatch_async(FIRAuthGlobalWorkQueue(), ^{
     FIRAuthResultCallback decoratedCallback =
@@ -684,11 +770,8 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
       decoratedCallback(_currentUser, nil);
       return;
     }
-    FIRSignUpNewUserRequest *request =
-        [[FIRSignUpNewUserRequest alloc]initWithRequestConfiguration:_requestConfiguration];
-    [FIRAuthBackend signUpNewUser:request
-                         callback:^(FIRSignUpNewUserResponse *_Nullable response,
-                                    NSError *_Nullable error) {
+    [self internalSignInAnonymouslyWithCompletion:^(FIRSignUpNewUserResponse *_Nullable response,
+                                                    NSError *_Nullable error) {
       if (error) {
         decoratedCallback(nil, error);
         return;
@@ -732,23 +815,10 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
   dispatch_async(FIRAuthGlobalWorkQueue(), ^{
     FIRAuthResultCallback decoratedCallback =
         [self signInFlowAuthResultCallbackByDecoratingCallback:completion];
-    FIRSignUpNewUserRequest *request =
-        [[FIRSignUpNewUserRequest alloc] initWithEmail:email
-                                              password:password
-                                           displayName:nil
-                                  requestConfiguration:_requestConfiguration];
-    if (![request.password length]) {
-      decoratedCallback(nil, [FIRAuthErrorUtils
-          weakPasswordErrorWithServerResponseReason:kMissingPasswordReason]);
-      return;
-    }
-    if (![request.email length]) {
-      decoratedCallback(nil, [FIRAuthErrorUtils missingEmailErrorWithMessage:nil]);
-      return;
-    }
-    [FIRAuthBackend signUpNewUser:request
-                         callback:^(FIRSignUpNewUserResponse *_Nullable response,
-                                     NSError *_Nullable error) {
+    [self internalCreateUserWithEmail:email
+                             password:password
+                           completion:^(FIRSignUpNewUserResponse *_Nullable response,
+                                        NSError *_Nullable error) {
       if (error) {
         decoratedCallback(nil, error);
         return;
@@ -762,6 +832,40 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
   });
 }
 
+- (void)createUserAndRetrieveDataWithEmail:(NSString *)email
+                                  password:(NSString *)password
+                                completion:(FIRAuthDataResultCallback)completion {
+  dispatch_async(FIRAuthGlobalWorkQueue(), ^{
+    FIRAuthDataResultCallback decoratedCallback =
+        [self signInFlowAuthDataResultCallbackByDecoratingCallback:completion];
+    [self internalCreateUserWithEmail:email
+                             password:password
+                           completion:^(FIRSignUpNewUserResponse *_Nullable response,
+                                        NSError *_Nullable error) {
+      if (error) {
+        decoratedCallback(nil, error);
+        return;
+      }
+
+      [self completeSignInWithAccessToken:response.IDToken
+                accessTokenExpirationDate:response.approximateExpirationDate
+                             refreshToken:response.refreshToken
+                                anonymous:NO
+                                 callback:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+        FIRAdditionalUserInfo *additionalUserInfo =
+          [[FIRAdditionalUserInfo alloc] initWithProviderID:FIREmailAuthProviderID
+                                                    profile:nil
+                                                   username:nil
+                                                  isNewUser:YES];
+        FIRAuthDataResult *authDataResult =
+            [[FIRAuthDataResult alloc] initWithUser:user
+                                 additionalUserInfo:additionalUserInfo];
+        decoratedCallback(authDataResult, nil);
+     }];
+    }];
+  });
+}
+
 - (void)confirmPasswordResetWithCode:(NSString *)code
                          newPassword:(NSString *)newPassword
                           completion:(FIRConfirmPasswordResetCallback)completion {
@@ -1092,6 +1196,43 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
 }
 #endif
 
+/** @fn internalCreateUserWithEmail:password:completion:
+    @brief Makes a backend request attempting to create a new Firebase user given an email address
+        and password.
+    @param email The email address used to create the new Firebase user.
+    @param password The password used to create the new Firebase user.
+    @param completion Optionally; a block which is invoked when the request finishes.
+ */
+- (void)internalCreateUserWithEmail:(NSString *)email
+                           password:(NSString *)password
+                         completion:(nullable FIRSignupNewUserCallback)completion {
+  FIRSignUpNewUserRequest *request =
+      [[FIRSignUpNewUserRequest alloc] initWithEmail:email
+                                            password:password
+                                         displayName:nil
+                                requestConfiguration:_requestConfiguration];
+  if (![request.password length]) {
+    completion(nil, [FIRAuthErrorUtils
+        weakPasswordErrorWithServerResponseReason:kMissingPasswordReason]);
+    return;
+  }
+  if (![request.email length]) {
+    completion(nil, [FIRAuthErrorUtils missingEmailErrorWithMessage:nil]);
+    return;
+  }
+  [FIRAuthBackend signUpNewUser:request callback:completion];
+}
+
+/** @fn internalSignInAnonymouslyWithCompletion:
+    @param completion A block which is invoked when the anonymous sign in request completes.
+ */
+- (void)internalSignInAnonymouslyWithCompletion:(FIRSignupNewUserCallback)completion {
+  FIRSignUpNewUserRequest *request =
+      [[FIRSignUpNewUserRequest alloc]initWithRequestConfiguration:_requestConfiguration];
+  [FIRAuthBackend signUpNewUser:request
+                       callback:completion];
+}
+
 /** @fn possiblyPostAuthStateChangeNotification
     @brief Posts the auth state change notificaton if current user's token has been changed.
  */

+ 2 - 2
Firebase/Auth/Source/FirebaseAuthVersion.m

@@ -20,7 +20,7 @@
 #define STR(x) STR_EXPAND(x)
 #define STR_EXPAND(x) #x
 
-const double FirebaseAuthVersionNumber = FIRAuth_MINOR_VERSION;
+const double FirebaseAuthVersionNum = FIRAuth_MINOR_VERSION;
 
-const unsigned char *const FirebaseAuthVersionString =
+const unsigned char *const FirebaseAuthVersionStr =
     (const unsigned char *const)STR(FIRAuth_VERSION);

+ 90 - 0
Firebase/Auth/Source/Public/FIRAuth.h

@@ -329,6 +329,39 @@ FIR_SWIFT_NAME(Auth)
                password:(NSString *)password
              completion:(nullable FIRAuthResultCallback)completion;
 
+/** @fn signInAndRetrieveDataWithEmail:password:completion:
+    @brief Signs in using an email address and password.
+
+    @param email The user's email address.
+    @param password The user's password.
+    @param completion Optionally; a block which is invoked when the sign in flow finishes, or is
+        canceled. Invoked asynchronously on the main thread in the future.
+
+    @remarks Possible error codes:
+
+    <ul>
+        <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password
+            accounts are not enabled. Enable them in the Auth section of the
+            Firebase console.
+        </li>
+        <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
+        </li>
+        <li>@c FIRAuthErrorCodeWrongPassword - Indicates the user attempted
+            sign in with an incorrect password.
+        </li>
+        <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
+        </li>
+    </ul>
+
+    @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+    @remarks This method will only exist until the next major Firebase release following 4.x.x.
+        After the next major release the method @c signInWithEmail:password:completion: will support
+        the @c FIRAuthDataResultCallback.
+ */
+- (void)signInAndRetrieveDataWithEmail:(NSString *)email
+                              password:(NSString *)password
+                            completion:(nullable FIRAuthDataResultCallback)completion;
+
 /** @fn signInWithCredential:completion:
     @brief Convenience method for @c signInAndRetrieveDataWithCredential:completion: This method
         doesn't return additional identity provider data.
@@ -408,6 +441,29 @@ FIR_SWIFT_NAME(Auth)
  */
 - (void)signInAnonymouslyWithCompletion:(nullable FIRAuthResultCallback)completion;
 
+/** @fn signInAnonymouslyAndRetrieveDataWithCompletion:
+    @brief Asynchronously creates and becomes an anonymous user.
+    @param completion Optionally; a block which is invoked when the sign in finishes, or is
+        canceled. Invoked asynchronously on the main thread in the future.
+
+    @remarks If there is already an anonymous user signed in, that user will be returned instead.
+        If there is any other existing user signed in, that user will be signed out.
+
+    @remarks Possible error codes:
+    <ul>
+        <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that anonymous accounts are
+            not enabled. Enable them in the Auth section of the Firebase console.
+        </li>
+    </ul>
+
+    @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+    @remarks This method will only exist until the next major Firebase release following 4.x.x.
+        After the next major release the method @c signInAnonymouslyWithCompletion will support the
+        @c FIRAuthDataResultCallback.
+ */
+- (void)signInAnonymouslyAndRetrieveDataWithCompletion:
+    (nullable FIRAuthDataResultCallback)completion;
+
 /** @fn signInWithCustomToken:completion:
     @brief Asynchronously signs in to Firebase with the given Auth token.
 
@@ -461,6 +517,40 @@ FIR_SWIFT_NAME(Auth)
                    password:(NSString *)password
                  completion:(nullable FIRAuthResultCallback)completion;
 
+/** @fn createUserAndRetrieveDataWithEmail:password:completion:
+    @brief Creates and, on success, signs in a user with the given email address and password.
+
+    @param email The user's email address.
+    @param password The user's desired password.
+    @param completion Optionally; a block which is invoked when the sign up flow finishes, or is
+        canceled. Invoked asynchronously on the main thread in the future.
+
+    @remarks Possible error codes:
+    <ul>
+        <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
+        </li>
+        <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email used to attempt sign up
+            already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user
+            used, and prompt the user to sign in with one of those.
+        </li>
+        <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password accounts
+            are not enabled. Enable them in the Auth section of the Firebase console.
+        </li>
+        <li>@c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
+            considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
+            dictionary object will contain more detailed explanation that can be shown to the user.
+        </li>
+    </ul>
+
+    @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+    @remarks This method will only exist until the next major Firebase release following 4.x.x.
+        After the next major release the method @c createUserWithEmail:password:completion: will
+        support the @c FIRAuthDataResultCallback.
+ */
+- (void)createUserAndRetrieveDataWithEmail:(NSString *)email
+                                  password:(NSString *)password
+                                completion:(nullable FIRAuthDataResultCallback)completion;
+
 /** @fn confirmPasswordResetWithCode:newPassword:completion:
     @brief Resets the password given a code sent to the user outside of the app and a new password
       for the user.

+ 2 - 2
Firebase/Auth/Source/Public/FirebaseAuthVersion.h

@@ -19,9 +19,9 @@
 /**
     Version number for FirebaseAuth.
  */
-extern const double FirebaseAuthVersionNumber;
+extern const double FirebaseAuthVersionNum;
 
 /**
     Version string for FirebaseAuth.
  */
-extern const unsigned char *const FirebaseAuthVersionString;
+extern const unsigned char *const FirebaseAuthVersionStr;

+ 2 - 2
Firebase/Auth/Source/RPCs/FIRAuthBackend.m

@@ -472,7 +472,7 @@ static id<FIRAuthBackendImplementation> gBackendImplementation;
 
 + (NSString *)authUserAgent {
   return [NSString stringWithFormat:@"FirebaseAuth.iOS/%s %@",
-      FirebaseAuthVersionString, GTMFetcherStandardUserAgentString(nil)];
+      FirebaseAuthVersionStr, GTMFetcherStandardUserAgentString(nil)];
 }
 
 @end
@@ -507,7 +507,7 @@ static id<FIRAuthBackendImplementation> gBackendImplementation;
   NSString *additionalFrameworkMarker = requestConfiguration.additionalFrameworkMarker ?:
       kFirebaseAuthCoreFrameworkMarker;
   NSString *clientVersion = [NSString stringWithFormat:@"iOS/FirebaseSDK/%s/%@",
-                                                       FirebaseAuthVersionString,
+                                                       FirebaseAuthVersionStr,
                                                        additionalFrameworkMarker];
   [request setValue:clientVersion forHTTPHeaderField:kClientVersionHeader];
   NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier];

+ 0 - 29
Firebase/Core/FirebaseCore.podspec

@@ -1,29 +0,0 @@
-# This podspec is not intended to be deployed. It is solely for the static
-# library framework build process at
-# https://github.com/firebase/firebase-ios-sdk/tree/master/BuildFrameworks
-
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseCore'
-  s.version          = '4.0.3'
-  s.summary          = 'Firebase Open Source Libraries for iOS.'
-
-  s.description      = <<-DESC
-Simplify your iOS development, grow your user base, and monetize more effectively with Firebase.
-                       DESC
-
-  s.homepage         = 'https://firebase.google.com'
-  s.license          = { :type => 'Apache', :file => '../../LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  # NOTE that the FirebaseCommunity pod is neither publicly deployed nor yet interchangeable with the
-  # Firebase pod
-  s.source           = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => s.version.to_s }
-  s.social_media_url = 'https://twitter.com/Firebase'
-  s.ios.deployment_target = '7.0'
-  s.osx.deployment_target = '10.10'
-
-  s.source_files = '**/*.[mh]'
-  s.public_header_files = 'Firebase/Core/Public/*.h','Firebase/Core/Private/*.h'
-  s.private_header_files = 'Firebase/Core/Private/*.h'
-  s.dependency 'GoogleToolboxForMac/NSData+zlib', '~> 2.1'
-end

+ 3 - 0
Firebase/Database/CHANGELOG.md

@@ -1,3 +1,6 @@
+# v4.1.2
+- [fixed] Addresses race condition that can occur during the initialization of empty snapshots.
+
 # v4.1.1
 - [fixed] Fixed warnings for callback types with missing argument specifications in Xcode 9.
 

+ 0 - 77
Firebase/Firebase/FirebaseCommunity.h

@@ -1,77 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#if !defined(__has_include)
-  #error "Firebase.h won't import anything if your compiler doesn't support __has_include. Please \
-          import the headers individually."
-#else
-  #if __has_include(<FirebaseCommunity/FirebaseCore.h>)
-    #import <FirebaseCommunity/FirebaseCore.h>
-  #endif
-
-  #if __has_include(<FirebaseAnalytics/FirebaseAnalytics.h>)
-    #import <FirebaseAnalytics/FirebaseAnalytics.h>
-  #endif
-
-  #if __has_include(<FirebaseCommunity/FirebaseAuth.h>)
-    #import <FirebaseCommunity/FirebaseAuth.h>
-  #endif
-
-  #if __has_include(<FirebaseCrash/FirebaseCrash.h>)
-    #import <FirebaseCrash/FirebaseCrash.h>
-  #endif
-
-  #if __has_include(<FirebaseCommunity/FirebaseDatabase.h>)
-    #import <FirebaseCommunity/FirebaseDatabase.h>
-  #endif
-
-  #if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
-    #import <FirebaseDynamicLinks/FirebaseDynamicLinks.h>
-  #endif
-
-  #if __has_include(<Firebase/FirebaseInstanceID.h>)
-    #import <Firebase/FirebaseInstanceID.h>
-  #endif
-
-  #if __has_include(<FirebaseInvites/FirebaseInvites.h>)
-    #import <FirebaseInvites/FirebaseInvites.h>
-  #endif
-
-  #if __has_include(<FirebaseCommunity/FirebaseMessaging.h>)
-    #import <FirebaseCommunity/FirebaseMessaging.h>
-  #endif
-
-  #if __has_include(<FirebaseRemoteConfig/FirebaseRemoteConfig.h>)
-    #import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
-  #endif
-
-  #if __has_include(<FirebaseCommunity/FirebaseStorage.h>)
-    #import <FirebaseCommunity/FirebaseStorage.h>
-  #endif
-
-  #if __has_include(<GoogleMobileAds/GoogleMobileAds.h>)
-    #import <GoogleMobileAds/GoogleMobileAds.h>
-  #endif
-
-  #if __has_include(<Fabric/Fabric.h>)
-    #import <Fabric/Fabric.h>
-  #endif
-
-  #if __has_include(<Crashlytics/Crashlytics.h>)
-    #import <Crashlytics/Crashlytics.h>
-  #endif
-
-#endif  // defined(__has_include)

+ 0 - 6
Firebase/Firebase/module.modulemap

@@ -1,6 +0,0 @@
-framework module FirebaseCommunity {
-  umbrella header "FirebaseCommunity.h"
-
-  export *
-  module * { export * }
-}

+ 0 - 17
Firebase/Messaging/FIRMessagingDataMessageManager.m

@@ -31,14 +31,10 @@
 #import "FIRMessagingUtilities.h"
 #import "NSError+FIRMessaging.h"
 
-// The Notification used to send InstanceID messages that FIRMessaging receives.
-static NSString *const NOTIFICATION_IID_MESSAGE = @"com.google.gcm/notification/iid";
-
 static const int kMaxAppDataSizeDefault = 4 * 1024; // 4k
 static const int kMinDelaySeconds = 1; // 1 second
 static const int kMaxDelaySeconds = 60 * 60; // 1 hour
 
-static NSString *const kFromForInstanceIDMessages = @"google.com/iid";
 static NSString *const kFromForFIRMessagingMessages = @"mcs.android.com";
 static NSString *const kGSFMessageCategory = @"com.google.android.gsf.gtalkservice";
 // TODO: Update Gcm to FIRMessaging in the constants below
@@ -126,19 +122,6 @@ typedef NS_ENUM(int8_t, UpstreamForceReconnect) {
   } else if ([kFromForFIRMessagingMessages isEqualToString:from]) {
     [self handleMCSDataMessage:dataMessage];
     return nil;
-  } else if ([kFromForInstanceIDMessages isEqualToString:from]) {
-    // send message to InstanceID library.
-    NSMutableDictionary *message = [NSMutableDictionary dictionary];
-    for (GtalkAppData *item in dataMessage.appDataArray) {
-      _FIRMessagingDevAssert(item.key && item.value, @"Invalid app data item");
-      if (item.key && item.value) {
-        message[item.key] = item.value;
-      }
-    }
-
-    [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_IID_MESSAGE
-                                                        object:message];
-    return nil;
   }
 
   return [self parseDataMessage:dataMessage];

+ 3 - 0
Firebase/Storage/CHANGELOG.md

@@ -1,3 +1,6 @@
+# v2.1.0
+- [added] Added 'md5Hash' to FIRStorageMetadata.
+
 # v2.0.2
 - [changed] Custom FIRStorageMetadata can now be cleared by setting individual properties to 'nil'.
 

+ 68 - 0
FirebaseAuth.podspec

@@ -0,0 +1,68 @@
+Pod::Spec.new do |s|
+  s.name             = 'FirebaseAuth'
+  s.version          = '4.3.2'
+  s.summary          = 'The official iOS client for Firebase Authentication'
+
+  s.description      = <<-DESC
+Firebase Authentication allows you to manage your own account system without any backend code. It
+supports email and password accounts, as well as several 3rd party authentication mechanisms.
+                       DESC
+
+  s.homepage         = 'https://firebase.google.com'
+  s.license          = { :type => 'Apache', :file => 'LICENSE' }
+  s.authors          = 'Google, Inc.'
+
+  s.source           = {
+    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
+    :tag => s.version.to_s
+  }
+  s.social_media_url = 'https://twitter.com/Firebase'
+  s.ios.deployment_target = '7.0'
+  s.osx.deployment_target = '10.10'
+  s.tvos.deployment_target = '10.0'
+
+  s.cocoapods_version = '>= 1.4.0.beta.2'
+  s.static_framework = true
+  s.prefix_header_file = false
+
+  source = 'Firebase/Auth/Source/'
+  s.source_files = source + '**/*.[mh]'
+  s.osx.exclude_files = [
+    source + '**/FIRAuthAppDelegateProxy.[mh]',
+    source + '**/FIRAuthNotificationManager.[mh]',
+    source + '**/FIRAuthAppCredentialManager.[mh]',
+    source + '**/FIRAuthAPNSTokenManager.[mh]',
+    source + '**/FIRAuthAPNSTokenType.[mh]',
+    source + '**/FIRAuthAPNSToken.[mh]',
+    source + '**/FIRAuthDefaultUIDelegate.[mh]',
+    source + '**/FIRAuthUIDelegate.h',
+    source + '**/FIRAuthURLPresenter.[mh]',
+    source + '**/FIRAuthWebView.[mh]',
+    source + '**/FIRAuthWebViewController.[mh]',
+    source + '**/FIRPhoneAuthCredential.[mh]',
+    source + '**/FIRPhoneAuthProvider.[mh]'
+  ]
+  s.tvos.exclude_files = [
+    source + '**/FIRAuthURLPresenter.[mh]',
+    source + '**/FIRAuthWebView.[mh]',
+    source + '**/FIRAuthWebViewController.[mh]',
+    source + '**/FIRPhoneAuthCredential.[mh]',
+    source + '**/FIRPhoneAuthProvider.[mh]'
+  ]
+  s.public_header_files = source + 'Public/*.h'
+  s.preserve_paths = [
+    'Firebase/Auth/README.md',
+    'Firebase/Auth/CHANGELOG.md'
+  ]
+  s.pod_target_xcconfig = {
+    'GCC_PREPROCESSOR_DEFINITIONS' =>
+      'FIRAuth_VERSION=' + s.version.to_s +
+      ' FIRAuth_MINOR_VERSION=' + s.version.to_s.split(".")[0] + "." + s.version.to_s.split(".")[1]
+  }
+  s.framework = 'SafariServices'
+  s.framework = 'Security'
+  s.dependency 'FirebaseCore', '~> 4.0'
+  s.ios.dependency 'FirebaseAnalytics', '~> 4.0'
+  s.dependency 'GTMSessionFetcher/Core', '~> 1.1'
+  s.dependency 'GoogleToolboxForMac/NSDictionary+URLArguments', '~> 2.1'
+end

+ 0 - 116
FirebaseCommunity.podspec

@@ -1,116 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseCommunity'
-  s.version          = '0.1.6'
-  s.summary          = 'Firebase Open Source Libraries for iOS.'
-
-  s.description      = <<-DESC
-Firebase Development CocoaPod including experimental and community supported features.
-                       DESC
-
-  s.homepage         = 'https://firebase.google.com'
-  s.license          = { :type => 'Apache', :file => 'LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  # NOTE that the FirebaseCommunity pod is NOT yet interchangeable with the Firebase pod
-  s.source           = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => s.version.to_s }
-  s.social_media_url = 'https://twitter.com/Firebase'
-  s.ios.deployment_target = '8.0'
-  s.osx.deployment_target = '10.10'
-  s.tvos.deployment_target = '10.0'
-  s.default_subspec  = 'Root'
-  s.preserve_paths = 'README.md'
-  s.module_map = 'Firebase/Firebase/module.modulemap'
-
-  s.subspec 'Root' do |sp|
-    sp.source_files = 'Firebase/Firebase/FirebaseCommunity.h'
-    sp.public_header_files = 'Firebase/Firebase/FirebaseCommunity.h'
-  end
-
-  s.subspec 'Core' do |sp|
-    sp.source_files = 'Firebase/Core/**/*.[mh]'
-    sp.public_header_files = 'Firebase/Core/Public/*.h','Firebase/Core/Private/*.h',
-    sp.private_header_files = 'Firebase/Core/Private/*.h'
-    sp.dependency 'GoogleToolboxForMac/NSData+zlib', '~> 2.1'
-    sp.dependency 'FirebaseCommunity/Root'
-  end
-
-  s.subspec 'Auth' do |sp|
-    sp.source_files = 'Firebase/Auth/Source/**/*.[mh]'
-    sp.osx.exclude_files =
-      'Firebase/Auth/Source/**/FIRAuthAppDelegateProxy.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthNotificationManager.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthAppCredentialManager.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthAPNSTokenManager.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthAPNSTokenType.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthAPNSToken.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthDefaultUIDelegate.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthUIDelegate.h',
-      'Firebase/Auth/Source/**/FIRAuthURLPresenter.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthWebView.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthWebViewController.[mh]',
-      'Firebase/Auth/Source/**/FIRPhoneAuthCredential.[mh]',
-      'Firebase/Auth/Source/**/FIRPhoneAuthProvider.[mh]'
-    sp.tvos.exclude_files =
-      'Firebase/Auth/Source/**/FIRAuthURLPresenter.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthWebView.[mh]',
-      'Firebase/Auth/Source/**/FIRAuthWebViewController.[mh]',
-      'Firebase/Auth/Source/**/FIRPhoneAuthCredential.[mh]',
-      'Firebase/Auth/Source/**/FIRPhoneAuthProvider.[mh]'
-    sp.public_header_files = 'Firebase/Auth/Source/Public/*.h'
-    sp.preserve_paths =
-      'Firebase/Auth/README.md',
-      'Firebase/Auth/CHANGELOG.md'
-    sp.xcconfig = { 'OTHER_CFLAGS' => '-DFIRAuth_VERSION=' + s.version.to_s +
-      ' -DFIRAuth_MINOR_VERSION=' + s.version.to_s.split(".")[0] + "." + s.version.to_s.split(".")[1]
-    }
-    sp.framework = 'SafariServices'
-    sp.framework = 'Security'
-    sp.dependency 'FirebaseCommunity/Core'
-    sp.dependency 'GTMSessionFetcher/Core', '~> 1.1'
-    sp.dependency 'GoogleToolboxForMac/NSDictionary+URLArguments', '~> 2.1'
-  end
-
-  s.subspec 'Database' do |sp|
-    sp.source_files = 'Firebase/Database/**/*.[mh]',
-      'Firebase/Database/third_party/Wrap-leveldb/APLevelDB.mm',
-      'Firebase/Database/third_party/SocketRocket/fbase64.c'
-    sp.public_header_files = 'Firebase/Database/Public/*.h'
-    sp.library = 'c++'
-    sp.library = 'icucore'
-    sp.framework = 'CFNetwork'
-    sp.framework = 'Security'
-    sp.framework = 'SystemConfiguration'
-    sp.dependency 'leveldb-library'
-    sp.dependency 'FirebaseCommunity/Core'
-    sp.xcconfig = { 'OTHER_CFLAGS' => '-DFIRDatabase_VERSION=' + s.version.to_s }
-  end
-
-  s.subspec 'Messaging' do |sp|
-    sp.platform = 'ios'
-    sp.source_files = 'Firebase/Messaging/**/*.[mh]'
-    sp.requires_arc = 'Firebase/Messaging/*.m'
-
-    sp.public_header_files = 'Firebase/Messaging/Public/*.h'
-    sp.library = 'sqlite3'
-    sp.xcconfig ={ 'GCC_PREPROCESSOR_DEFINITIONS' =>
-      '$(inherited) ' +
-      'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
-      'FIRMessaging_LIB_VERSION=' + String(s.version)
-    }
-    sp.framework = 'AddressBook'
-    sp.framework = 'SystemConfiguration'
-    sp.dependency 'FirebaseCommunity/Core'
-    sp.dependency 'GoogleToolboxForMac/Logger', '~> 2.1'
-    sp.dependency 'Protobuf', '~> 3.1'
-  end
-
-  s.subspec 'Storage' do |sp|
-    sp.source_files = 'Firebase/Storage/**/*.[mh]'
-    sp.public_header_files = 'Firebase/Storage/Public/*.h'
-    sp.ios.framework = 'MobileCoreServices'
-    sp.osx.framework = 'CoreServices'
-    sp.dependency 'FirebaseCommunity/Core'
-    sp.dependency 'GTMSessionFetcher/Core', '~> 1.1'
-    sp.xcconfig = { 'OTHER_CFLAGS' => '-DFIRStorage_VERSION=' + s.version.to_s }
-  end
-end

+ 32 - 0
FirebaseCore.podspec

@@ -0,0 +1,32 @@
+Pod::Spec.new do |s|
+  s.name             = 'FirebaseCore'
+  s.version          = '4.0.11'
+  s.summary          = 'Firebase Core for iOS'
+
+  s.description      = <<-DESC
+Firebase Core includes FIRApp and FIROptions which provide central configuration for other Firebase services.
+                       DESC
+
+  s.homepage         = 'https://firebase.google.com'
+  s.license          = { :type => 'Apache', :file => 'LICENSE' }
+  s.authors          = 'Google, Inc.'
+
+  s.source           = {
+    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
+    :tag => s.version.to_s
+  }
+  s.social_media_url = 'https://twitter.com/Firebase'
+  s.ios.deployment_target = '7.0'
+  s.osx.deployment_target = '10.10'
+  s.tvos.deployment_target = '10.0'
+
+  s.cocoapods_version = '>= 1.4.0.beta.2'
+  s.static_framework = true
+  s.prefix_header_file = false
+
+  s.source_files = 'Firebase/Core/**/*.[mh]'
+  s.public_header_files = 'Firebase/Core/Public/*.h', 'Firebase/Core/Private/*.h'
+  s.private_header_files = 'Firebase/Core/Private/*.h'
+  s.framework = 'SystemConfiguration'
+  s.dependency 'GoogleToolboxForMac/NSData+zlib', '~> 2.1'
+end

+ 40 - 0
FirebaseDatabase.podspec

@@ -0,0 +1,40 @@
+Pod::Spec.new do |s|
+  s.name             = 'FirebaseDatabase'
+  s.version          = '4.0.4'
+  s.summary          = 'Firebase Open Source Libraries for iOS.'
+
+  s.description      = <<-DESC
+Simplify your iOS development, grow your user base, and monetize more effectively with Firebase.
+                       DESC
+
+  s.homepage         = 'https://firebase.google.com'
+  s.license          = { :type => 'Apache', :file => 'LICENSE' }
+  s.authors          = 'Google, Inc.'
+
+  s.source           = {
+    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
+    :tag => s.version.to_s
+  }
+  s.social_media_url = 'https://twitter.com/Firebase'
+  s.ios.deployment_target = '7.0'
+  s.osx.deployment_target = '10.10'
+  s.tvos.deployment_target = '10.0'
+
+  s.cocoapods_version = '>= 1.4.0.beta.2'
+  s.static_framework = true
+  s.prefix_header_file = false
+
+  base_dir = "Firebase/Database/"
+  s.source_files = base_dir + '**/*.[mh]',
+    base_dir + 'third_party/Wrap-leveldb/APLevelDB.mm',
+    base_dir + 'third_party/SocketRocket/fbase64.c'
+  s.public_header_files = base_dir + 'Public/*.h'
+  s.libraries = ['c++', 'icucore']
+  s.frameworks = ['CFNetwork', 'Security', 'SystemConfiguration']
+  s.dependency 'leveldb-library', '~> 1.18'
+  s.dependency 'FirebaseCore', '~> 4.0'
+  s.ios.dependency 'FirebaseAnalytics', '~> 4.0'
+  s.pod_target_xcconfig = {
+    'GCC_PREPROCESSOR_DEFINITIONS' =>
+      'FIRDatabase_VERSION=' + s.version.to_s }
+end

+ 64 - 0
FirebaseFirestore.podspec

@@ -0,0 +1,64 @@
+#
+# Be sure to run `pod lib lint FirebaseFirestore.podspec' to ensure this is a
+# valid spec before submitting.
+#
+# Any lines starting with a # are optional, but their use is encouraged
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
+#
+
+Pod::Spec.new do |s|
+  s.name             = 'FirebaseFirestore'
+  s.version          = '0.9.2'
+  s.summary          = 'Google Cloud Firestore for iOS'
+
+  s.description      = <<-DESC
+Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
+                       DESC
+
+  s.homepage         = 'https://developers.google.com/'
+  s.license          = { :type => 'Apache', :file => 'LICENSE' }
+  s.authors          = 'Google, Inc.'
+
+  s.source           = { :git => 'https://github.com/TBD/Firestore.git', :tag => s.version.to_s }
+  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
+
+  s.ios.deployment_target = '7.0'
+
+  s.cocoapods_version = '>= 1.4.0.beta.2'
+  s.static_framework = true
+  s.prefix_header_file = false
+
+  s.source_files = [
+    'Firestore/Source/**/*',
+    'Firestore/Port/**/*',
+    'Firestore/Protos/objc/**/*.[hm]',
+    'Firestore/src/core/**/*.{h,cc}',
+    'Firestore/src/support/**/*.{h,cc}',
+    'Firestore/third_party/**/*.[mh]'
+  ]
+  s.requires_arc = [
+    'Firestore/Source/**/*',
+    'Firestore/third_party/**/*.[mh]'
+  ]
+  s.exclude_files = [
+    'Firestore/Port/*test.cc',
+    'Firestore/third_party/**/Tests/**'
+  ]
+  s.public_header_files = 'Firestore/Source/Public/*.h'
+
+  s.ios.dependency 'FirebaseAnalytics', '~> 4.0'
+  s.dependency 'FirebaseAuth', '~> 4.3'
+  s.dependency 'FirebaseCore', '~> 4.0'
+  s.dependency 'gRPC-ProtoRPC', '~> 1.0'
+  s.dependency 'leveldb-library', '~> 1.18'
+  s.dependency 'Protobuf', '~> 3.1'
+
+  s.frameworks = 'MobileCoreServices'
+  s.library = 'c++'
+  s.pod_target_xcconfig = {
+    'GCC_PREPROCESSOR_DEFINITIONS' =>
+      'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ',
+      'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
+      'OTHER_CFLAGS' => '-DFIRFirestore_VERSION=' + s.version.to_s
+  }
+end

+ 46 - 0
FirebaseMessaging.podspec

@@ -0,0 +1,46 @@
+Pod::Spec.new do |s|
+  s.name             = 'FirebaseMessaging'
+  s.version          = '2.0.6'
+  s.summary          = 'Firebase Messaging for iOS'
+
+  s.description      = <<-DESC
+Firebase Messaging for iOS is a service that allows you to send data from your server to your users'
+iOS device, and also to receive messages from devices on the same connection. The service handles
+all aspects of queueing of messages and delivery to the target iOS application running on the target
+device, and it is completely free.
+                       DESC
+
+  s.homepage         = 'https://firebase.google.com'
+  s.license          = { :type => 'Apache', :file => 'LICENSE' }
+  s.authors          = 'Google, Inc.'
+
+  s.source           = {
+    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
+    :tag => s.version.to_s
+  }
+  s.social_media_url = 'https://twitter.com/Firebase'
+  s.ios.deployment_target = '7.0'
+  s.osx.deployment_target = '10.10'
+
+  s.cocoapods_version = '>= 1.4.0.beta.2'
+  s.static_framework = true
+  s.prefix_header_file = false
+
+  base_dir = "Firebase/Messaging/"
+  s.source_files = base_dir + '**/*.[mh]'
+  s.requires_arc = base_dir + '*.m'
+  s.public_header_files = base_dir + 'Public/*.h'
+  s.library = 'sqlite3'
+  s.pod_target_xcconfig = {
+    'GCC_PREPROCESSOR_DEFINITIONS' =>
+      'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
+      'FIRMessaging_LIB_VERSION=' + String(s.version)
+  }
+  s.framework = 'AddressBook'
+  s.framework = 'SystemConfiguration'
+  s.dependency 'FirebaseCore', '~> 4.0'
+  s.ios.dependency 'FirebaseAnalytics', '~> 4.0'
+  s.dependency 'FirebaseInstanceID', '~> 2.0'
+  s.dependency 'GoogleToolboxForMac/Logger', '~> 2.1'
+  s.dependency 'Protobuf', '~> 3.1'
+end

+ 38 - 0
FirebaseStorage.podspec

@@ -0,0 +1,38 @@
+Pod::Spec.new do |s|
+  s.name             = 'FirebaseStorage'
+  s.version          = '2.0.2'
+  s.summary          = 'Firebase Storage for iOS'
+
+  s.description      = <<-DESC
+Firebase Storage provides robust, secure file uploads and downloads from Firebase SDKs, powered by Google Cloud Storage.
+                       DESC
+
+  s.homepage         = 'https://firebase.google.com'
+  s.license          = { :type => 'Apache', :file => 'LICENSE' }
+  s.authors          = 'Google, Inc.'
+
+  s.source           = {
+    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
+    :tag => s.version.to_s
+  }
+  s.social_media_url = 'https://twitter.com/Firebase'
+  s.ios.deployment_target = '7.0'
+  s.osx.deployment_target = '10.10'
+  s.tvos.deployment_target = '10.0'
+
+  s.cocoapods_version = '>= 1.4.0.beta.2'
+  s.static_framework = true
+  s.prefix_header_file = false
+
+  s.source_files = 'Firebase/Storage/**/*.[mh]'
+  s.public_header_files = 'Firebase/Storage/Public/*.h'
+  s.ios.framework = 'MobileCoreServices'
+  s.osx.framework = 'CoreServices'
+
+  s.dependency 'FirebaseCore', '~> 4.0'
+  s.ios.dependency 'FirebaseAnalytics', '~> 4.0'
+  s.dependency 'GTMSessionFetcher/Core', '~> 1.1'
+  s.pod_target_xcconfig = {
+    'GCC_PREPROCESSOR_DEFINITIONS' =>
+      'FIRStorage_VERSION=' + s.version.to_s }
+end

+ 18 - 0
Firestore/CMakeLists.txt

@@ -0,0 +1,18 @@
+# Copyright 2017 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include(${PROJECT_SOURCE_DIR}/cmake/external/googletest.cmake)
+
+add_subdirectory(src/support)
+add_subdirectory(test/support)

+ 21 - 65
Firestore/Example/Firestore.xcodeproj/project.pbxproj

@@ -24,6 +24,7 @@
 
 /* Begin PBXBuildFile section */
 		3B843E4C1F3A182900548890 /* remote_store_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */; };
+		5463926E1FBEDE28005031AA /* secure_random_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5463926D1FBEDE28005031AA /* secure_random_test.cc */; };
 		54764FAB1FAA0C320085E60A /* string_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54764FAA1FAA0C320085E60A /* string_util_test.cc */; };
 		54764FAF1FAA21B90085E60A /* FSTGoogleTestTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 54764FAE1FAA21B90085E60A /* FSTGoogleTestTests.mm */; };
 		5491BC721FB44593008B3588 /* FSTIntegrationTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5491BC711FB44593008B3588 /* FSTIntegrationTestCase.mm */; };
@@ -183,6 +184,7 @@
 		3B843E4A1F3930A400548890 /* remote_store_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = remote_store_spec_test.json; sourceTree = "<group>"; };
 		42491D7DC8C8CD245CC22B93 /* Pods-SwiftBuildTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftBuildTest.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftBuildTest/Pods-SwiftBuildTest.debug.xcconfig"; sourceTree = "<group>"; };
 		4EBC5F5ABE1FD097EFE5E224 /* Pods-Firestore_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example/Pods-Firestore_Example.release.xcconfig"; sourceTree = "<group>"; };
+		5463926D1FBEDE28005031AA /* secure_random_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = secure_random_test.cc; path = ../../test/support/secure_random_test.cc; sourceTree = "<group>"; };
 		54764FAA1FAA0C320085E60A /* string_util_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_util_test.cc; path = ../../Port/string_util_test.cc; sourceTree = "<group>"; };
 		54764FAE1FAA21B90085E60A /* FSTGoogleTestTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = FSTGoogleTestTests.mm; path = GoogleTest/FSTGoogleTestTests.mm; sourceTree = "<group>"; };
 		5491BC711FB44593008B3588 /* FSTIntegrationTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTIntegrationTestCase.mm; sourceTree = "<group>"; };
@@ -364,11 +366,20 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		5463926F1FBEDE2F005031AA /* support */ = {
+			isa = PBXGroup;
+			children = (
+				5463926D1FBEDE28005031AA /* secure_random_test.cc */,
+			);
+			name = support;
+			sourceTree = "<group>";
+		};
 		54764FAC1FAA0C390085E60A /* GoogleTests */ = {
 			isa = PBXGroup;
 			children = (
-				54764FAE1FAA21B90085E60A /* FSTGoogleTestTests.mm */,
 				54764FAD1FAA0C650085E60A /* Port */,
+				5463926F1FBEDE2F005031AA /* support */,
+				54764FAE1FAA21B90085E60A /* FSTGoogleTestTests.mm */,
 			);
 			name = GoogleTests;
 			sourceTree = "<group>";
@@ -903,8 +914,6 @@
 			inputPaths = (
 				"${SRCROOT}/Pods/Target Support Files/Pods-SwiftBuildTest/Pods-SwiftBuildTest-frameworks.sh",
 				"${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework",
-				"${BUILT_PRODUCTS_DIR}/FirebaseCommunity-Auth-Core-Root/FirebaseCommunity.framework",
-				"${BUILT_PRODUCTS_DIR}/Firestore/Firestore.framework",
 				"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
 				"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac-f0850809/GoogleToolboxForMac.framework",
 				"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
@@ -918,8 +927,6 @@
 			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCommunity.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Firestore.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
@@ -943,8 +950,6 @@
 			inputPaths = (
 				"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example/Pods-Firestore_Example-frameworks.sh",
 				"${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework",
-				"${BUILT_PRODUCTS_DIR}/FirebaseCommunity-Auth-Core-Root/FirebaseCommunity.framework",
-				"${BUILT_PRODUCTS_DIR}/Firestore/Firestore.framework",
 				"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
 				"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac-f0850809/GoogleToolboxForMac.framework",
 				"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
@@ -958,8 +963,6 @@
 			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCommunity.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Firestore.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
@@ -1033,7 +1036,6 @@
 			);
 			inputPaths = (
 				"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Tests/Pods-Firestore_Tests-frameworks.sh",
-				"${BUILT_PRODUCTS_DIR}/FirebaseCommunity-Core-Root/FirebaseCommunity.framework",
 				"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac-Defines-NSData+zlib/GoogleToolboxForMac.framework",
 				"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
 				"${BUILT_PRODUCTS_DIR}/GoogleTest/GoogleTest.framework",
@@ -1041,7 +1043,6 @@
 			);
 			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCommunity.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleTest.framework",
@@ -1077,13 +1078,11 @@
 			);
 			inputPaths = (
 				"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_IntegrationTests/Pods-Firestore_IntegrationTests-frameworks.sh",
-				"${BUILT_PRODUCTS_DIR}/FirebaseCommunity-Core-Root/FirebaseCommunity.framework",
 				"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac-Defines-NSData+zlib/GoogleToolboxForMac.framework",
 				"${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework",
 			);
 			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCommunity.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework",
 			);
@@ -1204,6 +1203,7 @@
 				DE51B1D91F0D490D0013853F /* FSTEagerGarbageCollectorTests.m in Sources */,
 				DE51B1E21F0D490D0013853F /* FSTMutationQueueTests.m in Sources */,
 				DE51B1E81F0D490D0013853F /* FSTLevelDBKeyTests.mm in Sources */,
+				5463926E1FBEDE28005031AA /* secure_random_test.cc in Sources */,
 				DE51B1E31F0D490D0013853F /* FSTPersistenceTestHelpers.m in Sources */,
 				DE51B1CF1F0D48CD0013853F /* FSTQueryListenerTests.m in Sources */,
 				DE51B1DA1F0D490D0013853F /* FSTLevelDBLocalStoreTests.m in Sources */,
@@ -1343,6 +1343,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "";
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
@@ -1376,6 +1377,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "";
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				SDKROOT = iphoneos;
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -1443,19 +1445,8 @@
 				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
-					"\"${PODS_ROOT}/../../Source\"",
-					"\"${PODS_ROOT}/../../Source/API\"",
-					"\"${PODS_ROOT}/../../Source/Core\"",
-					"\"${PODS_ROOT}/../../Source/Remote\"",
-					"\"${PODS_ROOT}/../../Source/Model\"",
-					"\"${PODS_ROOT}/../../third_party\"",
-					"\"${PODS_ROOT}/../../third_party/Immutable\"",
-					"\"${PODS_ROOT}/../../\"",
-					"\"${PODS_ROOT}/../../Protos/objc/firestore/local\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/firestore/v1beta1\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/api\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/rpc\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/type\"",
+					"\"${PODS_ROOT}/../../..\"",
+					"\"${PODS_ROOT}/leveldb-library/include\"",
 				);
 				INFOPLIST_FILE = "Tests/Tests-Info.plist";
 				PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
@@ -1485,19 +1476,8 @@
 				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
-					"\"${PODS_ROOT}/../../Source\"",
-					"\"${PODS_ROOT}/../../Source/API\"",
-					"\"${PODS_ROOT}/../../Source/Core\"",
-					"\"${PODS_ROOT}/../../Source/Remote\"",
-					"\"${PODS_ROOT}/../../Source/Model\"",
-					"\"${PODS_ROOT}/../../third_party\"",
-					"\"${PODS_ROOT}/../../third_party/Immutable\"",
-					"\"${PODS_ROOT}/../../Protos/objc/firebase/datastore/clients/proto\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/firestore/v1beta1\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/api\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/rpc\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/type\"",
-					"\"${PODS_ROOT}/../../\"",
+					"\"${PODS_ROOT}/../../..\"",
+					"\"${PODS_ROOT}/leveldb-library/include\"",
 				);
 				INFOPLIST_FILE = "Tests/Tests-Info.plist";
 				PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
@@ -1527,19 +1507,7 @@
 				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
-					"\"${PODS_ROOT}/../../Source\"",
-					"\"${PODS_ROOT}/../../Source/API\"",
-					"\"${PODS_ROOT}/../../Source/Core\"",
-					"\"${PODS_ROOT}/../../Source/Remote\"",
-					"\"${PODS_ROOT}/../../Source/Model\"",
-					"\"${PODS_ROOT}/../../third_party\"",
-					"\"${PODS_ROOT}/../../third_party/Immutable\"",
-					"\"${PODS_ROOT}/../../Protos/objc/firestore/local\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/firestore/v1beta1\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/api\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/rpc\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/type\"",
-					"\"${PODS_ROOT}/../../\"",
+					"\"${PODS_ROOT}/../../..\"",
 				);
 				INFOPLIST_FILE = "Tests/Tests-Info.plist";
 				OTHER_LDFLAGS = (
@@ -1577,19 +1545,7 @@
 				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
-					"\"${PODS_ROOT}/../../Source\"",
-					"\"${PODS_ROOT}/../../Source/API\"",
-					"\"${PODS_ROOT}/../../Source/Core\"",
-					"\"${PODS_ROOT}/../../Source/Remote\"",
-					"\"${PODS_ROOT}/../../Source/Model\"",
-					"\"${PODS_ROOT}/../../third_party\"",
-					"\"${PODS_ROOT}/../../third_party/Immutable\"",
-					"\"${PODS_ROOT}/../../Protos/objc/firestore/local\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/firestore/v1beta1\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/api\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/rpc\"",
-					"\"${PODS_ROOT}/../../Protos/objc/google/type\"",
-					"\"${PODS_ROOT}/../../\"",
+					"\"${PODS_ROOT}/../../..\"",
 				);
 				INFOPLIST_FILE = "Tests/Tests-Info.plist";
 				OTHER_LDFLAGS = (

+ 11 - 5
Firestore/Example/Podfile

@@ -1,14 +1,20 @@
+# The next line is the forcing function for the Firebase pod. The Firebase
+# version's subspecs should depend on the component versions in their
+# corresponding podspec's.
+pod 'Firebase/Core', '4.6.0'
+
 use_frameworks!
 platform :ios, '8.0'
 
 target 'Firestore_Example' do
-  pod 'FirebaseCommunity/Core', :path => '../../'
-  pod 'Firestore', :path => '../'
+  pod 'FirebaseAuth', :path => '../../'
+  pod 'FirebaseCore', :path => '../../'
+  pod 'FirebaseFirestore', :path => '../../'
 
   target 'Firestore_Tests' do
     inherit! :search_paths
 
-    pod 'FirebaseCommunity/Core', :path => '../../'
+    pod 'FirebaseCore', :path => '../../'
     pod 'leveldb-library'
 
     pod 'OCMock'
@@ -18,12 +24,12 @@ target 'Firestore_Example' do
   target 'Firestore_IntegrationTests' do
     inherit! :search_paths
 
-    pod 'FirebaseCommunity/Core', :path => '../../'
+    pod 'FirebaseCore', :path => '../../'
 
     pod 'OCMock'
   end
 end
 
 target 'SwiftBuildTest' do
-  pod 'Firestore', :path => '../'
+  pod 'FirebaseFirestore', :path => '../../'
 end

+ 1 - 1
Firestore/Example/SwiftBuildTest/main.swift

@@ -16,7 +16,7 @@
 
 import Foundation
 
-import Firestore
+import FirebaseFirestore
 
 func main() {
     let db = initializeDb();

+ 2 - 2
Firestore/Example/Tests/API/FIRGeoPointTests.m

@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#import "Firestore/FIRGeoPoint.h"
+#import "FirebaseFirestore/FIRGeoPoint.h"
 
 #import <XCTest/XCTest.h>
 
-#import "FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 2 - 2
Firestore/Example/Tests/Core/FSTDatabaseInfoTests.m

@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#import "Core/FSTDatabaseInfo.h"
+#import "Firestore/Source/Core/FSTDatabaseInfo.h"
 
 #import <XCTest/XCTest.h>
 
-#import "Model/FSTDatabaseID.h"
+#import "Firestore/Source/Model/FSTDatabaseID.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 6 - 6
Firestore/Example/Tests/Core/FSTEventManagerTests.m

@@ -14,17 +14,17 @@
  * limitations under the License.
  */
 
-#import "Core/FSTEventManager.h"
+#import "Firestore/Source/Core/FSTEventManager.h"
 
 #import <OCMock/OCMock.h>
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTQuery.h"
-#import "Core/FSTSyncEngine.h"
-#import "Model/FSTDocumentSet.h"
-#import "Util/FSTDispatchQueue.h"
+#import "Firestore/Source/Core/FSTQuery.h"
+#import "Firestore/Source/Core/FSTSyncEngine.h"
+#import "Firestore/Source/Model/FSTDocumentSet.h"
+#import "Firestore/Source/Util/FSTDispatchQueue.h"
 
-#import "FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 9 - 9
Firestore/Example/Tests/Core/FSTQueryListenerTests.m

@@ -14,19 +14,19 @@
  * limitations under the License.
  */
 
-#import "Core/FSTEventManager.h"
+#import "Firestore/Source/Core/FSTEventManager.h"
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTQuery.h"
-#import "Core/FSTView.h"
-#import "Model/FSTDocument.h"
-#import "Model/FSTDocumentSet.h"
-#import "Remote/FSTRemoteEvent.h"
-#import "Util/FSTAsyncQueryListener.h"
-#import "Util/FSTDispatchQueue.h"
+#import "Firestore/Source/Core/FSTQuery.h"
+#import "Firestore/Source/Core/FSTView.h"
+#import "Firestore/Source/Model/FSTDocument.h"
+#import "Firestore/Source/Model/FSTDocumentSet.h"
+#import "Firestore/Source/Remote/FSTRemoteEvent.h"
+#import "Firestore/Source/Util/FSTAsyncQueryListener.h"
+#import "Firestore/Source/Util/FSTDispatchQueue.h"
 
-#import "FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 7 - 7
Firestore/Example/Tests/Core/FSTQueryTests.m

@@ -14,17 +14,17 @@
  * limitations under the License.
  */
 
-#import "Core/FSTQuery.h"
+#import "Firestore/Source/Core/FSTQuery.h"
 
 #import <XCTest/XCTest.h>
 
-#import "API/FIRFirestore+Internal.h"
-#import "Model/FSTDatabaseID.h"
-#import "Model/FSTDocument.h"
-#import "Model/FSTDocumentKey.h"
-#import "Model/FSTPath.h"
+#import "Firestore/Source/API/FIRFirestore+Internal.h"
+#import "Firestore/Source/Model/FSTDatabaseID.h"
+#import "Firestore/Source/Model/FSTDocument.h"
+#import "Firestore/Source/Model/FSTDocumentKey.h"
+#import "Firestore/Source/Model/FSTPath.h"
 
-#import "FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 1 - 1
Firestore/Example/Tests/Core/FSTSyncEngine+Testing.h

@@ -16,7 +16,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "Core/FSTSyncEngine.h"
+#import "Firestore/Source/Core/FSTSyncEngine.h"
 
 @class FSTDocumentKey;
 

+ 1 - 1
Firestore/Example/Tests/Core/FSTTargetIDGeneratorTests.m

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#import "Core/FSTTargetIDGenerator.h"
+#import "Firestore/Source/Core/FSTTargetIDGenerator.h"
 
 #import <XCTest/XCTest.h>
 

+ 3 - 3
Firestore/Example/Tests/Core/FSTTimestampTests.m

@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#import "Core/FSTTimestamp.h"
+#import "Firestore/Source/Core/FSTTimestamp.h"
 
 #import <XCTest/XCTest.h>
 
-#import "Util/FSTAssert.h"
+#import "Firestore/Source/Util/FSTAssert.h"
 
-#import "FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 6 - 6
Firestore/Example/Tests/Core/FSTViewSnapshotTest.m

@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#import "Core/FSTViewSnapshot.h"
+#import "Firestore/Source/Core/FSTViewSnapshot.h"
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTQuery.h"
-#import "Model/FSTDocument.h"
-#import "Model/FSTDocumentSet.h"
-#import "Model/FSTPath.h"
+#import "Firestore/Source/Core/FSTQuery.h"
+#import "Firestore/Source/Model/FSTDocument.h"
+#import "Firestore/Source/Model/FSTDocumentSet.h"
+#import "Firestore/Source/Model/FSTPath.h"
 
-#import "FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 12 - 12
Firestore/Example/Tests/Core/FSTViewTests.m

@@ -14,21 +14,21 @@
  * limitations under the License.
  */
 
-#import "Core/FSTView.h"
+#import "Firestore/Source/Core/FSTView.h"
 
 #import <XCTest/XCTest.h>
 
-#import "API/FIRFirestore+Internal.h"
-#import "Core/FSTQuery.h"
-#import "Core/FSTViewSnapshot.h"
-#import "Model/FSTDocument.h"
-#import "Model/FSTDocumentKey.h"
-#import "Model/FSTDocumentSet.h"
-#import "Model/FSTFieldValue.h"
-#import "Model/FSTPath.h"
-#import "Remote/FSTRemoteEvent.h"
-
-#import "FSTHelpers.h"
+#import "Firestore/Source/API/FIRFirestore+Internal.h"
+#import "Firestore/Source/Core/FSTQuery.h"
+#import "Firestore/Source/Core/FSTViewSnapshot.h"
+#import "Firestore/Source/Model/FSTDocument.h"
+#import "Firestore/Source/Model/FSTDocumentKey.h"
+#import "Firestore/Source/Model/FSTDocumentSet.h"
+#import "Firestore/Source/Model/FSTFieldValue.h"
+#import "Firestore/Source/Model/FSTPath.h"
+#import "Firestore/Source/Remote/FSTRemoteEvent.h"
+
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 26 - 26
Firestore/Example/Tests/GoogleTest/FSTGoogleTestTests.mm

@@ -17,7 +17,7 @@
 #import <XCTest/XCTest.h>
 #import <objc/runtime.h>
 
-#include "Util/FSTAssert.h"
+#include "Firestore/Source/Util/FSTAssert.h"
 #include "gtest/gtest.h"
 
 /**
@@ -262,32 +262,10 @@ XCTestSuite *CreateAllTestsTestSuite() {
 }
 
 /**
- * A pseudo-constructor that dynamically generates all the XCTestCase subclasses.
- *
- * For background, the Objective-C runtime and XCTest initialize things in the following order:
- *
- *  1. Objective-C calls +load on every class in the bundle.
- *  2. C++ constructors are called.
- *  3. Any NSPrincipalClass in the test bundle's Info.plist is instantiated.
- *  4. Objective-C calls +initialize on every class that's referenced, lazily.
- *  5. XCTest calls +defaultTestSuite on every class that's a subclass of XCTestCase that matches
- *     its notion of which tests to run.
- *
- * All stages only run on all XCTestCase classes if the user runs all tests. Otherwise:
- *   * When a user is focusing on a test case XCTest only calls +defaultTestSuite (and triggers
- *     +initialize) on that specific test.
- *   * When a user is focusing on a test method XCTest does not call +defaultTestSuite at all
- *     (+initialize still runs).
- *
- * This means that +initialize or +defaultTestSuite on some fixed class like GoogleTests can't be
- * used to bootstrap the generated classes because these steps can be skipped if the user focuses
- * on the wrong thing. NSPrincipalClass would work, but requires frobbing the Info.plist, which is
- * a manual step in project configuration which is error prone.
- *
- * Meanwhile even though __attribute__((constructor)) is a GCC and Clang extension those are the
- * only compilers we care about for Objective-C so it's not that bad.
+ * Finds and runs googletest-based tests based on the XCTestConfiguration of the current test
+ * invocation.
  */
-__attribute__((constructor)) void RegisterGoogleTestTests() {
+void RunGoogleTestTests() {
   NSString *masterTestCaseName = NSStringFromClass([GoogleTests class]);
 
   // Initialize GoogleTest but don't run the tests yet.
@@ -303,9 +281,11 @@ __attribute__((constructor)) void RegisterGoogleTestTests() {
   NSSet<NSString *> *testsToRun = LoadXCTestConfigurationTestsToRun();
   if (testsToRun) {
     if ([allTests isEqual:testsToRun]) {
+      NSLog(@"Forcing all tests to run");
       forceAllTests = YES;
     } else {
       NSString *filters = CreateTestFiltersFromTestsToRun(testsToRun);
+      NSLog(@"Using --gtest_filter=%@", filters);
       if (filters) {
         testing::GTEST_FLAG(filter) = [filters UTF8String];
       }
@@ -356,3 +336,23 @@ __attribute__((constructor)) void RegisterGoogleTestTests() {
 }
 
 @end
+
+/**
+ * This class is registered as the NSPrincipalClass in the Firestore_Tests bundle's Info.plist.
+ * XCTest instantiates this class to perform one-time setup for the test bundle, as documented
+ * here:
+ *
+ *   https://developer.apple.com/documentation/xctest/xctestobservationcenter
+ */
+@interface FSTGoogleTestsPrincipal : NSObject
+@end
+
+@implementation FSTGoogleTestsPrincipal
+
+- (instancetype)init {
+  self = [super init];
+  RunGoogleTestTests();
+  return self;
+}
+
+@end

+ 2 - 2
Firestore/Example/Tests/Integration/API/FIRCursorTests.m

@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
 
 @interface FIRCursorTests : FSTIntegrationTestCase
 @end

+ 4 - 4
Firestore/Example/Tests/Integration/API/FIRDatabaseTests.m

@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTFirestoreClient.h"
-#import "FIRFirestore+Internal.h"
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
+#import "Firestore/Source/API/FIRFirestore+Internal.h"
+#import "Firestore/Source/Core/FSTFirestoreClient.h"
 
 @interface FIRDatabaseTests : FSTIntegrationTestCase
 @end

+ 3 - 3
Firestore/Example/Tests/Integration/API/FIRFieldsTests.m

@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTFirestoreClient.h"
+#import "Firestore/Source/Core/FSTFirestoreClient.h"
 
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
 
 @interface FIRFieldsTests : FSTIntegrationTestCase
 @end

+ 4 - 4
Firestore/Example/Tests/Integration/API/FIRListenerRegistrationTests.m

@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTFirestoreClient.h"
-#import "FIRFirestore+Internal.h"
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
+#import "Firestore/Source/API/FIRFirestore+Internal.h"
+#import "Firestore/Source/Core/FSTFirestoreClient.h"
 
 @interface FIRListenerRegistrationTests : FSTIntegrationTestCase
 @end

+ 3 - 3
Firestore/Example/Tests/Integration/API/FIRQueryTests.m

@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTFirestoreClient.h"
+#import "Firestore/Source/Core/FSTFirestoreClient.h"
 
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
 
 @interface FIRQueryTests : FSTIntegrationTestCase
 @end

+ 4 - 4
Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.m

@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "Core/FSTFirestoreClient.h"
+#import "Firestore/Source/Core/FSTFirestoreClient.h"
 
-#import "FSTEventAccumulator.h"
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTEventAccumulator.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
 
 @interface FIRServerTimestampTests : FSTIntegrationTestCase
 @end

+ 2 - 2
Firestore/Example/Tests/Integration/API/FIRTypeTests.m

@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
 
 @interface FIRTypeTests : FSTIntegrationTestCase
 @end

+ 3 - 3
Firestore/Example/Tests/Integration/API/FIRValidationTests.m

@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-@import Firestore;
+@import FirebaseFirestore;
 
 #import <XCTest/XCTest.h>
 
-#import "FSTHelpers.h"
-#import "FSTIntegrationTestCase.h"
+#import "Firestore/Example/Tests/Util/FSTHelpers.h"
+#import "Firestore/Example/Tests/Util/FSTIntegrationTestCase.h"
 
 // We have tests for passing nil when nil is not supposed to be allowed. So suppress the warnings.
 #pragma clang diagnostic ignored "-Wnonnull"

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików