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

Adding FirebaseAnalytics or FirebaseCrashlytics breaks SwiftUI previews on macOS Sequoia in Xcode 16 due to missing slice for arm64e #14134

Open
tnymlr opened this issue Nov 16, 2024 · 11 comments
Labels
SwiftUI Issues directly related to Apple's SwiftUI framework Xcode 16 - iOS 18

Comments

@tnymlr
Copy link

tnymlr commented Nov 16, 2024

Description

After adding FirebaseAnalytics and/or FirebaseCrashlytics as a dependency using SwiftPM on MacOS Sequoia (exact version I'm running is 15.1) in Xcode 16 into an empty, newly create project, SwiftUI previews stop working due to missing slice for arm64e-apple-macosx21.1 architecture

Reproducing the issue

  • Create new macOS app and choose it to be SwiftUI app.
  • Navigate to Package Dependencies
  • Add Firebase using https://github.com/firebase/firebase-ios-sdk.git
  • Check FirebaseAnalytics and/or FirebaseCrashlytics in the list of available packages to add to your target
  • Open generated from the template ContentView and make sure canvas is enabled

Kindly find the project attached.

TestApp.zip

Firebase SDK Version

11.5

Xcode Version

Version 16.1 (16B40)

Installation Method

Swift Package Manager

Firebase Product(s)

Analytics, Crashlytics

Targeted Platforms

macOS

Relevant Log Output

|  |  |  XOJITError: Universal binary /Users/{redacted}/Library/Developer/Xcode/DerivedData/TestApp-etnuldzjfdocfhdtljvfpgieuccp/Build/Products/Debug/FirebaseAnalytics.framework/FirebaseAnalytics does not contain a slice for arm64e-apple-macosx21.1

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
{
  "originHash" : "a1569f9895aa2be8e24832f98525d5da4eb90b5d158a82691c15b47eb72a13d7",
  "pins" : [
    {
      "identity" : "abseil-cpp-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/abseil-cpp-binary.git",
      "state" : {
        "revision" : "194a6706acbd25e4ef639bcaddea16e8758a3e27",
        "version" : "1.2024011602.0"
      }
    },
    {
      "identity" : "app-check",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/app-check.git",
      "state" : {
        "revision" : "61b85103a1aeed8218f17c794687781505fbbef5",
        "version" : "11.2.0"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk.git",
      "state" : {
        "revision" : "dbdfdc44bee8b8e4eaa5ec27eb12b9338f3f2bc1",
        "version" : "11.5.0"
      }
    },
    {
      "identity" : "googleappmeasurement",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleAppMeasurement.git",
      "state" : {
        "revision" : "4f234bcbdae841d7015258fbbf8e7743a39b8200",
        "version" : "11.4.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" : "53156c7ec267db846e6b64c9f4c4e31ba4cf75eb",
        "version" : "8.0.2"
      }
    },
    {
      "identity" : "grpc-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/grpc-binary.git",
      "state" : {
        "revision" : "f56d8fc3162de9a498377c7b6cea43431f4f5083",
        "version" : "1.65.1"
      }
    },
    {
      "identity" : "gtm-session-fetcher",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/gtm-session-fetcher.git",
      "state" : {
        "revision" : "5cfe5f090c982de9c58605d2a82a4fc77b774fbd",
        "version" : "4.1.0"
      }
    },
    {
      "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" : "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" : "ebc7251dd5b37f627c93698e4374084d98409633",
        "version" : "1.28.2"
      }
    }
  ],
  "version" : 3
}

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@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 rizafran added SwiftUI Issues directly related to Apple's SwiftUI framework and removed needs-triage labels Nov 18, 2024
@rizafran
Copy link
Contributor

Thanks for reporting, @tnymlr. This seems related to #13603. I was able to reproduce the issue but the issue disappeared when I tried to disable the Legacy Previews Execution in Editor -> Canvas. Could you try if this works for you?

@tnymlr
Copy link
Author

tnymlr commented Nov 18, 2024

@rizafran Indeed, it is related, I believe the root cause is the same. And yes, the setting does solve the problem.

@rizafran
Copy link
Contributor

Thanks for the update, @tnymlr. I'm glad to hear that the issue has been resolved. I'll now be closing this ticket but feel free to comment if you encounter the issue again or if you have other questions.

@tristan-warner-smith
Copy link

Can we reopen this one @rizafran ? Relying on Legacy Preview mode isn't an option for us.

@paulb777
Copy link
Member

I suspect that like #13603, this is an Apple issue, but I'll reopen for additional analysis and thumbs-ups.

@vade
Copy link

vade commented Dec 13, 2024

fwiw, issue persists in macOS 15.2 with Xcode 16.2

@ncooke3
Copy link
Member

ncooke3 commented Dec 13, 2024

Thanks, @vade. I will update my feedback ticket. It appears there was a previews fix that went into Xcode 16.1, but it didn't resolve the issue this thread is documenting.

@vade
Copy link

vade commented Dec 13, 2024

Good luck haha. I think we're all gonna need it.

@paulb777
Copy link
Member

Hmm, I'm able to successfully preview the attached TestApp with Xcode 16.2 on macOS 14.7.1. Perhaps this is a macOS 15 only issue?

@paulb777
Copy link
Member

Is changing the Deployment Target a workaround?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwiftUI Issues directly related to Apple's SwiftUI framework Xcode 16 - iOS 18
Projects
None yet
Development

No branches or pull requests

7 participants