Skip to content

Commit 9d202ae

Browse files
authored
Drop support for building Firestore with Xcode 8 (#4842)
1 parent 515da2d commit 9d202ae

File tree

3 files changed

+10
-72
lines changed

3 files changed

+10
-72
lines changed

Firestore/Example/Podfile

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ def use_local_sources()
3535
return ENV.has_key?('USE_LOCAL_SOURCES') || ENV['TRAVIS_PULL_REQUEST'] == 'false'
3636
end
3737

38-
def xcode_major_version()
39-
version = `xcodebuild -version`
40-
if version =~ /^Xcode\s*(\d+)\./
41-
return $1.to_i
42-
else
43-
raise "Could not find Xcode version in '$version'"
44-
end
45-
end
46-
4738
# Adds a `pod name, :path => ../..` declaration to use local sources if the
4839
# Podfile has been configured to operate that way.
4940
def maybe_local_pod(name)
@@ -68,26 +59,10 @@ def configure_local_pods()
6859
maybe_local_pod 'FirebaseAuth'
6960
maybe_local_pod 'FirebaseAuthInterop'
7061

71-
if xcode_major_version() >= 9
72-
# Firestore still compiles with Xcode 8 to help verify general conformance
73-
# with C++11 by using an older compiler that doesn't have as many
74-
# extensions from later versions of the language. However, Firebase as a
75-
# whole does not support this environment and @available checks in
76-
# GoogleDataTransport would otherwise break this build.
77-
#
78-
# Firestore doesn't depend on GoogleDataTransport directly--it comes in as
79-
# a dependency of FirebaseCoreDiagnostics. Luckily, FirebaseCore does not
80-
# strongly depend on this, so we can edit the dependency out in the podspec
81-
# and then avoid adding those dependencies here to prevent CocoaPods from
82-
# importing it.
83-
#
84-
# This list should include the transitive closure of all dependencies of
85-
# FirebaseCoreDiagnostics, except GoogleUtilities which we otherwise need.
86-
maybe_local_pod 'FirebaseCoreDiagnostics'
87-
maybe_local_pod 'FirebaseCoreDiagnosticsInterop'
88-
maybe_local_pod 'GoogleDataTransport'
89-
maybe_local_pod 'GoogleDataTransportCCTSupport'
90-
end
62+
maybe_local_pod 'FirebaseCoreDiagnostics'
63+
maybe_local_pod 'FirebaseCoreDiagnosticsInterop'
64+
maybe_local_pod 'GoogleDataTransport'
65+
maybe_local_pod 'GoogleDataTransportCCTSupport'
9166
end
9267

9368
# Reads the value of the PLATFORM environment variable, converts it to the

scripts/build.sh

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -264,25 +264,12 @@ case "$product-$platform-$method" in
264264
"${firestore_emulator}" start
265265
trap '"${firestore_emulator}" stop' ERR EXIT
266266

267-
if [[ "$xcode_major" -lt 9 ]]; then
268-
# When building and testing for Xcode 8, only test unit tests.
269-
RunXcodebuild \
270-
-workspace 'Firestore/Example/Firestore.xcworkspace' \
271-
-scheme "Firestore_Tests_$platform" \
272-
"${xcb_flags[@]}" \
273-
build \
274-
test
275-
276-
else
277-
# IntegrationTests run all the tests, including Swift tests, which
278-
# require Swift 4.0 and Xcode 9+.
279-
RunXcodebuild \
280-
-workspace 'Firestore/Example/Firestore.xcworkspace' \
281-
-scheme "Firestore_IntegrationTests_$platform" \
282-
"${xcb_flags[@]}" \
283-
build \
284-
test
285-
fi
267+
RunXcodebuild \
268+
-workspace 'Firestore/Example/Firestore.xcworkspace' \
269+
-scheme "Firestore_IntegrationTests_$platform" \
270+
"${xcb_flags[@]}" \
271+
build \
272+
test
286273
;;
287274

288275
Firestore-macOS-cmake | Firestore-Linux-cmake)

scripts/install_prereqs.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,6 @@ if [[ ! -z "${QUICKSTART:-}" ]]; then
103103
scripts/setup_quickstart.sh "$QUICKSTART"
104104
fi
105105

106-
system=$(uname -s)
107-
case "$system" in
108-
Darwin)
109-
xcode_version=$(xcodebuild -version | head -n 1)
110-
xcode_version="${xcode_version/Xcode /}"
111-
xcode_major="${xcode_version/.*/}"
112-
;;
113-
*)
114-
xcode_major="0"
115-
;;
116-
esac
117-
118106
case "$project-$platform-$method" in
119107

120108
FirebasePod-iOS-xcodebuild)
@@ -156,18 +144,6 @@ case "$project-$platform-$method" in
156144
;;
157145

158146
Firestore-*-xcodebuild | Firestore-*-fuzz)
159-
if [[ $xcode_major -lt 9 ]]; then
160-
# Firestore still compiles with Xcode 8 to help verify general
161-
# conformance with C++11 by using an older compiler that doesn't have as
162-
# many extensions from later versions of the language. However, Firebase
163-
# as a whole does not support this environment and @available checks in
164-
# GoogleDataTransport would otherwise break this build.
165-
#
166-
# This drops the dependency that adds GoogleDataTransport into
167-
# Firestore's dependencies.
168-
sed -i.bak "/s.dependency 'FirebaseCoreDiagnostics'/d" FirebaseCore.podspec
169-
fi
170-
171147
gem install xcpretty
172148

173149
# The Firestore Podfile is multi-platform by default, but this doesn't work

0 commit comments

Comments
 (0)