From 7c7ac2ed8b3ad101a6beee10a04e5dcb91196e40 Mon Sep 17 00:00:00 2001 From: cherylEnkidu Date: Thu, 24 Oct 2024 14:07:56 -0400 Subject: [PATCH] add extern c --- .../Sources/Public/FirebaseCore/FIRVersion.h | 9 ++++++++ Package.swift | 22 +++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h b/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h index 651edaf5c8b..65a3e764822 100644 --- a/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h +++ b/FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h @@ -19,7 +19,16 @@ NS_ASSUME_NONNULL_BEGIN /** Returns the current version of Firebase. */ + +#ifdef __cplusplus +extern "C" { +#endif + NS_SWIFT_NAME(FirebaseVersion()) NSString* FIRFirebaseVersion(void); +#ifdef __cplusplus +} +#endif + NS_ASSUME_NONNULL_END diff --git a/Package.swift b/Package.swift index cfa9a273a05..ce99a14093a 100644 --- a/Package.swift +++ b/Package.swift @@ -478,7 +478,7 @@ let package = Package( ], path: "FirebaseCombineSwift/Sources/Firestore", swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting + .interoperabilityMode(.Cxx), // C++ interoperability setting ] ), .target( @@ -1176,7 +1176,7 @@ let package = Package( ], path: "SwiftPMTests/swift-test", swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting + .interoperabilityMode(.Cxx), // C++ interoperability setting ] ), .testTarget( @@ -1406,14 +1406,14 @@ func firestoreWrapperTarget() -> Target { } func firebaseFirestoreCppTarget() -> Target { - return .target( - name: "FirebaseFirestoreCpp", - path: "Firestore/core/swift", - publicHeadersPath: "include", // Path to the public headers - cxxSettings: [ - .headerSearchPath("umbrella"), // Ensure the header search path is correct - ] - ) + return .target( + name: "FirebaseFirestoreCpp", + path: "Firestore/core/swift", + publicHeadersPath: "include", // Path to the public headers + cxxSettings: [ + .headerSearchPath("umbrella"), // Ensure the header search path is correct + ] + ) } func firestoreTargets() -> [Target] { @@ -1569,7 +1569,7 @@ func firestoreTargets() -> [Target] { path: "Firestore/Swift/Source", resources: [.process("Resources/PrivacyInfo.xcprivacy")], swiftSettings: [ - .interoperabilityMode(.Cxx), // C++ interoperability setting + .interoperabilityMode(.Cxx), // C++ interoperability setting ], linkerSettings: [ .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),