Skip to content

Commit

Permalink
add extern c
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylEnkidu committed Oct 24, 2024
1 parent b84f3ec commit 7c7ac2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
9 changes: 9 additions & 0 deletions FirebaseCore/Sources/Public/FirebaseCore/FIRVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 11 additions & 11 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ let package = Package(
],
path: "FirebaseCombineSwift/Sources/Firestore",
swiftSettings: [
.interoperabilityMode(.Cxx), // C++ interoperability setting
.interoperabilityMode(.Cxx), // C++ interoperability setting
]
),
.target(
Expand Down Expand Up @@ -1176,7 +1176,7 @@ let package = Package(
],
path: "SwiftPMTests/swift-test",
swiftSettings: [
.interoperabilityMode(.Cxx), // C++ interoperability setting
.interoperabilityMode(.Cxx), // C++ interoperability setting
]
),
.testTarget(
Expand Down Expand Up @@ -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] {
Expand Down Expand Up @@ -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])),
Expand Down

0 comments on commit 7c7ac2e

Please sign in to comment.