Skip to content

[firebase_core]: Swift Compiler Error (Xcode): Access level on imports require '-enable-experimental-feature AccessLevelOnImport' #17331

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

Open
1 task done
droplet-js opened this issue May 5, 2025 · 10 comments
Labels
Needs Attention This issue needs maintainer attention. platform: ios Issues / PRs which are specifically for iOS. plugin: core type: bug Something isn't working

Comments

@droplet-js
Copy link

droplet-js commented May 5, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Core

Which platforms are affected?

iOS

Description

Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           15.5s
Failed to build iOS app
Swift Compiler Error (Xcode): Access level on imports require '-enable-experimental-feature AccessLevelOnImport'
/Users/xxx/Library/Developer/Xcode/DerivedData/Runner-azhqzdrddqcttrcqteybyyctfgjw/SourcePackages/checkouts/firebase-ios-sdk/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsPayload.swift:17:2

Reproducing the issue

dependencies:
  firebase_core: ^3.13.0
  firebase_analytics: ^11.4.5
  firebase_crashlytics: ^4.3.5
  firebase_performance: ^0.10.1+5

flutter:
  disable-swift-package-manager: false

Firebase Core version

3.13.0

Flutter Version

3.29.3

Relevant Log Output

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

Package.resolved

{
  "pins" : [
    {
      "identity" : "abseil-cpp-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/abseil-cpp-binary.git",
      "state" : {
        "revision" : "bbe8b69694d7873315fd3a4ad41efe043e1c07c5",
        "version" : "1.2024072200.0"
      }
    },
    {
      "identity" : "app-check",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/app-check.git",
      "state" : {
        "revision" : "61b85103a1aeed8218f17c794687781505fbbef5",
        "version" : "11.2.0"
      }
    },
    {
      "identity" : "csqlite",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/simolus3/CSQLite.git",
      "state" : {
        "revision" : "a8d28afef08ad8faa4ee9ef7845f61c2e8ac5810"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk",
      "state" : {
        "revision" : "fbd463894af94d90eb4d6a4e54080459a8179519",
        "version" : "11.12.0"
      }
    },
    {
      "identity" : "flutterfire",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/flutterfire",
      "state" : {
        "revision" : "a80a123386fd4904cad6938673020a7bcf31b2f2",
        "version" : "3.13.0-firebase-core-swift"
      }
    },
    {
      "identity" : "googleappmeasurement",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleAppMeasurement.git",
      "state" : {
        "revision" : "f7460ea630bddf172115c28493ae8b3798d95ce3",
        "version" : "11.12.0"
      }
    },
    {
      "identity" : "googledatatransport",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleDataTransport.git",
      "state" : {
        "revision" : "617af071af9aa1d6a091d59a202910ac482128f9",
        "version" : "10.1.0"
      }
    },
    {
      "identity" : "googleutilities",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleUtilities.git",
      "state" : {
        "revision" : "60da361632d0de02786f709bdc0c4df340f7613e",
        "version" : "8.1.0"
      }
    },
    {
      "identity" : "grpc-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/grpc-binary.git",
      "state" : {
        "revision" : "cc0001a0cf963aa40501d9c2b181e7fc9fd8ec71",
        "version" : "1.69.0"
      }
    },
    {
      "identity" : "gtm-session-fetcher",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/gtm-session-fetcher.git",
      "state" : {
        "revision" : "4d70340d55d7d07cc2fdf8e8125c4c126c1d5f35",
        "version" : "4.4.0"
      }
    },
    {
      "identity" : "interop-ios-for-google-sdks",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/interop-ios-for-google-sdks.git",
      "state" : {
        "revision" : "040d087ac2267d2ddd4cca36c757d1c6a05fdbfe",
        "version" : "101.0.0"
      }
    },
    {
      "identity" : "leveldb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/leveldb.git",
      "state" : {
        "revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
        "version" : "1.22.5"
      }
    },
    {
      "identity" : "nanopb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/nanopb.git",
      "state" : {
        "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
        "version" : "2.30910.0"
      }
    },
    {
      "identity" : "promises",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/promises.git",
      "state" : {
        "revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
        "version" : "2.4.0"
      }
    },
    {
      "identity" : "swift-protobuf",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/apple/swift-protobuf.git",
      "state" : {
        "revision" : "d72aed98f8253ec1aa9ea1141e28150f408cf17f",
        "version" : "1.29.0"
      }
    }
  ],
  "version" : 2
}

No response

@droplet-js droplet-js added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels May 5, 2025
@AngeloAvv
Copy link

I have the same issue here. It came out of nowhere, as I haven't updated the pubspec.lock since January.

It may be related to a transitive native dependency

@MichaelVerdon MichaelVerdon added plugin: core platform: ios Issues / PRs which are specifically for iOS. labels May 7, 2025
@MichaelVerdon
Copy link
Contributor

Hi there, can you show me your podfile please, I suspect this is related to what versions of iOS you are targetting. We had this issue with CI albeit with MacOS version and we fixed it by making it target a more recent version.

@MichaelVerdon MichaelVerdon added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels May 7, 2025
@droplet-js
Copy link
Author

Hi there, can you show me your podfile please, I suspect this is related to what versions of iOS you are targetting. We had this issue with CI albeit with MacOS version and we fixed it by making it target a more recent version.

my app work with swift package manager, no podfile.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels May 7, 2025
@MichaelVerdon
Copy link
Contributor

Hi there, can you show me your podfile please, I suspect this is related to what versions of iOS you are targetting. We had this issue with CI albeit with MacOS version and we fixed it by making it target a more recent version.

my app work with swift package manager, no podfile.

Hi there, apologies I meant to share what versions of iOS you are targeting in your XCode workspace.

@MichaelVerdon MichaelVerdon added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels May 7, 2025
@AngeloAvv
Copy link

In my case, both Minimum Deployments and IPHONEOS_DEPLOYMENT_TARGET are 15.6 (the minimum available version in the latest versions of XCode)

@droplet-js
Copy link
Author

Hi there, can you show me your podfile please, I suspect this is related to what versions of iOS you are targetting. We had this issue with CI albeit with MacOS version and we fixed it by making it target a more recent version.

my app work with swift package manager, no podfile.

Hi there, apologies I meant to share what versions of iOS you are targeting in your XCode workspace.

In my case, both Minimum Deployments and IPHONEOS_DEPLOYMENT_TARGET are 13.0

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels May 8, 2025
@SelaseKay
Copy link
Contributor

Hi @droplet-js, it looks like this issue might be related to Xcode versions, as noted in this comment. Could you let us know which version of Xcode you're using?

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels May 8, 2025
@AngeloAvv
Copy link

Hey @SelaseKay , in my case, I'm using macos-latest on GitHub Actions. The same error does not occur on my machine with XCode 16.2

@AngeloAvv
Copy link

@SelaseKay I now realize macos-latest on GHA is not using macOS 15 (as I wrongly thought) but macOS 14 instead. Migrating to macos-15 image fixed the issue.

@bluefin939
Copy link

@AngeloAvv I faced the same issue and I updated both OS and xcode as suggested. After the update the issue got fixed. My xcode version was 15.4 updated to 16.3 and os version was 14.3 updated to 15.5. Thanks!

@MichaelVerdon MichaelVerdon added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: ios Issues / PRs which are specifically for iOS. plugin: core type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants