@@ -1398,6 +1398,23 @@ func firestoreWrapperTarget() -> Target {
13981398 )
13991399}
14001400
1401+ func firestoreInternalTarget( ) -> Target {
1402+ if ProcessInfo . processInfo. environment [ " FIREBASECI_USE_LOCAL_FIRESTORE_ZIP " ] != nil {
1403+ // This is set when running `scripts/check_firestore_symbols.sh`.
1404+ return . binaryTarget(
1405+ name: " FirebaseFirestoreInternal " ,
1406+ // The `xcframework` should be moved to the root of the repo.
1407+ path: " FirebaseFirestoreInternal.xcframework "
1408+ )
1409+ } else {
1410+ return . binaryTarget(
1411+ name: " FirebaseFirestoreInternal " ,
1412+ url: " https://dl.google.com/firebase/ios/bin/firestore/11.6.0/rc0/FirebaseFirestoreInternal.zip " ,
1413+ checksum: " ad9d6cf31120ba0a91dbb9ccbe7ad08276a88565f6c79216929ec93a7d436459 "
1414+ )
1415+ }
1416+ }
1417+
14011418func firebaseFirestoreObjCppTarget( ) -> Target {
14021419 if ProcessInfo . processInfo. environment [ " FIREBASE_SOURCE_FIRESTORE " ] != nil {
14031420 return . target(
@@ -1417,26 +1434,13 @@ func firebaseFirestoreObjCppTarget() -> Target {
14171434 )
14181435 } else {
14191436 return . target(
1420- name: " FirebaseFirestoreCpp " ,
1421- dependencies: [
1422- " FirebaseAppCheckInterop " ,
1423- " FirebaseCore " ,
1424- " leveldb " ,
1425- " FirebaseFirestoreInternalWrapper " ,
1426- . product( name: " nanopb " , package : " nanopb " ) ,
1427- . product(
1428- name: " gRPC-C++ " ,
1429- package : " grpc-binary " ,
1430- condition: . when( platforms: [ . iOS, . macCatalyst, . tvOS, . macOS] )
1431- ) ,
1432- ] ,
1433- path: " Firestore/core/interfaceForSwift " ,
1434- publicHeadersPath: " api " , // Path to the public headers
1435- cxxSettings: [
1436- . headerSearchPath( " ../../../ " ) ,
1437- . headerSearchPath( " ../../Protos/nanopb " ) ,
1438- . headerSearchPath( " api " ) , // Ensure the header search path is correct
1439- ]
1437+ name: " FirebaseFirestoreObjCpp " ,
1438+ dependencies: [ . target(
1439+ name: " FirebaseFirestoreInternal " ,
1440+ condition: . when( platforms: [ . iOS, . macCatalyst, . tvOS, . macOS] )
1441+ ) ] ,
1442+ path: " FirebaseFirestoreInternal " ,
1443+ publicHeadersPath: " . "
14401444 )
14411445 }
14421446}
@@ -1552,29 +1556,13 @@ func firestoreTargets() -> [Target] {
15521556 ]
15531557 }
15541558
1555- let firestoreInternalTarget : Target = {
1556- if ProcessInfo . processInfo. environment [ " FIREBASECI_USE_LOCAL_FIRESTORE_ZIP " ] != nil {
1557- // This is set when running `scripts/check_firestore_symbols.sh`.
1558- return . binaryTarget(
1559- name: " FirebaseFirestoreInternal " ,
1560- // The `xcframework` should be moved to the root of the repo.
1561- path: " FirebaseFirestoreInternal.xcframework "
1562- )
1563- } else {
1564- return . binaryTarget(
1565- name: " FirebaseFirestoreInternal " ,
1566- url: " https://dl.google.com/firebase/ios/bin/firestore/11.6.0/rc0/FirebaseFirestoreInternal.zip " ,
1567- checksum: " ad9d6cf31120ba0a91dbb9ccbe7ad08276a88565f6c79216929ec93a7d436459 "
1568- )
1569- }
1570- } ( )
1571-
1559+ let firestoreInternal = firestoreInternalTarget ( )
15721560 return [
15731561 . target(
15741562 name: " FirebaseFirestore " ,
15751563 dependencies: [
15761564 . target(
1577- name: " FirebaseFirestoreInternalWrapper " ,
1565+ name: " FirebaseFirestoreObjCpp " ,
15781566 condition: . when( platforms: [ . iOS, . macCatalyst, . tvOS, . macOS] )
15791567 ) ,
15801568 . product(
@@ -1597,6 +1585,10 @@ func firestoreTargets() -> [Target] {
15971585 ] ,
15981586 path: " Firestore/Swift/Source " ,
15991587 resources: [ . process( " Resources/PrivacyInfo.xcprivacy " ) ] ,
1588+ cSettings: [
1589+ . headerSearchPath( " ../../../ " ) ,
1590+ . headerSearchPath( " ../../Protos/nanopb " ) ,
1591+ ] ,
16001592 swiftSettings: [
16011593 . interoperabilityMode( . Cxx) , // C++ interoperability setting
16021594 ] ,
@@ -1607,15 +1599,28 @@ func firestoreTargets() -> [Target] {
16071599 ]
16081600 ) ,
16091601 . target(
1610- name: " FirebaseFirestoreInternalWrapper " ,
1611- dependencies: [ . target(
1612- name: " FirebaseFirestoreInternal " ,
1613- condition: . when( platforms: [ . iOS, . macCatalyst, . tvOS, . macOS] )
1614- ) ] ,
1615- path: " FirebaseFirestoreInternal " ,
1616- publicHeadersPath: " . "
1602+ name: " FirebaseFirestoreCpp " ,
1603+ dependencies: [
1604+ " FirebaseAppCheckInterop " ,
1605+ " FirebaseCore " ,
1606+ " leveldb " ,
1607+ " FirebaseFirestoreInternal " ,
1608+ . product( name: " nanopb " , package : " nanopb " ) ,
1609+ . product(
1610+ name: " gRPC-C++ " ,
1611+ package : " grpc-binary " ,
1612+ condition: . when( platforms: [ . iOS, . macCatalyst, . tvOS, . macOS] )
1613+ ) ,
1614+ ] ,
1615+ path: " Firestore/core/src/api " ,
1616+ publicHeadersPath: " . " , // Path to the public headers
1617+ cxxSettings: [
1618+ . headerSearchPath( " ../../../.. " ) ,
1619+ . headerSearchPath( " ../../../Protos/nanopb " ) ,
1620+ . headerSearchPath( " . " ) , // Ensure the header search path is correct
1621+ ]
16171622 ) ,
1618- firestoreInternalTarget ,
1623+ firestoreInternal ,
16191624 firebaseFirestoreObjCppTarget ( ) ,
16201625 ]
16211626}
0 commit comments