/Users/rmann/Projects/Clients/…/Utils/Notifications/NotificationCoordinator.swift:64:66: error: cannot find 'kFIRMessagingMessageIDKey' in scope
let foo = response.notification.request.content.userInfo[kFIRMessagingMessageIDKey]
Interestingly, Xcode colors it green as a recognized symbol (although it seems overzealous at this sometimes), and if I Command-click it it jumps to the definition in the Obj-C file. However, it would not autocomplete the symbol, and a related symbol that it would autocomplete it neither colors nor can jump to.
The Firebase package has Firebase/FirebaseMessaging/Sources/Public/FirebaseMessaging.h
, which, upon inspection, does not appear to include the Firebase/FirebaseMessaging/SourcesFIRMessagingConstants.h
file in which this symbol is declared.
The target is defined in Package.swift
like this. It's not clear to me if SPM (or even if it should) expose all the symbols it finds anywhere in the package that have appropriate visibility. I think it probably should (since location doesn't dictate that), and if I look at the generated header for the constants file, it does declare it as public
.
.target(
name: "FirebaseMessaging",
dependencies: [
"FirebaseCore",
"FirebaseInstallations",
.product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"),
.product(name: "GULEnvironment", package: "GoogleUtilities"),
.product(name: "GULReachability", package: "GoogleUtilities"),
.product(name: "GULUserDefaults", package: "GoogleUtilities"),
.product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
.product(name: "nanopb", package: "nanopb"),
],
path: "FirebaseMessaging/Sources",
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath("../../"),
.define("PB_FIELD_32BIT", to: "1"),
.define("PB_NO_PACKED_STRUCTS", to: "1"),
.define("PB_ENABLE_MALLOC", to: "1"),
],
linkerSettings: [
.linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),
]
),