@@ -476,7 +476,10 @@ let package = Package(
476476 dependencies: [
477477 " FirebaseFirestoreTarget " ,
478478 ] ,
479- path: " FirebaseCombineSwift/Sources/Firestore "
479+ path: " FirebaseCombineSwift/Sources/Firestore " ,
480+ swiftSettings: [
481+ . interoperabilityMode( . Cxx) , // C++ interoperability setting
482+ ]
480483 ) ,
481484 . target(
482485 name: " FirebaseStorageCombineSwift " ,
@@ -1399,6 +1402,20 @@ func firestoreWrapperTarget() -> Target {
13991402 )
14001403}
14011404
1405+ func firebaseFirestoreCppTarget( ) -> Target {
1406+ return . target(
1407+ name: " FirebaseFirestoreCpp " ,
1408+ path: " Firestore/core/swift " ,
1409+ sources: [
1410+ " src " ,
1411+ ] ,
1412+ publicHeadersPath: " include " , // Path to the public headers
1413+ cxxSettings: [
1414+ . headerSearchPath( " umbrella " ) , // Ensure the header search path is correct
1415+ ]
1416+ )
1417+ }
1418+
14021419func firestoreTargets( ) -> [ Target ] {
14031420 if ProcessInfo . processInfo. environment [ " FIREBASE_SOURCE_FIRESTORE " ] != nil {
14041421 return [
@@ -1469,13 +1486,15 @@ func firestoreTargets() -> [Target] {
14691486 . linkedLibrary( " c++ " ) ,
14701487 ]
14711488 ) ,
1489+ firebaseFirestoreCppTarget ( ) ,
14721490 . target(
14731491 name: " FirebaseFirestore " ,
14741492 dependencies: [
14751493 " FirebaseCore " ,
14761494 " FirebaseCoreExtension " ,
14771495 " FirebaseFirestoreInternalWrapper " ,
14781496 " FirebaseSharedSwift " ,
1497+ " FirebaseFirestoreCpp " ,
14791498 ] ,
14801499 path: " Firestore " ,
14811500 exclude: [
@@ -1496,7 +1515,10 @@ func firestoreTargets() -> [Target] {
14961515 sources: [
14971516 " Swift/Source/ " ,
14981517 ] ,
1499- resources: [ . process( " Source/Resources/PrivacyInfo.xcprivacy " ) ]
1518+ resources: [ . process( " Source/Resources/PrivacyInfo.xcprivacy " ) ] ,
1519+ swiftSettings: [
1520+ . interoperabilityMode( . Cxx) , // C++ interoperability setting
1521+ ]
15001522 ) ,
15011523 ]
15021524 }
@@ -1542,9 +1564,13 @@ func firestoreTargets() -> [Target] {
15421564 " FirebaseCoreExtension " ,
15431565 " leveldb " ,
15441566 " FirebaseSharedSwift " ,
1567+ " FirebaseFirestoreCpp " ,
15451568 ] ,
15461569 path: " Firestore/Swift/Source " ,
15471570 resources: [ . process( " Resources/PrivacyInfo.xcprivacy " ) ] ,
1571+ swiftSettings: [
1572+ . interoperabilityMode( . Cxx) , // C++ interoperability setting
1573+ ] ,
15481574 linkerSettings: [
15491575 . linkedFramework( " SystemConfiguration " , . when( platforms: [ . iOS, . macOS, . tvOS] ) ) ,
15501576 . linkedFramework( " UIKit " , . when( platforms: [ . iOS, . tvOS] ) ) ,
@@ -1561,5 +1587,6 @@ func firestoreTargets() -> [Target] {
15611587 publicHeadersPath: " . "
15621588 ) ,
15631589 firestoreInternalTarget,
1590+ firebaseFirestoreCppTarget ( ) ,
15641591 ]
15651592}
0 commit comments