Skip to content

Commit bc29da6

Browse files
authored
Put the need to include Firestore/Source/Public in the podspec (#3288)
This removes the need to munge the pods project after the fact and makes it so that customers can click through to our headers too.
1 parent c296efb commit bc29da6

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

FirebaseFirestore.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
7575
'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
7676
'HEADER_SEARCH_PATHS' =>
7777
'"${PODS_TARGET_SRCROOT}" ' +
78+
'"${PODS_TARGET_SRCROOT}/Firestore/Source/Public" ' +
7879
'"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' +
7980
'"${PODS_ROOT}/nanopb" ' +
8081
'"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"',

Firestore/Example/Podfile

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,6 @@ source 'https://cdn.cocoapods.org/'
66

77
use_frameworks!
88

9-
10-
# Appends the given +paths+ to the HEADER_SEARCH_PATHS setting for the given
11-
# target in all build configurations.
12-
def append_header_search_path(target, *paths)
13-
setting = 'HEADER_SEARCH_PATHS'
14-
target.build_configurations.each do |config|
15-
config.build_settings[setting] ||= '$(inherited)'
16-
paths.each do |path|
17-
config.build_settings[setting] << ' '
18-
config.build_settings[setting] << path
19-
end
20-
end
21-
end
22-
23-
24-
post_install do |installer|
25-
installer.pods_project.targets.each do |target|
26-
# Building the FirebaseFirestore framework proper seems fragile in Xcode:
27-
# changes to public headers seem to cause weird cascading failures in the
28-
# IDE's pre-build error detection. The issue seems to be that the Pod's
29-
# public headers are found by clang at build time through a copy headers
30-
# phase, but the interactive editor won't have those in place, especially
31-
# when the build is broken by current edits.
32-
if target.name =~ /^FirebaseFirestore/
33-
append_header_search_path(target, '$(PODS_ROOT)/../../../Firestore/Source/Public')
34-
end
35-
end
36-
end
37-
389
target 'Firestore_Example_iOS' do
3910
platform :ios, '8.0'
4011

0 commit comments

Comments
 (0)