From d1ee622dfbd3955e68f68451df17bcdd58fafa49 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 17 Apr 2018 07:02:01 -0700 Subject: podspec updates for Firebase 5 --- FirebaseAuth.podspec | 12 ++++++------ FirebaseCore.podspec | 10 +++++----- FirebaseDatabase.podspec | 12 ++++++------ FirebaseFirestore.podspec | 22 ++++++++-------------- FirebaseFunctions.podspec | 18 +++++++----------- FirebaseMessaging.podspec | 13 ++++++------- FirebaseStorage.podspec | 12 ++++++------ 7 files changed, 44 insertions(+), 55 deletions(-) diff --git a/FirebaseAuth.podspec b/FirebaseAuth.podspec index 7c300f1..4dfc9c8 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseAuth' - s.version = '4.6.1' - s.summary = 'The official iOS client for Firebase Authentication' + s.version = '5.0.0' + s.summary = 'The official iOS client for Firebase Authentication (plus experimental support for macOS and tvOS)' s.description = <<-DESC Firebase Authentication allows you to manage your own account system without any backend code. It @@ -14,10 +14,10 @@ supports email and password accounts, as well as several 3rd party authenticatio s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', - :tag => s.version.to_s + :tag => 'Auth-' + s.version.to_s } s.social_media_url = 'https://twitter.com/Firebase' - s.ios.deployment_target = '7.0' + s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '10.0' @@ -61,7 +61,7 @@ supports email and password accounts, as well as several 3rd party authenticatio } s.framework = 'SafariServices' s.framework = 'Security' - s.dependency 'FirebaseCore', '~> 4.0' - s.ios.dependency 'FirebaseAnalytics', '~> 4.0' + s.dependency 'FirebaseCore', '~> 5.0' + s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.dependency 'GTMSessionFetcher/Core', '~> 1.1' end diff --git a/FirebaseCore.podspec b/FirebaseCore.podspec index d25a979..b3dcb7e 100644 --- a/FirebaseCore.podspec +++ b/FirebaseCore.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseCore' - s.version = '4.0.20' - s.summary = 'Firebase Core for iOS' + s.version = '5.0.0' + s.summary = 'Firebase Core for iOS (plus experimental support for macOS and tvOS)' s.description = <<-DESC Firebase Core includes FIRApp and FIROptions which provide central configuration for other Firebase services. @@ -13,10 +13,10 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', - :tag => s.version.to_s + :tag => 'Core-' + s.version.to_s } s.social_media_url = 'https://twitter.com/Firebase' - s.ios.deployment_target = '7.0' + s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '10.0' @@ -34,6 +34,6 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration s.dependency 'GoogleToolboxForMac/NSData+zlib', '~> 2.1' s.pod_target_xcconfig = { 'OTHER_CFLAGS' => '-fno-autolink ' + - '-DFIRCore_VERSION=' + s.version.to_s + ' -DFirebase_VERSION=4.13.0' + '-DFIRCore_VERSION=' + s.version.to_s + ' -DFirebase_VERSION=5.0.0' } end diff --git a/FirebaseDatabase.podspec b/FirebaseDatabase.podspec index 6138536..45c48ea 100644 --- a/FirebaseDatabase.podspec +++ b/FirebaseDatabase.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseDatabase' - s.version = '4.1.5' - s.summary = 'Firebase Open Source Libraries for iOS.' + s.version = '5.0.0' + s.summary = 'Firebase Open Source Libraries for iOS (plus experimental support for macOS and tvOS)' s.description = <<-DESC Simplify your iOS development, grow your user base, and monetize more effectively with Firebase. @@ -13,10 +13,10 @@ Simplify your iOS development, grow your user base, and monetize more effectivel s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', - :tag => s.version.to_s + :tag => 'Database-' + s.version.to_s } s.social_media_url = 'https://twitter.com/Firebase' - s.ios.deployment_target = '7.0' + s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '10.0' @@ -32,8 +32,8 @@ Simplify your iOS development, grow your user base, and monetize more effectivel 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.dependency 'FirebaseCore', '~> 5.0' + s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'FIRDatabase_VERSION=' + s.version.to_s } diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index fb94328..ec82581 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -1,14 +1,6 @@ -# -# 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.11.0' + s.version = '0.12.0' s.summary = 'Google Cloud Firestore for iOS' s.description = <<-DESC @@ -19,10 +11,12 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, 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/' + s.source = { + :git => 'https://github.com/firebase/firebase-ios-sdk.git', + :tag => 'Firestore-' + s.version.to_s + } - s.ios.deployment_target = '7.0' + s.ios.deployment_target = '8.0' s.cocoapods_version = '>= 1.4.0' s.static_framework = true @@ -53,8 +47,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, ] s.public_header_files = 'Firestore/Source/Public/*.h' - s.ios.dependency 'FirebaseAnalytics', '~> 4.0' - s.dependency 'FirebaseCore', '~> 4.0' + s.ios.dependency 'FirebaseAnalytics', '~> 5.0' + s.dependency 'FirebaseCore', '~> 5.0' s.dependency 'gRPC-ProtoRPC', '~> 1.0' s.dependency 'leveldb-library', '~> 1.18' s.dependency 'Protobuf', '~> 3.1' diff --git a/FirebaseFunctions.podspec b/FirebaseFunctions.podspec index caf3023..731105c 100644 --- a/FirebaseFunctions.podspec +++ b/FirebaseFunctions.podspec @@ -1,14 +1,6 @@ -# -# Be sure to run `pod lib lint FirebaseFunctions.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 = 'FirebaseFunctions' - s.version = '1.0.0' + s.version = '2.0.0' s.summary = 'Cloud Functions for Firebase iOS SDK.' s.description = <<-DESC @@ -16,8 +8,12 @@ iOS SDK for Cloud Functions for Firebase. DESC s.homepage = 'https://developers.google.com/' + s.license = { :type => 'Apache', :file => 'LICENSE' } s.authors = 'Google, Inc.' - s.source = { :git => 'https://github.com/TBD/FirebaseFunctions.git', :tag => s.version.to_s } + s.source = { + :git => 'https://github.com/firebase/firebase-ios-sdk.git', + :tag => 'Functions-' + s.version.to_s + } s.ios.deployment_target = '8.0' @@ -28,6 +24,6 @@ iOS SDK for Cloud Functions for Firebase. s.source_files = 'Functions/FirebaseFunctions/**/*' s.public_header_files = 'Functions/FirebaseFunctions/Public/*.h' - s.dependency 'FirebaseCore', '~> 4.0' + s.dependency 'FirebaseCore', '~> 5.0' s.dependency 'GTMSessionFetcher/Core', '~> 1.1' end diff --git a/FirebaseMessaging.podspec b/FirebaseMessaging.podspec index 5484013..c2f93da 100644 --- a/FirebaseMessaging.podspec +++ b/FirebaseMessaging.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseMessaging' - s.version = '2.2.0' + s.version = '3.0.0' s.summary = 'Firebase Messaging for iOS' s.description = <<-DESC @@ -16,11 +16,10 @@ device, and it is completely free. s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', - :tag => s.version.to_s + :tag => 'Messaging-' + 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.ios.deployment_target = '8.0' s.cocoapods_version = '>= 1.4.0' s.static_framework = true @@ -38,9 +37,9 @@ device, and it is completely free. } s.framework = 'AddressBook' s.framework = 'SystemConfiguration' - s.dependency 'FirebaseCore', '~> 4.0' - s.ios.dependency 'FirebaseAnalytics', '~> 4.0' - s.dependency 'FirebaseInstanceID', '~> 2.0' + s.dependency 'FirebaseCore', '~> 5.0' + s.ios.dependency 'FirebaseAnalytics', '~> 5.0' + s.dependency 'FirebaseInstanceID', '~> 3.0' s.dependency 'GoogleToolboxForMac/Logger', '~> 2.1' s.dependency 'Protobuf', '~> 3.1' end diff --git a/FirebaseStorage.podspec b/FirebaseStorage.podspec index f3b8f2a..a59afac 100644 --- a/FirebaseStorage.podspec +++ b/FirebaseStorage.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseStorage' - s.version = '2.2.0' - s.summary = 'Firebase Storage for iOS' + s.version = '3.0.0' + s.summary = 'Firebase Storage for iOS (plus experimental support for macOS and tvOS)' s.description = <<-DESC Firebase Storage provides robust, secure file uploads and downloads from Firebase SDKs, powered by Google Cloud Storage. @@ -13,10 +13,10 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', - :tag => s.version.to_s + :tag => 'Storage-' + s.version.to_s } s.social_media_url = 'https://twitter.com/Firebase' - s.ios.deployment_target = '7.0' + s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '10.0' @@ -29,8 +29,8 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas s.ios.framework = 'MobileCoreServices' s.osx.framework = 'CoreServices' - s.dependency 'FirebaseCore', '~> 4.0' - s.ios.dependency 'FirebaseAnalytics', '~> 4.0' + s.dependency 'FirebaseCore', '~> 5.0' + s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.dependency 'GTMSessionFetcher/Core', '~> 1.1' s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => -- cgit v1.2.3 From 71aaeb57b1024c55819a6469245bb47e4905086a Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 17 Apr 2018 16:54:36 -0700 Subject: Remove non-technical FirebaseAnalytics dependencies (#1130) --- FirebaseAuth.podspec | 1 - FirebaseDatabase.podspec | 1 - FirebaseFirestore.podspec | 1 - FirebaseMessaging.podspec | 1 - FirebaseStorage.podspec | 1 - 5 files changed, 5 deletions(-) diff --git a/FirebaseAuth.podspec b/FirebaseAuth.podspec index 4dfc9c8..18a5ed5 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -62,6 +62,5 @@ supports email and password accounts, as well as several 3rd party authenticatio s.framework = 'SafariServices' s.framework = 'Security' s.dependency 'FirebaseCore', '~> 5.0' - s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.dependency 'GTMSessionFetcher/Core', '~> 1.1' end diff --git a/FirebaseDatabase.podspec b/FirebaseDatabase.podspec index 45c48ea..8b91495 100644 --- a/FirebaseDatabase.podspec +++ b/FirebaseDatabase.podspec @@ -33,7 +33,6 @@ Simplify your iOS development, grow your user base, and monetize more effectivel s.frameworks = ['CFNetwork', 'Security', 'SystemConfiguration'] s.dependency 'leveldb-library', '~> 1.18' s.dependency 'FirebaseCore', '~> 5.0' - s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'FIRDatabase_VERSION=' + s.version.to_s } diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index ec82581..2af2606 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -47,7 +47,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, ] s.public_header_files = 'Firestore/Source/Public/*.h' - s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.dependency 'FirebaseCore', '~> 5.0' s.dependency 'gRPC-ProtoRPC', '~> 1.0' s.dependency 'leveldb-library', '~> 1.18' diff --git a/FirebaseMessaging.podspec b/FirebaseMessaging.podspec index c2f93da..ad10553 100644 --- a/FirebaseMessaging.podspec +++ b/FirebaseMessaging.podspec @@ -38,7 +38,6 @@ device, and it is completely free. s.framework = 'AddressBook' s.framework = 'SystemConfiguration' s.dependency 'FirebaseCore', '~> 5.0' - s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.dependency 'FirebaseInstanceID', '~> 3.0' s.dependency 'GoogleToolboxForMac/Logger', '~> 2.1' s.dependency 'Protobuf', '~> 3.1' diff --git a/FirebaseStorage.podspec b/FirebaseStorage.podspec index a59afac..27bf412 100644 --- a/FirebaseStorage.podspec +++ b/FirebaseStorage.podspec @@ -30,7 +30,6 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas s.osx.framework = 'CoreServices' s.dependency 'FirebaseCore', '~> 5.0' - s.ios.dependency 'FirebaseAnalytics', '~> 5.0' s.dependency 'GTMSessionFetcher/Core', '~> 1.1' s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => -- cgit v1.2.3 From fbd5acb785bd3fc10d966c621fe4c1fc2f96c29a Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 18 Apr 2018 07:01:02 -0700 Subject: Temporary 5.0.0 release management scripts (#1133) --- scripts/push-pods.sh | 30 ++++++++++++++++++++++++++ scripts/update-tags.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100755 scripts/push-pods.sh create mode 100755 scripts/update-tags.sh diff --git a/scripts/push-pods.sh b/scripts/push-pods.sh new file mode 100755 index 0000000..f40957b --- /dev/null +++ b/scripts/push-pods.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Copyright 2018 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. + +# Push all the io2018 pods + +# When bootstrapping a repo, FirebaseCore must be pushed first, then +# FirebaseInstanceID, then FirebaseAnalytics, then the rest +# Most of the warnings are tvOS specific. The Firestore one needs +# investigation. + +pod repo push io2018 FirebaseCore.podspec +pod repo push io2018 FirebaseAuth.podspec --allow-warnings +pod repo push io2018 FirebaseDatabase.podspec --allow-warnings +pod repo push io2018 FirebaseFirestore.podspec --allow-warnings +pod repo push io2018 FirebaseFunctions.podspec +pod repo push io2018 FirebaseMessaging.podspec +pod repo push io2018 FirebaseStorage.podspec --allow-warnings diff --git a/scripts/update-tags.sh b/scripts/update-tags.sh new file mode 100755 index 0000000..3db0de9 --- /dev/null +++ b/scripts/update-tags.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Copyright 2018 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. + +# Update the tags for the Firebase 5.0.0 release process + +# Before running, make sure everything is pushed. + +# This script should be a spec for a more robust Python or Swift script that +# does the following. +# 1. Verify all files are committed +# 2. Verify running on a release branch +# 3. Read the versions from the podspec (or incorporate into even more +# automated version management) + +# Delete any existing tags at origin + +git push --delete origin 'Core-5.0.0' +git push --delete origin 'Auth-5.0.0' +git push --delete origin 'Database-5.0.0' +git push --delete origin 'Firestore-0.12.0' +git push --delete origin 'Functions-2.0.0' +git push --delete origin 'Messaging-3.0.0' +git push --delete origin 'Storage-3.0.0' + +# Delete local tags + +git tag --delete 'Core-5.0.0' +git tag --delete 'Auth-5.0.0' +git tag --delete 'Database-5.0.0' +git tag --delete 'Firestore-0.12.0' +git tag --delete 'Functions-2.0.0' +git tag --delete 'Messaging-3.0.0' +git tag --delete 'Storage-3.0.0' + +# Add and push the tags + +git tag 'Core-5.0.0' +git tag 'Auth-5.0.0' +git tag 'Database-5.0.0' +git tag 'Firestore-0.12.0' +git tag 'Functions-2.0.0' +git tag 'Messaging-3.0.0' +git tag 'Storage-3.0.0' + +git push origin --tags -- cgit v1.2.3 From e413e22142ce3223001a69472ef996bb1302f617 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 19 Apr 2018 09:20:06 -0700 Subject: Remove workaround for Analytics modular header issue (#1142) --- Example/Analytics_Tests_iOS/Analytics_Tests_iOS.m | 39 ------ Example/Analytics_Tests_iOS/DeprecatedHeaderTest.m | 21 --- Example/Analytics_Tests_iOS/Info.plist | 22 --- Example/Firebase.xcodeproj/project.pbxproj | 148 --------------------- .../xcschemes/Analytics_Tests_iOS.xcscheme | 58 -------- Example/Podfile | 19 +-- README.md | 11 -- patch/FirebaseAnalytics.h | 25 ---- 8 files changed, 5 insertions(+), 338 deletions(-) delete mode 100644 Example/Analytics_Tests_iOS/Analytics_Tests_iOS.m delete mode 100644 Example/Analytics_Tests_iOS/DeprecatedHeaderTest.m delete mode 100644 Example/Analytics_Tests_iOS/Info.plist delete mode 100644 Example/Firebase.xcodeproj/xcshareddata/xcschemes/Analytics_Tests_iOS.xcscheme delete mode 100644 patch/FirebaseAnalytics.h diff --git a/Example/Analytics_Tests_iOS/Analytics_Tests_iOS.m b/Example/Analytics_Tests_iOS/Analytics_Tests_iOS.m deleted file mode 100644 index a020433..0000000 --- a/Example/Analytics_Tests_iOS/Analytics_Tests_iOS.m +++ /dev/null @@ -1,39 +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. - -#import - -@interface Analytics_Tests_iOS : XCTestCase - -@end - -@implementation Analytics_Tests_iOS - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the - // class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the - // class. - [super tearDown]; -} - -- (void)testExample { - // Replace with a real test if we ever want to do Analytics unit tests here. -} - -@end diff --git a/Example/Analytics_Tests_iOS/DeprecatedHeaderTest.m b/Example/Analytics_Tests_iOS/DeprecatedHeaderTest.m deleted file mode 100644 index 6d13042..0000000 --- a/Example/Analytics_Tests_iOS/DeprecatedHeaderTest.m +++ /dev/null @@ -1,21 +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. - -// Verify deprecated headers still exist. This file should be deleted at -// at the next major release when the headers are removed. - -#import -#import -#import -#import diff --git a/Example/Analytics_Tests_iOS/Info.plist b/Example/Analytics_Tests_iOS/Info.plist deleted file mode 100644 index 6c40a6c..0000000 --- a/Example/Analytics_Tests_iOS/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Example/Firebase.xcodeproj/project.pbxproj b/Example/Firebase.xcodeproj/project.pbxproj index 9fe9d91..26e0c33 100644 --- a/Example/Firebase.xcodeproj/project.pbxproj +++ b/Example/Firebase.xcodeproj/project.pbxproj @@ -512,8 +512,6 @@ DEB61EC91E7C5DBB00C04B96 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DEB61EC11E7C5DBB00C04B96 /* GoogleService-Info.plist */; }; DEB61ECB1E7C5DBB00C04B96 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DEB61EC31E7C5DBB00C04B96 /* main.m */; }; DECE039B1E9ED01600164CA4 /* FIRPhoneAuthProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DECE03991E9ECFF500164CA4 /* FIRPhoneAuthProviderTests.m */; }; - DEDFEFEF1FD1B8C100F7D466 /* Analytics_Tests_iOS.m in Sources */ = {isa = PBXBuildFile; fileRef = DEDFEFEE1FD1B8C100F7D466 /* Analytics_Tests_iOS.m */; }; - DEDFEFF71FD1B9AA00F7D466 /* DeprecatedHeaderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DEDFEFF61FD1B9AA00F7D466 /* DeprecatedHeaderTest.m */; }; DEE14D7E1E844677006FA992 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DEE14D681E844677006FA992 /* LaunchScreen.storyboard */; }; DEE14D7F1E844677006FA992 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DEE14D6A1E844677006FA992 /* Main.storyboard */; }; DEE14D811E844677006FA992 /* FIRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DEE14D6E1E844677006FA992 /* FIRAppDelegate.m */; }; @@ -809,13 +807,6 @@ remoteGlobalIDString = DE7B8D1C1E8EF078009EB6DF; remoteInfo = Database_Tests; }; - DEDFEFF11FD1B8C100F7D466 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6003F582195388D10070C39A /* Project object */; - proxyType = 1; - remoteGlobalIDString = DEE14D401E84464D006FA992; - remoteInfo = Core_Example_iOS; - }; DEE14D5A1E84464D006FA992 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6003F582195388D10070C39A /* Project object */; @@ -1239,10 +1230,6 @@ DEB61EC31E7C5DBB00C04B96 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; DEB61EC41E7C5DBB00C04B96 /* Storage-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Storage-Info.plist"; sourceTree = ""; }; DECE03991E9ECFF500164CA4 /* FIRPhoneAuthProviderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRPhoneAuthProviderTests.m; sourceTree = ""; }; - DEDFEFEC1FD1B8C100F7D466 /* Analytics_Tests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Analytics_Tests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DEDFEFEE1FD1B8C100F7D466 /* Analytics_Tests_iOS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Analytics_Tests_iOS.m; sourceTree = ""; }; - DEDFEFF01FD1B8C100F7D466 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DEDFEFF61FD1B9AA00F7D466 /* DeprecatedHeaderTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DeprecatedHeaderTest.m; sourceTree = ""; }; DEE14D411E84464D006FA992 /* Core_Example_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Core_Example_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; DEE14D591E84464D006FA992 /* Core_Tests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Core_Tests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; DEE14D691E844677006FA992 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -1512,13 +1499,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DEDFEFE91FD1B8C100F7D466 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DEE14D3E1E84464D006FA992 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1610,7 +1590,6 @@ DE9315B41E8738B70083EDBF /* Messaging */, AFC8BAA01EC24B1600B8EEAE /* Shared */, DEB139B31E734D9D00AC236D /* Storage */, - DEDFEFED1FD1B8C100F7D466 /* Analytics_Tests_iOS */, 6003F58C195388D20070C39A /* Frameworks */, 6003F58B195388D20070C39A /* Products */, ); @@ -1653,7 +1632,6 @@ DE1EC27F1FBA5E63007D18D8 /* Database_Tests_tvOS.xctest */, DE53893E1FBB62E100199FC2 /* Auth_Tests_tvOS.xctest */, DE1FAE901FBCF5E100897AAA /* Auth_Example_tvOS.app */, - DEDFEFEC1FD1B8C100F7D466 /* Analytics_Tests_iOS.xctest */, DE47C0ED207AC87D00B1AEDF /* Messaging_Sample_iOS.app */, ); name = Products; @@ -2260,16 +2238,6 @@ path = App; sourceTree = ""; }; - DEDFEFED1FD1B8C100F7D466 /* Analytics_Tests_iOS */ = { - isa = PBXGroup; - children = ( - DEDFEFEE1FD1B8C100F7D466 /* Analytics_Tests_iOS.m */, - DEDFEFF01FD1B8C100F7D466 /* Info.plist */, - DEDFEFF61FD1B9AA00F7D466 /* DeprecatedHeaderTest.m */, - ); - path = Analytics_Tests_iOS; - sourceTree = ""; - }; DEE14D661E844677006FA992 /* Core */ = { isa = PBXGroup; children = ( @@ -2904,24 +2872,6 @@ productReference = DEB13A231E73507E00AC236D /* Storage_Tests_iOS.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - DEDFEFEB1FD1B8C100F7D466 /* Analytics_Tests_iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = DEDFEFF51FD1B8C100F7D466 /* Build configuration list for PBXNativeTarget "Analytics_Tests_iOS" */; - buildPhases = ( - DEDFEFE81FD1B8C100F7D466 /* Sources */, - DEDFEFE91FD1B8C100F7D466 /* Frameworks */, - DEDFEFEA1FD1B8C100F7D466 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - DEDFEFF21FD1B8C100F7D466 /* PBXTargetDependency */, - ); - name = Analytics_Tests_iOS; - productName = Analytics_Tests_iOS; - productReference = DEDFEFEC1FD1B8C100F7D466 /* Analytics_Tests_iOS.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; DEE14D401E84464D006FA992 /* Core_Example_iOS */ = { isa = PBXNativeTarget; buildConfigurationList = DEE14D641E84464D006FA992 /* Build configuration list for PBXNativeTarget "Core_Example_iOS" */; @@ -3147,10 +3097,6 @@ DEB13A0A1E73507E00AC236D = { TestTargetID = DEB139E01E73506A00AC236D; }; - DEDFEFEB1FD1B8C100F7D466 = { - DevelopmentTeam = EQHXZ8M8AV; - ProvisioningStyle = Automatic; - }; DEE14D401E84464D006FA992 = { CreatedOnToolsVersion = 8.2.1; ProvisioningStyle = Automatic; @@ -3213,7 +3159,6 @@ D0EDB2BC1EDA04F800B6C31B /* Storage_Example_macOS */, D0EDB2DE1EDA06CB00B6C31B /* Storage_Tests_macOS */, D0EDB2F81EDA06D500B6C31B /* Storage_IntegrationTests_macOS */, - DEDFEFEB1FD1B8C100F7D466 /* Analytics_Tests_iOS */, DEAAD3E01FBA46AA0053BF48 /* Storage_Example_tvOS */, DEAAD3F41FBA46AB0053BF48 /* Storage_Tests_tvOS */, DE3373891E73773400881891 /* AllUnitTests_iOS */, @@ -3525,13 +3470,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DEDFEFEA1FD1B8C100F7D466 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DEE14D3F1E84464D006FA992 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -4200,15 +4138,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DEDFEFE81FD1B8C100F7D466 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DEDFEFEF1FD1B8C100F7D466 /* Analytics_Tests_iOS.m in Sources */, - DEDFEFF71FD1B9AA00F7D466 /* DeprecatedHeaderTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; DEE14D3D1E84464D006FA992 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -4401,11 +4330,6 @@ target = DE7B8D1C1E8EF078009EB6DF /* Database_Tests_iOS */; targetProxy = DEB518591E9008CB0089C938 /* PBXContainerItemProxy */; }; - DEDFEFF21FD1B8C100F7D466 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DEE14D401E84464D006FA992 /* Core_Example_iOS */; - targetProxy = DEDFEFF11FD1B8C100F7D466 /* PBXContainerItemProxy */; - }; DEE14D5B1E84464D006FA992 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DEE14D401E84464D006FA992 /* Core_Example_iOS */; @@ -6608,69 +6532,6 @@ }; name = Release; }; - DEDFEFF31FD1B8C100F7D466 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = EQHXZ8M8AV; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = Analytics_Tests_iOS/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.google.Analytics-Tests-iOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Core_Example_iOS.app/Core_Example_iOS"; - }; - name = Debug; - }; - DEDFEFF41FD1B8C100F7D466 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = EQHXZ8M8AV; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = Analytics_Tests_iOS/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.google.Analytics-Tests-iOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Core_Example_iOS.app/Core_Example_iOS"; - }; - name = Release; - }; DEE14D601E84464D006FA992 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -7104,15 +6965,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DEDFEFF51FD1B8C100F7D466 /* Build configuration list for PBXNativeTarget "Analytics_Tests_iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DEDFEFF31FD1B8C100F7D466 /* Debug */, - DEDFEFF41FD1B8C100F7D466 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; DEE14D641E84464D006FA992 /* Build configuration list for PBXNativeTarget "Core_Example_iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Analytics_Tests_iOS.xcscheme b/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Analytics_Tests_iOS.xcscheme deleted file mode 100644 index e31eb3f..0000000 --- a/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Analytics_Tests_iOS.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Podfile b/Example/Podfile index 0d46941..774635c 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,3 +1,7 @@ +#delete source lines before master merge +source 'sso://cpdc-internal/spec' +source 'https://github.com/CocoaPods/Specs.git' + use_frameworks! pod 'FirebaseCore', :path => '../' @@ -8,17 +12,12 @@ target 'Core_Example_iOS' do # 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.13.0' + pod 'Firebase/Core', '5.0.0' target 'Core_Tests_iOS' do inherit! :search_paths pod 'OCMock' end - - target 'Analytics_Tests_iOS' do - inherit! :search_paths - pod 'FirebaseAnalytics' - end end target 'Auth_Example_iOS' do @@ -214,11 +213,3 @@ target 'Storage_Example_tvOS' do # pod 'OCMock' # end end - -# This post_install workaround should be removed when FirebaseAnalytics -# removes its module includes to FirebaseCore. - -post_install do | installer | - print "Fix up FirebaseAnalytics module ... \n" - system 'cp ../patch/FirebaseAnalytics.h Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/' -end diff --git a/README.md b/README.md index 7ada9ec..fe48c0e 100644 --- a/README.md +++ b/README.md @@ -62,17 +62,6 @@ pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git [release notes](https://firebase.google.com/support/release-notes/ios). 1. Run `pod update`. -#### Static library usage - -If your Podfile does not include *use_frameworks!*, you need to workaround -a build issue with the FirebaseAnalytics umbrella header. Delete the first four lines -of `Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h` -or copy [patch/FirebaseAnalytics.h](patch/FirebaseAnalytics.h) to -`Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h`. -See the `post_install` phase of [Example/Podfile](Example/Podfile) for an example -of applying the workaround automatically - make sure you correct the path of -`patch/FirebaseAnalytics.h`. - #### Examples To access FirebaseMessaging via a checked out version of the firebase-ios-sdk repo do: diff --git a/patch/FirebaseAnalytics.h b/patch/FirebaseAnalytics.h deleted file mode 100644 index 4850741..0000000 --- a/patch/FirebaseAnalytics.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2018 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. - */ - -// Firebase Analytics umbrella header for interoperating with open source builds -// More details at https://github.com/firebase/firebase-ios-sdk#source-pod-integration - -#import "FIRAnalytics+AppDelegate.h" -#import "FIRAnalytics.h" -#import "FIRAnalyticsSwiftNameSupport.h" -#import "FIREventNames.h" -#import "FIRParameterNames.h" -#import "FIRUserPropertyNames.h" -- cgit v1.2.3 From d691cb851b2d2fc4b17daaae34b4af3b42a2e656 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 19 Apr 2018 14:06:08 -0700 Subject: Firestore Podfile 5.0.0 update --- Firestore/Example/Podfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index 92b199a..a745de7 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -1,7 +1,12 @@ +#delete source lines before master merge +source 'sso://cpdc-internal/spec' +source 'https://github.com/CocoaPods/Specs.git' + # 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.13.0' + +pod 'Firebase/Core', '5.0.0' use_frameworks! -- cgit v1.2.3 From 4f754ba72e084632c789d1a43cca86e47f15a859 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 19 Apr 2018 16:26:46 -0700 Subject: community not experimental --- FirebaseAuth.podspec | 2 +- FirebaseCore.podspec | 2 +- FirebaseDatabase.podspec | 2 +- FirebaseStorage.podspec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FirebaseAuth.podspec b/FirebaseAuth.podspec index 18a5ed5..48a9354 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseAuth' s.version = '5.0.0' - s.summary = 'The official iOS client for Firebase Authentication (plus experimental support for macOS and tvOS)' + s.summary = 'The official iOS client for Firebase Authentication (plus community support for macOS and tvOS)' s.description = <<-DESC Firebase Authentication allows you to manage your own account system without any backend code. It diff --git a/FirebaseCore.podspec b/FirebaseCore.podspec index b3dcb7e..5c7bd3a 100644 --- a/FirebaseCore.podspec +++ b/FirebaseCore.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseCore' s.version = '5.0.0' - s.summary = 'Firebase Core for iOS (plus experimental support for macOS and tvOS)' + s.summary = 'Firebase Core for iOS (plus community support for macOS and tvOS)' s.description = <<-DESC Firebase Core includes FIRApp and FIROptions which provide central configuration for other Firebase services. diff --git a/FirebaseDatabase.podspec b/FirebaseDatabase.podspec index 8b91495..ae97d5a 100644 --- a/FirebaseDatabase.podspec +++ b/FirebaseDatabase.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseDatabase' s.version = '5.0.0' - s.summary = 'Firebase Open Source Libraries for iOS (plus experimental support for macOS and tvOS)' + s.summary = 'Firebase Open Source Libraries for iOS (plus community support for macOS and tvOS)' s.description = <<-DESC Simplify your iOS development, grow your user base, and monetize more effectively with Firebase. diff --git a/FirebaseStorage.podspec b/FirebaseStorage.podspec index 27bf412..d3e9339 100644 --- a/FirebaseStorage.podspec +++ b/FirebaseStorage.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'FirebaseStorage' s.version = '3.0.0' - s.summary = 'Firebase Storage for iOS (plus experimental support for macOS and tvOS)' + s.summary = 'Firebase Storage for iOS (plus community support for macOS and tvOS)' s.description = <<-DESC Firebase Storage provides robust, secure file uploads and downloads from Firebase SDKs, powered by Google Cloud Storage. -- cgit v1.2.3 From a19773b9f3bd37aee6866846c38a2e0559ffb9d0 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Fri, 20 Apr 2018 14:13:17 -0700 Subject: pod lib lint status (#1160) --- scripts/push-pods.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/push-pods.sh b/scripts/push-pods.sh index f40957b..39ce4ea 100755 --- a/scripts/push-pods.sh +++ b/scripts/push-pods.sh @@ -27,4 +27,14 @@ pod repo push io2018 FirebaseDatabase.podspec --allow-warnings pod repo push io2018 FirebaseFirestore.podspec --allow-warnings pod repo push io2018 FirebaseFunctions.podspec pod repo push io2018 FirebaseMessaging.podspec -pod repo push io2018 FirebaseStorage.podspec --allow-warnings +pod repo push io2018 FirebaseStorage.podspec + +# FirebaseAuth warnings +# https://github.com/firebase/firebase-ios-sdk/pull/1159 +# https://github.com/google/google-toolbox-for-mac/issues/162 + +# FirebaseDatabase warnings +# https://github.com/firebase/firebase-ios-sdk/pull/1155 + +# FirebaseFirestore warning (no plan to fix) +# https://github.com/firebase/firebase-ios-sdk/issues/1143 -- cgit v1.2.3 From 7707f37c770212c69d9ca4b36fba7e3ae193c108 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 25 Apr 2018 12:26:47 -0700 Subject: Updates for push-pods script (#1184) --- scripts/push-pods.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/push-pods.sh b/scripts/push-pods.sh index 39ce4ea..2fb8eaa 100755 --- a/scripts/push-pods.sh +++ b/scripts/push-pods.sh @@ -14,27 +14,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Push all the io2018 pods +# Push GitHub pods to cpdc-internal-spec. # When bootstrapping a repo, FirebaseCore must be pushed first, then # FirebaseInstanceID, then FirebaseAnalytics, then the rest # Most of the warnings are tvOS specific. The Firestore one needs # investigation. -pod repo push io2018 FirebaseCore.podspec -pod repo push io2018 FirebaseAuth.podspec --allow-warnings -pod repo push io2018 FirebaseDatabase.podspec --allow-warnings -pod repo push io2018 FirebaseFirestore.podspec --allow-warnings -pod repo push io2018 FirebaseFunctions.podspec -pod repo push io2018 FirebaseMessaging.podspec -pod repo push io2018 FirebaseStorage.podspec +pod cache clean FirebaseCore --all +pod cache clean FirebaseAuth --all +pod cache clean FirebaseDatabase --all +pod cache clean FirebaseFirestore --all +pod cache clean FirebaseFunctions --all +pod cache clean FirebaseMessaging --all +pod cache clean FirebaseStorage --all -# FirebaseAuth warnings -# https://github.com/firebase/firebase-ios-sdk/pull/1159 -# https://github.com/google/google-toolbox-for-mac/issues/162 - -# FirebaseDatabase warnings -# https://github.com/firebase/firebase-ios-sdk/pull/1155 +pod repo push cpdc-internal-spec FirebaseCore.podspec +pod repo push cpdc-internal-spec FirebaseAuth.podspec +pod repo push cpdc-internal-spec FirebaseDatabase.podspec +pod repo push cpdc-internal-spec FirebaseFirestore.podspec --allow-warnings +pod repo push cpdc-internal-spec FirebaseFunctions.podspec +pod repo push cpdc-internal-spec FirebaseMessaging.podspec +pod repo push cpdc-internal-spec FirebaseStorage.podspec # FirebaseFirestore warning (no plan to fix) # https://github.com/firebase/firebase-ios-sdk/issues/1143 -- cgit v1.2.3 From 5bb6e0f091b76ed8a02ce402d766cf4e26d33784 Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Wed, 25 Apr 2018 21:50:19 -0700 Subject: Adds new callback to createUse API (breaking change) (#1186) --- Example/Auth/Sample/MainViewController.m | 8 +++++--- Example/Auth/SwiftSample/ViewController.swift | 4 ++-- Example/Auth/Tests/FIRAuthTests.m | 15 +++++++++------ Firebase/Auth/Source/FIRAuth.m | 18 ++++++++++++++---- Firebase/Auth/Source/Public/FIRAuth.h | 13 ++++++++++--- 5 files changed, 40 insertions(+), 18 deletions(-) diff --git a/Example/Auth/Sample/MainViewController.m b/Example/Auth/Sample/MainViewController.m index 4c9ec13..0da28c8 100644 --- a/Example/Auth/Sample/MainViewController.m +++ b/Example/Auth/Sample/MainViewController.m @@ -1884,7 +1884,8 @@ static NSDictionary *parseURL(NSString *urlString) { callback:(nullable FIRAuthResultCallback)callback { [[AppManager auth] createUserWithEmail:email password:password - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *_Nullable result, + NSError *_Nullable error) { if (error) { [self logFailure:@"sign-up with Email/Password failed" error:error]; if (callback) { @@ -1893,7 +1894,7 @@ static NSDictionary *parseURL(NSString *urlString) { } else { [self logSuccess:@"sign-up with Email/Password succeeded."]; if (callback) { - callback(user, nil); + callback(result.user, nil); } } [self showTypicalUIForUserUpdateResultsWithTitle:@"Sign-In" error:error]; @@ -2803,7 +2804,8 @@ static NSDictionary *parseURL(NSString *urlString) { [self showSpinner:^{ [[AppManager auth] createUserWithEmail:email password:password - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *_Nullable result, + NSError *_Nullable error) { if (error) { [self logFailure:@"create user failed" error:error]; } else { diff --git a/Example/Auth/SwiftSample/ViewController.swift b/Example/Auth/SwiftSample/ViewController.swift index d902b38..05b0dd2 100644 --- a/Example/Auth/SwiftSample/ViewController.swift +++ b/Example/Auth/SwiftSample/ViewController.swift @@ -232,9 +232,9 @@ final class ViewController: UIViewController, UITextFieldDelegate, AuthUIDelegat } case .createUser: Auth.auth().createUser(withEmail: emailField.text!, password: passwordField.text!) { - user, error in + result, error in self.ifNoError(error) { - self.showAlert(title: "Signed In With Credential", message: user?.textDescription) + self.showAlert(title: "Signed In With Credential", message: result?.user.textDescription) } } case .signOut: diff --git a/Example/Auth/Tests/FIRAuthTests.m b/Example/Auth/Tests/FIRAuthTests.m index d238057..34c0499 100644 --- a/Example/Auth/Tests/FIRAuthTests.m +++ b/Example/Auth/Tests/FIRAuthTests.m @@ -1592,9 +1592,9 @@ static const NSTimeInterval kWaitInterval = .5; [[FIRAuth auth] signOut:NULL]; [[FIRAuth auth] createUserWithEmail:kEmail password:kFakePassword - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *_Nullable result, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); - [self assertUser:user]; + [self assertUser:result.user]; XCTAssertNil(error); [expectation fulfill]; }]; @@ -1614,9 +1614,10 @@ static const NSTimeInterval kWaitInterval = .5; [[FIRAuth auth] signOut:NULL]; [[FIRAuth auth] createUserWithEmail:kEmail password:kFakePassword - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *_Nullable result, + NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); - XCTAssertNil(user); + XCTAssertNil(result.user); XCTAssertEqual(error.code, FIRAuthErrorCodeWeakPassword); XCTAssertNotNil(error.userInfo[NSLocalizedDescriptionKey]); XCTAssertEqualObjects(error.userInfo[NSLocalizedFailureReasonErrorKey], reason); @@ -1700,7 +1701,8 @@ static const NSTimeInterval kWaitInterval = .5; [[FIRAuth auth] signOut:NULL]; [[FIRAuth auth] createUserWithEmail:kEmail password:@"" - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *_Nullable result, + NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertEqual(error.code, FIRAuthErrorCodeWeakPassword); [expectation fulfill]; @@ -1719,7 +1721,8 @@ static const NSTimeInterval kWaitInterval = .5; [[FIRAuth auth] signOut:NULL]; [[FIRAuth auth] createUserWithEmail:@"" password:kFakePassword - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *_Nullable result, + NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertEqual(error.code, FIRAuthErrorCodeMissingEmail); [expectation fulfill]; diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m index 5ec9a6f..82a7c02 100644 --- a/Firebase/Auth/Source/FIRAuth.m +++ b/Firebase/Auth/Source/FIRAuth.m @@ -946,10 +946,10 @@ static NSMutableDictionary *gKeychainServiceNameForAppName; - (void)createUserWithEmail:(NSString *)email password:(NSString *)password - completion:(nullable FIRAuthResultCallback)completion { + completion:(nullable FIRAuthDataResultCallback)completion { dispatch_async(FIRAuthGlobalWorkQueue(), ^{ - FIRAuthResultCallback decoratedCallback = - [self signInFlowAuthResultCallbackByDecoratingCallback:completion]; + FIRAuthDataResultCallback decoratedCallback = + [self signInFlowAuthDataResultCallbackByDecoratingCallback:completion]; [self internalCreateUserWithEmail:email password:password completion:^(FIRSignUpNewUserResponse *_Nullable response, @@ -962,7 +962,17 @@ static NSMutableDictionary *gKeychainServiceNameForAppName; accessTokenExpirationDate:response.approximateExpirationDate refreshToken:response.refreshToken anonymous:NO - callback:decoratedCallback]; + 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); + }]; }]; }); } diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h index c20ecbe..c262c49 100644 --- a/Firebase/Auth/Source/Public/FIRAuth.h +++ b/Firebase/Auth/Source/Public/FIRAuth.h @@ -639,10 +639,11 @@ NS_SWIFT_NAME(Auth) */ - (void)createUserWithEmail:(NSString *)email password:(NSString *)password - completion:(nullable FIRAuthResultCallback)completion; + completion:(nullable FIRAuthDataResultCallback)completion; /** @fn createUserAndRetrieveDataWithEmail:password:completion: - @brief Creates and, on success, signs in a user with the given email address and password. + @brief Please use `createUserAndRetrieveDataWithEmail:password:completion:` or + `createUser(withEmail:password:completion:)` for Swift instead. @param email The user's email address. @param password The user's desired password. @@ -669,7 +670,13 @@ NS_SWIFT_NAME(Auth) */ - (void)createUserAndRetrieveDataWithEmail:(NSString *)email password:(NSString *)password - completion:(nullable FIRAuthDataResultCallback)completion; + completion:(nullable FIRAuthDataResultCallback)completion + DEPRECATED_MSG_ATTRIBUTE( + "createUserAndRetrieveDataWithEmail:password:completion: is" + " deprecated. Please use" + " createUserWithEmail:password:completion: for Objective-C or" + " createUser(withEmail:password:completion:) for Swift" + " instead."); /** @fn confirmPasswordResetWithCode:newPassword:completion: @brief Resets the password given a code sent to the user outside of the app and a new password -- cgit v1.2.3 From 79811effb9904e9625b5c610c57c9fed1bbf8d94 Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Thu, 26 Apr 2018 06:38:54 -0700 Subject: Removes deprecated getToken APIs (#1188) --- Firebase/Auth/Source/FIRUser.m | 11 +---------- Firebase/Auth/Source/Public/FIRUser.h | 28 ---------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/Firebase/Auth/Source/FIRUser.m b/Firebase/Auth/Source/FIRUser.m index ea48267..04aa861 100644 --- a/Firebase/Auth/Source/FIRUser.m +++ b/Firebase/Auth/Source/FIRUser.m @@ -776,15 +776,11 @@ static void callInMainThreadWithAuthDataResultAndError( } - (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion { - // |getTokenForcingRefresh:completion:| is also a public API so there is no need to dispatch to + // |getIDTokenForcingRefresh:completion:| is also a public API so there is no need to dispatch to // global work queue here. [self getIDTokenForcingRefresh:NO completion:completion]; } -- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion { - [self getIDTokenWithCompletion:completion]; -} - - (void)getIDTokenForcingRefresh:(BOOL)forceRefresh completion:(nullable FIRAuthTokenCallback)completion { [self getIDTokenResultForcingRefresh:forceRefresh @@ -898,11 +894,6 @@ static void callInMainThreadWithAuthDataResultAndError( return result; } -- (void)getTokenForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenCallback)completion { - [self getIDTokenForcingRefresh:forceRefresh completion:completion]; -} - /** @fn internalGetTokenForcingRefresh:callback: @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. @param callback The block to invoke when the token is available. Invoked asynchronously on the diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h index dd8362d..1c7af7a 100644 --- a/Firebase/Auth/Source/Public/FIRUser.h +++ b/Firebase/Auth/Source/Public/FIRUser.h @@ -305,17 +305,6 @@ NS_SWIFT_NAME(User) - (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion NS_SWIFT_NAME(getIDToken(completion:)); -/** @fn getTokenWithCompletion: - @brief Please use `getIDTokenWithCompletion:` instead. - - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion - NS_SWIFT_NAME(getToken(completion:)) __attribute__((deprecated)); - /** @fn getIDTokenForcingRefresh:completion: @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. @@ -332,23 +321,6 @@ NS_SWIFT_NAME(User) - (void)getIDTokenForcingRefresh:(BOOL)forceRefresh completion:(nullable FIRAuthTokenCallback)completion; -/** @fn getTokenForcingRefresh:completion: - @brief Please use getIDTokenForcingRefresh:completion instead. - - @param forceRefresh Forces a token refresh. Useful if the token becomes invalid for some reason - other than an expiration. - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks The authentication token will be refreshed (by making a network request) if it has - expired, or if `forceRefresh` is YES. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getTokenForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenCallback)completion - __attribute__((deprecated)); - /** @fn linkWithCredential:completion: @brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method doesn't return additional identity provider data. -- cgit v1.2.3 From fbbbde872a98be157802e91e9056164ca0a58a25 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 26 Apr 2018 06:41:18 -0700 Subject: Add explicit Functions umbrella (#1187) --- .../FirebaseFunctions/Public/FirebaseFunctions.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Functions/FirebaseFunctions/Public/FirebaseFunctions.h diff --git a/Functions/FirebaseFunctions/Public/FirebaseFunctions.h b/Functions/FirebaseFunctions/Public/FirebaseFunctions.h new file mode 100644 index 0000000..970bec4 --- /dev/null +++ b/Functions/FirebaseFunctions/Public/FirebaseFunctions.h @@ -0,0 +1,19 @@ +/* + * Copyright 2018 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 "FIRError.h" +#import "FIRFunctions.h" +#import "FIRHTTPSCallable.h" -- cgit v1.2.3 From d016d152f7560ce89fbaab3fc33b0425de4325d4 Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Thu, 26 Apr 2018 11:22:25 -0700 Subject: shouldEstablishDirectChannel cannot be replaced by isDirectChannelEstablished as it represents whether user "should" connect instead of whether user "is" connected (#1190) shouldEstablishDirectChannel cannot be replaced by isDirectChannelEstablished as it represents whether user "should" connect instead of whether user "is" connected --- Firebase/Messaging/FIRMessaging.m | 4 +--- Firebase/Messaging/Public/FIRMessaging.h | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m index 8fafab8..339bd7d 100644 --- a/Firebase/Messaging/FIRMessaging.m +++ b/Firebase/Messaging/FIRMessaging.m @@ -124,9 +124,7 @@ static NSString *const kFIRMessagingPlistAutoInitEnabled = @end @interface FIRMessaging () { - BOOL _shouldEstablishDirectChannel; -} + FIRReachabilityDelegate> // FIRApp properties @property(nonatomic, readwrite, copy) NSString *fcmSenderID; diff --git a/Firebase/Messaging/Public/FIRMessaging.h b/Firebase/Messaging/Public/FIRMessaging.h index 3ad15da..e58a216 100644 --- a/Firebase/Messaging/Public/FIRMessaging.h +++ b/Firebase/Messaging/Public/FIRMessaging.h @@ -291,7 +291,12 @@ NS_SWIFT_NAME(Messaging) * receiving non-APNS, data-only messages in foregrounded apps. * Default is `NO`. */ -@property(nonatomic, assign, getter=isDirectChannelEstablished) BOOL shouldEstablishDirectChannel; +@property(nonatomic) BOOL shouldEstablishDirectChannel; + +/** + * Returns `YES` if the direct channel to the FCM server is active, and `NO` otherwise. + */ +@property(nonatomic, readonly) BOOL isDirectChannelEstablished; /** * FIRMessaging -- cgit v1.2.3 From b6a84b6b61b8a1a0d8c0b79e4111a15e8bd35c53 Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Sun, 29 Apr 2018 19:29:48 -0700 Subject: Adds phone auth testing. (disableAppVerification) (#1192) --- Example/Auth/Sample/SettingsViewController.m | 17 +++++ Example/Auth/Tests/FIRPhoneAuthProviderTests.m | 75 ++++++++++++++++++++++ .../AuthProviders/Phone/FIRPhoneAuthProvider.m | 15 +++++ Firebase/Auth/Source/FIRAuth.m | 2 + Firebase/Auth/Source/FIRAuthSettings.m | 29 +++++++++ Firebase/Auth/Source/Public/FIRAuth.h | 6 ++ Firebase/Auth/Source/Public/FIRAuthSettings.h | 30 +++++++++ Firebase/Auth/Source/Public/FirebaseAuth.h | 1 + Firebase/Auth/Source/RPCs/FIRAuthBackend.m | 14 ++++ 9 files changed, 189 insertions(+) create mode 100644 Firebase/Auth/Source/FIRAuthSettings.m create mode 100644 Firebase/Auth/Source/Public/FIRAuthSettings.h diff --git a/Example/Auth/Sample/SettingsViewController.m b/Example/Auth/Sample/SettingsViewController.m index 24a6513..4815f32 100644 --- a/Example/Auth/Sample/SettingsViewController.m +++ b/Example/Auth/Sample/SettingsViewController.m @@ -214,9 +214,26 @@ static NSString *truncatedString(NSString *string, NSUInteger length) { [weakSelf loadTableView]; }], ]], + [StaticContentTableViewSection sectionWithTitle:@"Auth Settings" cells:@[ + [StaticContentTableViewCell cellWithTitle:@"Disable App Verification (Phone)" + value:[AppManager auth].settings. + appVerificationDisabledForTesting ? @"Yes" : @"No" + action:^{ + [weakSelf toggleDisableAppVerification]; + [weakSelf loadTableView]; + }], + ]], ]]; } +/** @fn toggleDisableAppVerification + @brief Toggles the appVerificationDisabledForTesting flag on the current Auth instance. + */ +- (void)toggleDisableAppVerification { + [AppManager auth].settings.appVerificationDisabledForTesting = + ![AppManager auth].settings.appVerificationDisabledForTesting; +} + /** @fn toggleAPIHostWithRequestClassName: @brief Toggles the host name of the server that handles RPCs. @param requestClassName The name of the RPC request class. diff --git a/Example/Auth/Tests/FIRPhoneAuthProviderTests.m b/Example/Auth/Tests/FIRPhoneAuthProviderTests.m index e00fa1f..96432c7 100644 --- a/Example/Auth/Tests/FIRPhoneAuthProviderTests.m +++ b/Example/Auth/Tests/FIRPhoneAuthProviderTests.m @@ -31,6 +31,7 @@ #import "FIRAuthGlobalWorkQueue.h" #import "FIRAuthNotificationManager.h" #import "FIRAuthRequestConfiguration.h" +#import "FIRAuthSettings.h" #import "FIRAuthUIDelegate.h" #import "FIRAuthURLPresenter.h" #import "FIRAuthWebUtils.h" @@ -362,6 +363,80 @@ static const NSTimeInterval kExpectationTimeout = 2; OCMVerifyAll(_mockAppCredentialManager); } +/** @fn testVerifyPhoneNumberInTestMode + @brief Tests a successful invocation of @c verifyPhoneNumber:completion: when app verification + is disabled. + */ +- (void)testVerifyPhoneNumberInTestMode { + // Disable app verification. + FIRAuthSettings *settings = [[FIRAuthSettings alloc] init]; + settings.appVerificationDisabledForTesting = YES; + OCMStub([_mockAuth settings]).andReturn(settings); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) + .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); + OCMExpect([_mockBackend sendVerificationCode:[OCMArg any] callback:[OCMArg any]]) + .andCallBlock2(^(FIRSendVerificationCodeRequest *request, + FIRSendVerificationCodeResponseCallback callback) { + XCTAssertEqualObjects(request.phoneNumber, kTestPhoneNumber); + // Assert that the app credential is nil when in test mode. + XCTAssertNil(request.appCredential); + dispatch_async(FIRAuthGlobalWorkQueue(), ^() { + id mockSendVerificationCodeResponse = OCMClassMock([FIRSendVerificationCodeResponse class]); + OCMStub([mockSendVerificationCodeResponse verificationID]).andReturn(kTestVerificationID); + callback(mockSendVerificationCodeResponse, nil); + }); + }); + + XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; + [_provider verifyPhoneNumber:kTestPhoneNumber + completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { + XCTAssertTrue([NSThread isMainThread]); + XCTAssertNil(error); + XCTAssertEqualObjects(verificationID, kTestVerificationID); + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; + OCMVerifyAll(_mockBackend); + OCMVerifyAll(_mockNotificationManager); + OCMVerifyAll(_mockAppCredentialManager); +} + +/** @fn testVerifyPhoneNumberInTestModeFailure + @brief Tests a failed invocation of @c verifyPhoneNumber:completion: when app verification + is disabled. + */ +- (void)testVerifyPhoneNumberInTestModeFailure { + // Disable app verification. + FIRAuthSettings *settings = [[FIRAuthSettings alloc] init]; + settings.appVerificationDisabledForTesting = YES; + OCMStub([_mockAuth settings]).andReturn(settings); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) + .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); + OCMExpect([_mockBackend sendVerificationCode:[OCMArg any] callback:[OCMArg any]]) + .andCallBlock2(^(FIRSendVerificationCodeRequest *request, + FIRSendVerificationCodeResponseCallback callback) { + XCTAssertEqualObjects(request.phoneNumber, kTestPhoneNumber); + // Assert that the app credential is nil when in test mode. + XCTAssertNil(request.appCredential); + dispatch_async(FIRAuthGlobalWorkQueue(), ^() { + callback(nil, [FIRAuthErrorUtils networkErrorWithUnderlyingError:[NSError new]]); + }); + }); + + XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; + [_provider verifyPhoneNumber:kTestPhoneNumber + completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { + XCTAssertTrue([NSThread isMainThread]); + XCTAssertNil(verificationID); + XCTAssertEqual(error.code, FIRAuthErrorCodeNetworkError); + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; + OCMVerifyAll(_mockBackend); + OCMVerifyAll(_mockNotificationManager); + OCMVerifyAll(_mockAppCredentialManager); +} + /** @fn testVerifyPhoneNumberUIDelegate @brief Tests a successful invocation of @c verifyPhoneNumber:UIDelegate:completion:. */ diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m index 948a515..2d06a15 100644 --- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m +++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m @@ -29,6 +29,7 @@ #import "FIRAuthNotificationManager.h" #import "FIRAuthErrorUtils.h" #import "FIRAuthBackend.h" +#import "FIRAuthSettings.h" #import "FIRAuthWebUtils.h" #import "FirebaseAuthVersion.h" #import @@ -364,6 +365,20 @@ NSString *const kReCAPTCHAURLStringFormat = @"https://%@/__/auth/handler?"; - (void)verifyClientAndSendVerificationCodeToPhoneNumber:(NSString *)phoneNumber retryOnInvalidAppCredential:(BOOL)retryOnInvalidAppCredential callback:(FIRVerificationResultCallback)callback { + if (_auth.settings.isAppVerificationDisabledForTesting) { + FIRSendVerificationCodeRequest *request = + [[FIRSendVerificationCodeRequest alloc] initWithPhoneNumber:phoneNumber + appCredential:nil + reCAPTCHAToken:nil + requestConfiguration: + _auth.requestConfiguration]; + [FIRAuthBackend sendVerificationCode:request + callback:^(FIRSendVerificationCodeResponse *_Nullable response, + NSError *_Nullable error) { + callback(response.verificationID, error); + }]; + return; + } [self verifyClientWithCompletion:^(FIRAuthAppCredential *_Nullable appCredential, NSError *_Nullable error) { if (error) { diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m index 82a7c02..c83a19a 100644 --- a/Firebase/Auth/Source/FIRAuth.m +++ b/Firebase/Auth/Source/FIRAuth.m @@ -33,6 +33,7 @@ #import "FIRAuthGlobalWorkQueue.h" #import "FIRAuthKeychain.h" #import "FIRAuthOperationType.h" +#import "FIRAuthSettings.h" #import "FIRUser_Internal.h" #import "FirebaseAuth.h" #import "FIRAuthBackend.h" @@ -434,6 +435,7 @@ static NSMutableDictionary *gKeychainServiceNameForAppName; if (self) { _listenerHandles = [NSMutableArray array]; _requestConfiguration = [[FIRAuthRequestConfiguration alloc] initWithAPIKey:APIKey]; + _settings = [[FIRAuthSettings alloc] init]; _firebaseAppName = [appName copy]; #if TARGET_OS_IOS UIApplication *application = [UIApplication sharedApplication]; diff --git a/Firebase/Auth/Source/FIRAuthSettings.m b/Firebase/Auth/Source/FIRAuthSettings.m new file mode 100644 index 0000000..575bb3c --- /dev/null +++ b/Firebase/Auth/Source/FIRAuthSettings.m @@ -0,0 +1,29 @@ +/* + * Copyright 2018 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/LICENSE2.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 "FIRAuthSettings.h" + +@implementation FIRAuthSettings + +- (instancetype)init { + self = [super init]; + if (self) { + _appVerificationDisabledForTesting = NO; + } + return self; +} + +@end diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h index c262c49..2901fca 100644 --- a/Firebase/Auth/Source/Public/FIRAuth.h +++ b/Firebase/Auth/Source/Public/FIRAuth.h @@ -28,6 +28,7 @@ @class FIRAuth; @class FIRAuthCredential; @class FIRAuthDataResult; +@class FIRAuthSettings; @class FIRUser; @protocol FIRAuthStateListener; @@ -288,6 +289,11 @@ NS_SWIFT_NAME(Auth) */ @property (nonatomic, copy, nullable) NSString *languageCode; +/** @property settings + @brief Contains settings related to the auth object. + */ +@property (nonatomic, copy, nullable) FIRAuthSettings *settings; + #if TARGET_OS_IOS /** @property APNSToken @brief The APNs token used for phone number authentication. The type of the token (production diff --git a/Firebase/Auth/Source/Public/FIRAuthSettings.h b/Firebase/Auth/Source/Public/FIRAuthSettings.h new file mode 100644 index 0000000..d3fee3e --- /dev/null +++ b/Firebase/Auth/Source/Public/FIRAuthSettings.h @@ -0,0 +1,30 @@ +/* + * Copyright 2018 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 + +/** @class FIRAuthSettings + @brief Determines settings related to an auth object. + */ +@interface FIRAuthSettings : NSObject + +/** @property appVerificationDisabledForTesting + @brief Flag to determine whether app verification should be disabled for testing or not. + */ +@property (nonatomic, assign, getter=isAppVerificationDisabledForTesting) BOOL + appVerificationDisabledForTesting; + +@end diff --git a/Firebase/Auth/Source/Public/FirebaseAuth.h b/Firebase/Auth/Source/Public/FirebaseAuth.h index cd7e4a4..c8837f8 100644 --- a/Firebase/Auth/Source/Public/FirebaseAuth.h +++ b/Firebase/Auth/Source/Public/FirebaseAuth.h @@ -39,4 +39,5 @@ #import "FIRPhoneAuthCredential.h" #import "FIRPhoneAuthProvider.h" #import "FIRAuthAPNSTokenType.h" +#import "FIRAuthSettings.h" #endif diff --git a/Firebase/Auth/Source/RPCs/FIRAuthBackend.m b/Firebase/Auth/Source/RPCs/FIRAuthBackend.m index e380e34..ff8f2f0 100644 --- a/Firebase/Auth/Source/RPCs/FIRAuthBackend.m +++ b/Firebase/Auth/Source/RPCs/FIRAuthBackend.m @@ -350,6 +350,13 @@ static NSString *const kQuoutaExceededErrorMessage = @"QUOTA_EXCEEDED"; */ static NSString *const kAppNotVerifiedErrorMessage = @"APP_NOT_VERIFIED"; +/** @var kMissingClientIdentifier + @brief This is the error message the server will respond with if Firebase could not verify the + app during a phone authentication flow when a real phone number is used and app verification + is disabled for testing. + */ +static NSString *const kMissingClientIdentifier = @"MISSING_CLIENT_IDENTIFIER"; + /** @var kCaptchaCheckFailedErrorMessage @brief This is the error message the server will respond with if the reCAPTCHA token provided is invalid. @@ -1073,6 +1080,13 @@ static id gBackendImplementation; return [FIRAuthErrorUtils appNotVerifiedErrorWithMessage:serverErrorMessage]; } + if ([shortErrorMessage isEqualToString:kMissingClientIdentifier]) { + return [FIRAuthErrorUtils appNotVerifiedErrorWithMessage:@"Missing app verification via" + " reCAPTCHA or APNS token. Please verify that appVerificationDisabledForTesting is not" + " enabled when testing with a phone number that is not marked as a test Phone number in the" + " app console."]; + } + if ([shortErrorMessage isEqualToString:kCaptchaCheckFailedErrorMessage]) { return [FIRAuthErrorUtils captchaCheckFailedErrorWithMessage:serverErrorMessage]; } -- cgit v1.2.3 From 83d10045d4672c4eda2b49ecbc260b109de0fa84 Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Mon, 30 Apr 2018 14:24:49 -0400 Subject: Remove iOS 7 Simulator check from FIRLogger. (#1196) This isn't needed anymore due to the minimum required version being bumped to iOS 8. --- Firebase/Core/FIRLogger.m | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Firebase/Core/FIRLogger.m b/Firebase/Core/FIRLogger.m index d4de2a0..ba28f4c 100644 --- a/Firebase/Core/FIRLogger.m +++ b/Firebase/Core/FIRLogger.m @@ -133,16 +133,6 @@ void FIRLoggerInitializeASL() { sFIRLoggerDebugMode = NO; } -#if TARGET_OS_SIMULATOR - // Need to call asl_add_output_file so that the logs can appear in Xcode's console view when - // running iOS 7. Set the ASL filter mask for this output file up to debug level so that all - // messages are viewable in the console. - if (majorOSVersion == 7) { - asl_add_output_file(sFIRLoggerClient, STDERR_FILENO, kFIRLoggerCustomASLMessageFormat, - ASL_TIME_FMT_LCL, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG), ASL_ENCODE_SAFE); - } -#endif // TARGET_OS_SIMULATOR - sFIRClientQueue = dispatch_queue_create("FIRLoggingClientQueue", DISPATCH_QUEUE_SERIAL); dispatch_set_target_queue(sFIRClientQueue, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)); -- cgit v1.2.3 From bf545d49e83e7659ecdba73a3124db3521da16eb Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Mon, 30 Apr 2018 18:25:06 -0700 Subject: Remove deprecated verify phone number (#1200) * remove_deprecated_verify_phone * Fixes unit tests --- Example/Auth/Sample/MainViewController.m | 40 +------ Example/Auth/Tests/FIRPhoneAuthProviderTests.m | 115 ++++++++++++++++++--- .../AuthProviders/Phone/FIRPhoneAuthProvider.m | 14 --- Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h | 26 ----- 4 files changed, 104 insertions(+), 91 deletions(-) diff --git a/Example/Auth/Sample/MainViewController.m b/Example/Auth/Sample/MainViewController.m index 0da28c8..8667da5 100644 --- a/Example/Auth/Sample/MainViewController.m +++ b/Example/Auth/Sample/MainViewController.m @@ -573,15 +573,10 @@ NSString *const kCreateUserAccessibilityID = @"CreateUserAccessibilityID"; */ static NSString *const kPhoneAuthSectionTitle = @"Phone Auth"; -/** @var kPhoneNumberSignInTitle - @brief The title for button to sign in with phone number. - */ -static NSString *const kPhoneNumberSignInTitle = @"Sign in With Phone Number"; - /** @var kPhoneNumberSignInTitle @brief The title for button to sign in with phone number using reCAPTCHA. */ -static NSString *const kPhoneNumberSignInReCaptchaTitle = @"Sign in With Phone Number (reCAPTCHA)"; +static NSString *const kPhoneNumberSignInReCaptchaTitle = @"Sign in With Phone Number"; /** @var kIsNewUserToggleTitle @brief The title for button to enable new or existing user toggle. @@ -738,8 +733,6 @@ typedef enum { [StaticContentTableViewSection sectionWithTitle:kPhoneAuthSectionTitle cells:@[ [StaticContentTableViewCell cellWithTitle:kPhoneNumberSignInReCaptchaTitle action:^{ [weakSelf signInWithPhoneNumberWithPrompt]; }], - [StaticContentTableViewCell cellWithTitle:kPhoneNumberSignInTitle - action:^{ [weakSelf signInWithPhoneNumber]; }], [StaticContentTableViewCell cellWithTitle:kUpdatePhoneNumber action:^{ [weakSelf updatePhoneNumberWithPrompt]; }], [StaticContentTableViewCell cellWithTitle:kLinkPhoneNumber @@ -2857,37 +2850,6 @@ static NSDictionary *parseURL(NSString *urlString) { }]; } -/** @fn signInWithPhoneNumber - @brief Allows sign in with phone number. - */ -- (void)signInWithPhoneNumber { - [self commonPhoneNumberInputWithTitle:@"Phone #" Completion:^(NSString *_Nullable phone) { - [self showSpinner:^{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - [[AppManager phoneAuthProvider] verifyPhoneNumber:phone - completion:^(NSString *_Nullable verificationID, - NSError *_Nullable error) { -#pragma clang diagnostic pop - [self hideSpinner:^{ - if (error) { - [self logFailure:@"failed to send verification code" error:error]; - [self showMessagePrompt:error.localizedDescription]; - return; - } - [self logSuccess:@"Code sent"]; - - [self commonPhoneNumberInputWithTitle:@"Code" - Completion:^(NSString *_Nullable verificationCode) { - [self commontPhoneVerificationWithVerificationID:verificationID - verificationCode:verificationCode]; - }]; - }]; - }]; - }]; - }]; -} - /** @fn signInWithPhoneNumber @brief Allows sign in with phone number using reCAPTCHA. @param phoneNumber Number pass in string. diff --git a/Example/Auth/Tests/FIRPhoneAuthProviderTests.m b/Example/Auth/Tests/FIRPhoneAuthProviderTests.m index 96432c7..1bb42b1 100644 --- a/Example/Auth/Tests/FIRPhoneAuthProviderTests.m +++ b/Example/Auth/Tests/FIRPhoneAuthProviderTests.m @@ -283,9 +283,16 @@ static const NSTimeInterval kExpectationTimeout = 2; number was provided. */ - (void)testVerifyEmptyPhoneNumber { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + // Empty phone number is checked on the client side so no backend RPC is mocked. XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:@"" + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertNotNil(error); XCTAssertEqual(error.code, FIRAuthErrorCodeMissingPhoneNumber); @@ -299,6 +306,12 @@ static const NSTimeInterval kExpectationTimeout = 2; number was provided. */ - (void)testVerifyInvalidPhoneNumber { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); OCMStub([_mockAppCredentialManager credential]) @@ -316,6 +329,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(verificationID); @@ -332,6 +346,12 @@ static const NSTimeInterval kExpectationTimeout = 2; @brief Tests a successful invocation of @c verifyPhoneNumber:completion:. */ - (void)testVerifyPhoneNumber { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); OCMStub([_mockAppCredentialManager credential]) @@ -351,6 +371,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(error); @@ -368,6 +389,12 @@ static const NSTimeInterval kExpectationTimeout = 2; is disabled. */ - (void)testVerifyPhoneNumberInTestMode { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + // Disable app verification. FIRAuthSettings *settings = [[FIRAuthSettings alloc] init]; settings.appVerificationDisabledForTesting = YES; @@ -389,6 +416,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(error); @@ -406,6 +434,12 @@ static const NSTimeInterval kExpectationTimeout = 2; is disabled. */ - (void)testVerifyPhoneNumberInTestModeFailure { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + // Disable app verification. FIRAuthSettings *settings = [[FIRAuthSettings alloc] init]; settings.appVerificationDisabledForTesting = YES; @@ -425,6 +459,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(verificationID); @@ -901,10 +936,17 @@ static const NSTimeInterval kExpectationTimeout = 2; @brief Tests returning an error for the app failing to forward notification. */ - (void)testNotForwardingNotification { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(NO); }); XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(verificationID); @@ -919,19 +961,48 @@ static const NSTimeInterval kExpectationTimeout = 2; @brief Tests returning an error for the app failing to provide an APNS device token. */ - (void)testMissingAPNSToken { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + + // Simulate missing app token error. OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); OCMExpect([_mockAppCredentialManager credential]).andReturn(nil); OCMExpect([_mockAPNSTokenManager getTokenWithCallback:OCMOCK_ANY]) - .andCallBlock1(^(FIRAuthAPNSTokenCallback callback) { callback(nil, nil); }); - // Expect verify client request to the backend wth empty token. - OCMExpect([_mockBackend verifyClient:[OCMArg any] callback:[OCMArg any]]) - .andCallBlock2(^(FIRVerifyClientRequest *request, - FIRVerifyClientResponseCallback callback) { - XCTAssertNil(request.appToken); + .andCallBlock1(^(FIRAuthAPNSTokenCallback callback) { + NSError *error = [NSError errorWithDomain:FIRAuthErrorDomain + code:FIRAuthErrorCodeMissingAppToken + userInfo:nil]; + callback(nil, error); + }); + OCMExpect([_mockBackend getProjectConfig:[OCMArg any] callback:[OCMArg any]]) + .andCallBlock2(^(FIRGetProjectConfigRequest *request, + FIRGetProjectConfigResponseCallback callback) { + XCTAssertNotNil(request); + dispatch_async(FIRAuthGlobalWorkQueue(), ^() { + id mockGetProjectConfigResponse = OCMClassMock([FIRGetProjectConfigResponse class]); + OCMStub([mockGetProjectConfigResponse authorizedDomains]). + andReturn(@[ kFakeAuthorizedDomain]); + callback(mockGetProjectConfigResponse, nil); + }); + }); + id mockUIDelegate = OCMProtocolMock(@protocol(FIRAuthUIDelegate)); + + // Expect view controller presentation by UIDelegate. + OCMExpect([_mockURLPresenter presentURL:OCMOCK_ANY + UIDelegate:mockUIDelegate + callbackMatcher:OCMOCK_ANY + completion:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) { + __unsafe_unretained id unretainedArgument; + // Indices 0 and 1 indicate the hidden arguments self and _cmd. + // `completion` is at index 5 + [invocation getArgument:&unretainedArgument atIndex:5]; + FIRAuthURLPresentationCompletion completion = unretainedArgument; dispatch_async(FIRAuthGlobalWorkQueue(), ^() { - // The backend is supposed to return an error. - callback(nil, [NSError errorWithDomain:FIRAuthErrorDomain + completion(nil, [NSError errorWithDomain:FIRAuthErrorDomain code:FIRAuthErrorCodeMissingAppToken userInfo:nil]); }); @@ -939,23 +1010,28 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:mockUIDelegate completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); - XCTAssertNil(verificationID); - XCTAssertEqualObjects(error.domain, FIRAuthErrorDomain); XCTAssertEqual(error.code, FIRAuthErrorCodeMissingAppToken); + XCTAssertNil(verificationID); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; + OCMVerifyAll(_mockBackend); OCMVerifyAll(_mockNotificationManager); - OCMVerifyAll(_mockAppCredentialManager); - OCMVerifyAll(_mockAPNSTokenManager); } /** @fn testVerifyClient @brief Tests verifying client before sending verification code. */ - (void)testVerifyClient { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); OCMExpect([_mockAppCredentialManager credential]).andReturn(nil); @@ -1007,6 +1083,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(error); @@ -1024,6 +1101,12 @@ static const NSTimeInterval kExpectationTimeout = 2; @brief Tests failed retry after failing to send verification code. */ - (void)testSendVerificationCodeFailedRetry { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); @@ -1097,6 +1180,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(verificationID); @@ -1114,6 +1198,12 @@ static const NSTimeInterval kExpectationTimeout = 2; @brief Tests successful retry after failing to send verification code. */ - (void)testSendVerificationCodeSuccessFulRetry { + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub(ClassMethod([mockBundle mainBundle])).andReturn(mockBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) + .andReturn(@[ @{ @"CFBundleURLSchemes" : @[ kFakeReverseClientID ] } ]); + OCMStub([mockBundle bundleIdentifier]).andReturn(kFakeBundleID); + OCMExpect([_mockNotificationManager checkNotificationForwardingWithCallback:OCMOCK_ANY]) .andCallBlock1(^(FIRAuthNotificationForwardingCallback callback) { callback(YES); }); @@ -1189,6 +1279,7 @@ static const NSTimeInterval kExpectationTimeout = 2; XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; [_provider verifyPhoneNumber:kTestPhoneNumber + UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertNil(error); XCTAssertEqualObjects(verificationID, kTestVerificationID); diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m index 2d06a15..3532861 100644 --- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m +++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m @@ -108,20 +108,6 @@ NSString *const kReCAPTCHAURLStringFormat = @"https://%@/__/auth/handler?"; return self; } -- (void)verifyPhoneNumber:(NSString *)phoneNumber - completion:(nullable FIRVerificationResultCallback)completion { - dispatch_async(FIRAuthGlobalWorkQueue(), ^{ - [self internalVerifyPhoneNumber:phoneNumber completion:^(NSString *_Nullable verificationID, - NSError *_Nullable error) { - if (completion) { - dispatch_async(dispatch_get_main_queue(), ^{ - completion(verificationID, error); - }); - } - }]; - }); -} - - (void)verifyPhoneNumber:(NSString *)phoneNumber UIDelegate:(nullable id)UIDelegate completion:(nullable FIRVerificationResultCallback)completion { diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h index bd68e84..28757f5 100644 --- a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h +++ b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h @@ -61,32 +61,6 @@ NS_SWIFT_NAME(PhoneAuthProvider) */ + (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:)); -/** @fn verifyPhoneNumber:completion: - @brief Please use `verifyPhoneNumber:UIDelegate:completion:` instead. - - @param phoneNumber The phone number to be verified. - @param completion The callback to be invoked when the verification flow is finished. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeAppNotVerified` - Indicates that Firebase could not retrieve the - silent push notification and therefore could not verify your app. - + `FIRAuthErrorCodeInvalidAppCredential` - Indicates that The APNs device token provided - is either incorrect or does not match the private certificate uploaded to the Firebase - Console. - + `FIRAuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this - project has been exceeded. - + `FIRAuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is - invalid. - + `FIRAuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided. - + `FIRAuthErrorCodeMissingAppToken` - Indicates that the APNs device token could not be - obtained. The app may not have set up remote notification correctly, or may fail to - forward the APNs device token to FIRAuth if app delegate swizzling is disabled. - */ -- (void)verifyPhoneNumber:(NSString *)phoneNumber - completion:(nullable FIRVerificationResultCallback)completion - __attribute__((deprecated)); - /** @fn verifyPhoneNumber:UIDelegate:completion: @brief Starts the phone number authentication flow by sending a verifcation code to the specified phone number. -- cgit v1.2.3 From 1a45e5b2dc323089d438182107058af67b93fef1 Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Mon, 30 Apr 2018 18:52:41 -0700 Subject: Adds and modifies deprecation messages (#1202) * Adds and modifies deprecation messages * Addresses Comments --- Firebase/Auth/Source/Public/FIRAuth.h | 29 +++++++++++------------------ Firebase/Auth/Source/Public/FIRUser.h | 25 +++++++++++++++++-------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h index 2901fca..a3ed960 100644 --- a/Firebase/Auth/Source/Public/FIRAuth.h +++ b/Firebase/Auth/Source/Public/FIRAuth.h @@ -429,10 +429,9 @@ NS_SWIFT_NAME(Auth) password:(NSString *)password completion:(nullable FIRAuthDataResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( - "signInAndRetrieveDataWithEmail:password:completion: is " - "deprecated. Please use" - " signInWithEmail:password:completion: for Objective-C or" - " signIn(withEmail:password:completion:) for Swift instead."); + "Please use signInWithEmail:password:completion: for" + " Objective-C or signIn(withEmail:password:completion:) for" + " Swift instead."); /** @fn signInWithCredential:completion: @brief Please use `signInAndRetrieveDataWithCredential:completion:` for Objective-C or @@ -475,11 +474,9 @@ NS_SWIFT_NAME(Auth) */ - (void)signInWithCredential:(FIRAuthCredential *)credential completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( - "signInWithCredential:completion: is" - " deprecated. Please use" - " signInAndRetrieveDataWithCredential:completion: for" - " Objective-C or signInAndRetrieveData(with:completion:) for" - " Swift instead."); + "Please use signInAndRetrieveDataWithCredential:completion:" + " for Objective-C or signInAndRetrieveData(with:completion:)" + " for Swift instead."); /** @fn signInAndRetrieveDataWithCredential:completion: @brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook @@ -564,8 +561,7 @@ NS_SWIFT_NAME(Auth) */ - (void)signInAnonymouslyAndRetrieveDataWithCompletion: (nullable FIRAuthDataResultCallback)completion - DEPRECATED_MSG_ATTRIBUTE("signInAnonymouslyAndRetrieveDataWithCompletion: is deprecated." - " Please use signInAnonymouslyWithCompletion: for Objective-C or" + DEPRECATED_MSG_ATTRIBUTE("Please use signInAnonymouslyWithCompletion: for Objective-C or" " signInAnonymously(Completion:) for swift instead."); /** @fn signInWithCustomToken:completion: @@ -616,8 +612,7 @@ NS_SWIFT_NAME(Auth) - (void)signInAndRetrieveDataWithCustomToken:(NSString *)token completion:(nullable FIRAuthDataResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( - "signInAndRetrieveDataWithCustomToken:completion: is" - " deprecated. Please use signInWithCustomToken:completion:" + "Please use signInWithCustomToken:completion:" "for Objective-C or signIn(withCustomToken:completion:) for" " Swift instead."); @@ -678,11 +673,9 @@ NS_SWIFT_NAME(Auth) password:(NSString *)password completion:(nullable FIRAuthDataResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( - "createUserAndRetrieveDataWithEmail:password:completion: is" - " deprecated. Please use" - " createUserWithEmail:password:completion: for Objective-C or" - " createUser(withEmail:password:completion:) for Swift" - " instead."); + "Please use createUserWithEmail:password:completion: for" + " Objective-C or createUser(withEmail:password:completion:)" + " for Swift instead."); /** @fn confirmPasswordResetWithCode:newPassword:completion: @brief Resets the password given a code sent to the user outside of the app and a new password diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h index 1c7af7a..cc5d0a0 100644 --- a/Firebase/Auth/Source/Public/FIRUser.h +++ b/Firebase/Auth/Source/Public/FIRUser.h @@ -221,13 +221,18 @@ NS_SWIFT_NAME(User) - (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion; /** @fn reauthenticateWithCredential:completion: - @brief Convenience method for `reauthenticateAndRetrieveDataWithCredential:completion:` This - method doesn't return additional identity provider data. + @brief Please use reauthenticateAndRetrieveDataWithCredential:completion: for Objective-C or + reauthenticateAndRetrieveData(WithCredential:completion:) for Swift instead. */ - (void)reauthenticateWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRUserProfileChangeCallback)completion; - -/** @fn reauthenticateWithCredential:completion: + completion:(nullable FIRUserProfileChangeCallback)completion + DEPRECATED_MSG_ATTRIBUTE( "Please use" + " reauthenticateAndRetrieveDataWithCredential:completion: for" + " Objective-C or" + " reauthenticateAndRetrieveData(WithCredential:completion:)" + " for Swift instead."); + +/** @fn reauthenticateAndRetrieveDataWithCredential:completion: @brief Renews the user's authentication tokens by validating a fresh set of credentials supplied by the user and returns additional identity provider data. @@ -322,11 +327,15 @@ NS_SWIFT_NAME(User) completion:(nullable FIRAuthTokenCallback)completion; /** @fn linkWithCredential:completion: - @brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method - doesn't return additional identity provider data. + @brief Please use linkAndRetrieveDataWithCredential:completion: for Objective-C or + linkAndRetrieveData(WithCredential:completion:) for Swift instead. */ - (void)linkWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRAuthResultCallback)completion; + completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( + "Please use linkAndRetrieveDataWithCredential:completion: for" + " Objective-C or" + " linkAndRetrieveData(WithCredential:completion:) for" + " Swift instead."); /** @fn linkAndRetrieveDataWithCredential:completion: @brief Associates a user account from a third-party identity provider with this user and -- cgit v1.2.3 From a0e10d1add6b7cf7213b8fd73aaf78d9d0ecd2eb Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Tue, 1 May 2018 09:42:57 -0400 Subject: Remove logging count for this release. (#1201) --- Example/Core/Tests/FIRLoggerTest.m | 27 --------------------------- Firebase/Core/FIRLogger.m | 27 --------------------------- Firebase/Core/Private/FIRLogger.h | 15 --------------- 3 files changed, 69 deletions(-) diff --git a/Example/Core/Tests/FIRLoggerTest.m b/Example/Core/Tests/FIRLoggerTest.m index dfc7cc8..7da62db 100644 --- a/Example/Core/Tests/FIRLoggerTest.m +++ b/Example/Core/Tests/FIRLoggerTest.m @@ -239,33 +239,6 @@ static NSString *const kMessageCode = @"I-COR000001"; XCTAssertEqual(FIRLoggerLevelDebug, ASL_LEVEL_DEBUG); } -- (void)testErrorNumberIncrement { - OCMStub([self.userDefaultsMock integerForKey:kFIRLoggerErrorCountKey]).andReturn(10); - OCMExpect([self.userDefaultsMock setInteger:11 forKey:kFIRLoggerErrorCountKey]); - FIRLogError(kFIRLoggerCore, kMessageCode, @"Error."); - - // Use a delay since the logging is async. - OCMVerifyAllWithDelay(self.userDefaultsMock, 1); -} - -- (void)testWarningNumberIncrement { - OCMStub([self.userDefaultsMock integerForKey:kFIRLoggerWarningCountKey]).andReturn(1); - OCMExpect([self.userDefaultsMock setInteger:2 forKey:kFIRLoggerWarningCountKey]); - FIRLogWarning(kFIRLoggerCore, kMessageCode, @"Warning."); - - // Use a delay since the logging is async. - OCMVerifyAllWithDelay(self.userDefaultsMock, 1); -} - -- (void)testResetIssuesCount { - OCMExpect([self.userDefaultsMock setInteger:0 forKey:kFIRLoggerErrorCountKey]); - OCMExpect([self.userDefaultsMock setInteger:0 forKey:kFIRLoggerWarningCountKey]); - FIRResetNumberOfIssuesLogged(); - - // Use a delay since the logging is async. - OCMVerifyAllWithDelay(self.userDefaultsMock, 1); -} - // Helper functions. - (BOOL)logExists { [self drainFIRClientQueue]; diff --git a/Firebase/Core/FIRLogger.m b/Firebase/Core/FIRLogger.m index ba28f4c..739664d 100644 --- a/Firebase/Core/FIRLogger.m +++ b/Firebase/Core/FIRLogger.m @@ -186,7 +186,6 @@ BOOL FIRIsLoggableLevel(FIRLoggerLevel loggerLevel, BOOL analyticsComponent) { #ifdef DEBUG void FIRResetLogger() { sFIRLoggerOnceToken = 0; - FIRResetNumberOfIssuesLogged(); [[NSUserDefaults standardUserDefaults] removeObjectForKey:kFIRPersistedDebugModeKey]; } @@ -233,17 +232,6 @@ void FIRLogBasic(FIRLoggerLevel level, dispatch_async(sFIRClientQueue, ^{ asl_log(sFIRLoggerClient, NULL, level, "%s", logMsg.UTF8String); }); - - // Keep count of how many errors and warnings are triggered. - if (level == FIRLoggerLevelError) { - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSInteger errorCount = [defaults integerForKey:kFIRLoggerErrorCountKey]; - [defaults setInteger:errorCount + 1 forKey:kFIRLoggerErrorCountKey]; - } else if (level == FIRLoggerLevelWarning) { - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSInteger warningCount = [defaults integerForKey:kFIRLoggerWarningCountKey]; - [defaults setInteger:warningCount + 1 forKey:kFIRLoggerWarningCountKey]; - } } #pragma clang diagnostic pop @@ -271,21 +259,6 @@ FIR_LOGGING_FUNCTION(Debug) #undef FIR_MAKE_LOGGER -#pragma mark - Number of errors and warnings - -NSInteger FIRNumberOfErrorsLogged(void) { - return [[NSUserDefaults standardUserDefaults] integerForKey:kFIRLoggerErrorCountKey]; -} - -NSInteger FIRNumberOfWarningsLogged(void) { - return [[NSUserDefaults standardUserDefaults] integerForKey:kFIRLoggerWarningCountKey]; -} - -void FIRResetNumberOfIssuesLogged(void) { - [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:kFIRLoggerErrorCountKey]; - [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:kFIRLoggerWarningCountKey]; -} - #pragma mark - FIRLoggerWrapper @implementation FIRLoggerWrapper diff --git a/Firebase/Core/Private/FIRLogger.h b/Firebase/Core/Private/FIRLogger.h index e095e4e..cbb62e2 100644 --- a/Firebase/Core/Private/FIRLogger.h +++ b/Firebase/Core/Private/FIRLogger.h @@ -71,21 +71,6 @@ void FIRSetAnalyticsDebugMode(BOOL analyticsDebugMode); */ void FIRSetLoggerLevel(FIRLoggerLevel loggerLevel); -/** - * Retrieve the number of errors that have been logged since the stat was last reset. - */ -NSInteger FIRNumberOfErrorsLogged(void); - -/** - * Retrieve the number of warnings that have been logged since the stat was last reset. - */ -NSInteger FIRNumberOfWarningsLogged(void); - -/** - * Reset number of errors and warnings that have been logged to 0. - */ -void FIRResetNumberOfIssuesLogged(void); - /** * Checks if the specified logger level is loggable given the current settings. * (required) log level (one of the FIRLoggerLevel enum values). -- cgit v1.2.3 From 7dd3ee0272651a521ad2b047ec6e3350d4fc1d2f Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 1 May 2018 07:21:15 -0700 Subject: Add Firebase version tag (#1205) --- scripts/update-tags.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update-tags.sh b/scripts/update-tags.sh index 3db0de9..64cf1ce 100755 --- a/scripts/update-tags.sh +++ b/scripts/update-tags.sh @@ -27,6 +27,7 @@ # Delete any existing tags at origin +git push --delete origin '5.0.0' git push --delete origin 'Core-5.0.0' git push --delete origin 'Auth-5.0.0' git push --delete origin 'Database-5.0.0' @@ -37,6 +38,7 @@ git push --delete origin 'Storage-3.0.0' # Delete local tags +git tag --delete '5.0.0' git tag --delete 'Core-5.0.0' git tag --delete 'Auth-5.0.0' git tag --delete 'Database-5.0.0' @@ -47,6 +49,7 @@ git tag --delete 'Storage-3.0.0' # Add and push the tags +git tag '5.0.0' git tag 'Core-5.0.0' git tag 'Auth-5.0.0' git tag 'Database-5.0.0' -- cgit v1.2.3 From 7b99c5be3e0e36592fac640ec433ea2e0ab412ec Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 1 May 2018 07:21:43 -0700 Subject: README.md updates for 5.0.0 (#1204) --- README.md | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index fe48c0e..39db2f5 100644 --- a/README.md +++ b/README.md @@ -11,20 +11,23 @@ monetize your app. More information about Firebase can be found at ## Installation See the three subsections for details about three different installation methods. -1. [Officially supported binary pods](README.md#binary-pods-ios-only) -1. [Community supported source pods](README.md#source-pods-ios-macos-tvos) +1. [Standard pod install](README.md#standard-pod-install) +1. [Installing from the GitHub repo](README.md#installing-from-github) 1. [Experimental Carthage](README.md#carthage-ios-only) -### Binary pods (iOS only) +### Standard pod install Go to [https://firebase.google.com/docs/ios/setup](https://firebase.google.com/docs/ios/setup). -### Source pods (iOS, macOS, tvOS) +### Installing from GitHub -While the official Firebase release remains a binary framework distribution, -in the future, we plan to switch to a source CocoaPod distribution for the -Firebase open source components. +For releases starting with 5.0.0, the source for each release is also deployed +to CocoaPods master and available via standard +[CocoaPods Podfile syntax](https://guides.cocoapods.org/syntax/podfile.html#pod). + +These instructions can be used to access the Firebase repo at other branches, +tags, or commits. #### Background @@ -38,22 +41,22 @@ For iOS, copy a subset of the following lines to your Podfile: ``` pod 'Firebase' # To enable Firebase module, with `@import Firebase` support -pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseDatabase', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseFunctions', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseMessaging', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' +pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseDatabase', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseFunctions', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseMessaging', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' ``` For macOS and tvOS, copy a subset of the following: ``` -pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseDatabase', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' -pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0' +pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseDatabase', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' +pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' ``` 1. Make sure you have at least CocoaPods version 1.4.0 - `pod --version`. -- cgit v1.2.3 From 56a529531b5ecd81a68c098ec8fbc5b8a6ec3fcf Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Fri, 4 May 2018 10:13:02 -0700 Subject: Disable pre-release repos (#1228) --- Example/Podfile | 6 +++--- Firestore/Example/Podfile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Example/Podfile b/Example/Podfile index 774635c..61913f4 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,6 +1,6 @@ -#delete source lines before master merge -source 'sso://cpdc-internal/spec' -source 'https://github.com/CocoaPods/Specs.git' +# Uncomment the next two lines for pre-release testing +#source 'sso://cpdc-internal/spec' +#source 'https://github.com/CocoaPods/Specs.git' use_frameworks! diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index a745de7..1de1906 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -1,6 +1,6 @@ -#delete source lines before master merge -source 'sso://cpdc-internal/spec' -source 'https://github.com/CocoaPods/Specs.git' +# Uncomment the next two lines for pre-release testing +#source 'sso://cpdc-internal/spec' +#source 'https://github.com/CocoaPods/Specs.git' # The next line is the forcing function for the Firebase pod. The Firebase # version's subspecs should depend on the component versions in their -- cgit v1.2.3