Skip to content

Commit c42bf81

Browse files
authored
Fix Firestore builds under Xcode 8 (#3647)
* Fix Firestore builds under Xcode 8 * FirebaseCore must be a local pod Otherwise pod install won't pick up local edits to that podspec
1 parent d70c873 commit c42bf81

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Firestore/Example/Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ target 'Firestore_Example_iOS' do
3939
pod 'Firebase/CoreOnly', '6.7.0'
4040

4141
pod 'FirebaseFirestore', :path => '../../'
42+
pod 'FirebaseCore', :path => '../../'
4243

4344
target 'Firestore_Tests_iOS' do
4445
inherit! :search_paths
@@ -86,6 +87,7 @@ target 'Firestore_Example_macOS' do
8687
platform :osx, '10.11'
8788

8889
pod 'FirebaseFirestore', :path => '../../'
90+
pod 'FirebaseCore', :path => '../../'
8991

9092
target 'Firestore_Tests_macOS' do
9193
inherit! :search_paths
@@ -115,6 +117,7 @@ target 'Firestore_Example_tvOS' do
115117
platform :tvos, '10.0'
116118

117119
pod 'FirebaseFirestore', :path => '../../'
120+
pod 'FirebaseCore', :path => '../../'
118121

119122
target 'Firestore_Tests_tvOS' do
120123
inherit! :search_paths

scripts/install_prereqs.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ case "$PROJECT-$PLATFORM-$METHOD" in
105105
;;
106106

107107
Firestore-*-xcodebuild | Firestore-*-fuzz)
108+
if [[ $XCODE_VERSION == "8."* ]]; then
109+
# Firestore still compiles with Xcode 8 to help verify general
110+
# conformance with C++11 by using an older compiler that doesn't have as
111+
# many extensions from later versions of the language. However, Firebase
112+
# as a whole does not support this environment and @available checks in
113+
# GoogleDataTransport would otherwise break this build.
114+
#
115+
# This drops the dependency that adds GoogleDataTransport into
116+
# Firestore's dependencies.
117+
sed -i.bak "/s.dependency 'FirebaseCoreDiagnostics'/d" FirebaseCore.podspec
118+
fi
119+
108120
gem install xcpretty
109121
bundle exec pod install --project-directory=Firestore/Example --repo-update
110122
;;

0 commit comments

Comments
 (0)