firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Double-quoted include header warnings when using SPM with a ObjC/Swift project
Description
When using Firebase iOS SDK with SPM Xcode emits multiple warnings of improper header definitions:
Double-quoted include "FIRAnalytics+AppDelegate.h" in framework header, expected angle-bracketed instead
Double-quoted include "FIRAnalytics+Consent.h" in framework header, expected angle-bracketed instead
Double-quoted include "FIRAnalytics+OnDevice.h" in framework header, expected angle-bracketed instead
etc.
Reproducing the issue
Unfortunately this is not reproducible every time. The last time what I did was:
- Create an ObjC iOS app project
- Add firebase as SPM dependency
- Add
FirebaseAnalyticsWithoutAdIdSupportto app target - Import the firebase header into the
AppDelegate.m(#import <FirebaseCore/FirebaseCore.h>)
Firebase SDK Version
10.15.0
Xcode Version
15.0
Installation Method
Swift Package Manager
Firebase Product(s)
Analytics
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
{
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
"version" : "1.2022062300.0"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"revision" : "8a8ec57a272e0d31480fb0893dda0cf4f769b57e",
"version" : "10.15.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b",
"version" : "10.13.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "aae45a320fd0d11811820335b1eabc8753902a40",
"version" : "9.2.5"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "c38ce365d77b04a9a300c31061c5227589e5597b",
"version" : "7.11.5"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "f1b366129d1125be7db83247e003fc333104b569",
"version" : "1.50.2"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
"version" : "3.1.1"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
"state" : {
"revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
"version" : "100.0.0"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
"version" : "2.3.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "cf62cdaea48b77f1a631e5cb3aeda6047c2cba1d",
"version" : "1.23.0"
}
}
],
"version" : 2
}
If using CocoaPods, the project's Podfile.lock
No response
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Thanks for reporting, @reggian. I'm unable to reproduce the issue using the iOS quickstart. I also found this related issue though they're using CocoaPods. Could you provide a sample app that reproduces the issue to investigate?
Hey @rizafran, thank you for looking into this. I am sorry to report that there are no more warnings (or rather not sorry for the exact same reason). I have tested and re-tested and re-re-tested, the problem seems to have solved itself automagically. I will close this issue and re-open or create a new one if the problem arises again and I will try to provide a reproducible project.
I have encountered the issue again on my project then managed reproduce it with a simple shared ObjC-Swift project. I have also edited the issue title and description to make it more precise.
I have same issue.
Does this still reproduce in Xcode 15.2?
I have Xcode 15.4 and it does, yes.
Reproduces using SPM + Xcode 16 beta 1.
Same warnings here on my project (ObjC/Swift) Reproduces using SPM + Xcode 15.4 Using last Firebase SDK version 10.28.1
Thanks for the reports everyone. These warnings are safe to suppress and I recommend doing so by going to your target's Build Settings, and adding -Wno-quoted-include-in-framework-header to Other C Flags. CocoaPods will by default add this flag, but that behavior does not happen automatically with SPM or the manual zip integration. Changing the style of imports may have unexpected effects, so suppressing the warning is safer for now.