Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double-quoted include header warnings when using SPM with a ObjC/Swift project #11751

Closed
reggian opened this issue Aug 30, 2023 · 10 comments
Closed

Comments

@reggian
Copy link

reggian commented Aug 30, 2023

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:

  1. Create an ObjC iOS app project
  2. Add firebase as SPM dependency
  3. Add FirebaseAnalyticsWithoutAdIdSupport to app target
  4. 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

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@rizafran
Copy link
Contributor

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?

@reggian
Copy link
Author

reggian commented Sep 4, 2023

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.

@reggian reggian closed this as completed Sep 4, 2023
@reggian reggian changed the title Header warnings when using SPM Double-quoted include header warnings when using SPM with a ObjC/Swift project Sep 26, 2023
@reggian reggian reopened this Sep 26, 2023
@reggian
Copy link
Author

reggian commented Sep 26, 2023

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.

@maztaflex
Copy link

I have same issue.

@ncooke3 ncooke3 self-assigned this Oct 28, 2023
@ncooke3 ncooke3 added this to the Firebase 11 milestone Nov 7, 2023
@paulb777
Copy link
Member

Does this still reproduce in Xcode 15.2?

@reggian
Copy link
Author

reggian commented Jun 6, 2024

I have Xcode 15.4 and it does, yes.

@parrots
Copy link

parrots commented Jun 19, 2024

Reproduces using SPM + Xcode 16 beta 1.
Screenshot 2024-06-18 at 21 21 53

@HugoMartins
Copy link

Same warnings here on my project (ObjC/Swift)
Reproduces using SPM + Xcode 15.4
Using last Firebase SDK version 10.28.1

Capture d’écran 2024-07-05 à 17 41 39

@ncooke3
Copy link
Member

ncooke3 commented Jul 8, 2024

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.

@ncooke3 ncooke3 closed this as completed Jul 8, 2024
@firebase firebase locked and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants