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

Compiling for visionOS doesn't seem to work #12004

Closed
orj opened this issue Oct 26, 2023 · 3 comments
Closed

Compiling for visionOS doesn't seem to work #12004

orj opened this issue Oct 26, 2023 · 3 comments

Comments

@orj
Copy link

orj commented Oct 26, 2023

Description

I've got an iOS project I'm trying to port to visionOS and I'm having a lot of trouble with getting Firebase to build.

I've loaded the project/workspace using this script:

#!/usr/bin/env bash

export DEVELOPER_DIR=/Applications/Xcode-15.1.0-Beta.app/Contents/Developer 
xcrun open --env FIREBASE_SOURCE_FIRESTORE Application.xcworkspace

My Firebase SPM dependency is:

.package(url: "https://github.com/firebase/firebase-ios-sdk.git", from: "10.16.0"),

This is pulling in GoogleUtilities 7.11.5 which fails to compile with the following error:

/Users/oliver/Library/Developer/Xcode/DerivedData/Application-errgluedoshurqdjqzddegzdkaqr/SourcePackages/checkouts/GoogleUtilities/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m:265:15: error: use of undeclared identifier 'UIDevice'
    switch ([[UIDevice currentDevice] userInterfaceIdiom]) {
              ^
/Users/oliver/Library/Developer/Xcode/DerivedData/Application-errgluedoshurqdjqzddegzdkaqr/SourcePackages/checkouts/GoogleUtilities/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m:266:12: error: use of undeclared identifier 'UIUserInterfaceIdiomPhone'
      case UIUserInterfaceIdiomPhone:
           ^
/Users/oliver/Library/Developer/Xcode/DerivedData/Application-errgluedoshurqdjqzddegzdkaqr/SourcePackages/checkouts/GoogleUtilities/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m:269:12: error: use of undeclared identifier 'UIUserInterfaceIdiomPad'
      case UIUserInterfaceIdiomPad:
           ^
3 errors generated.

There seems to be commits on main for GoogleUtilities (google/GoogleUtilities@4780d5c)
that address this.

I tried switching to using Firebase as a local SPM (by cloning the repo) and updating the dependency on GoogleUtilities to use main but then I just encountered loads more issues with other parts of Firebase failing to compile for visionOS.

Reproducing the issue

Try and compile for visionOS using Xcode 15.1 Beta (Version 15.1 beta (15C5028h)).

Firebase SDK Version

10.16

Xcode Version

Version 15.1 beta (15C5028h)

Installation Method

Swift Package Manager

Firebase Product(s)

Analytics, App Check, Authentication, Crashlytics, Firestore, Functions, Remote Config

Targeted Platforms

visionOS

Relevant Log Output

No response

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

Expand Package.resolved snippet
{
  "pins" : [
    {
      "identity" : "abseil-cpp-swiftpm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/abseil-cpp-SwiftPM.git",
      "state" : {
        "revision" : "06e7506b74bfc47c70f3353e2927ea3e2275230c",
        "version" : "0.20220623.1"
      }
    },
    {
      "identity" : "boringssl-swiftpm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/boringssl-SwiftPM.git",
      "state" : {
        "revision" : "dd3eda2b05a3f459fc3073695ad1b28659066eab",
        "version" : "0.9.1"
      }
    },
    {
      "identity" : "bottomsheet",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/ittybittyapps/BottomSheet.git",
      "state" : {
        "branch" : "main",
        "revision" : "38b44121ebcd8482fe7f36f49fcf5e7eab26f7e0"
      }
    },
    {
      "identity" : "combineexpectations",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/groue/CombineExpectations",
      "state" : {
        "revision" : "04d4e4b21c9e8361925f03f64a7ecda89ef9974f",
        "version" : "0.10.0"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk.git",
      "state" : {
        "revision" : "837d4af6ead57cec1fc38007892500d3139c7556",
        "version" : "10.16.0"
      }
    },
    {
      "identity" : "googleappmeasurement",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleAppMeasurement.git",
      "state" : {
        "revision" : "56f681586ff006a7982b53dc94082eea31971acf",
        "version" : "10.16.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-ios",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/grpc/grpc-ios.git",
      "state" : {
        "revision" : "9a2e905b368afd590c91be4b32d55e6205467835",
        "version" : "1.49.1"
      }
    },
    {
      "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" : "lottie-ios",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/airbnb/lottie-ios.git",
      "state" : {
        "revision" : "45517c3cfec9469bbdd4f86e32393c28ae9df0bc",
        "version" : "4.3.3"
      }
    },
    {
      "identity" : "nanopb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/nanopb.git",
      "state" : {
        "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
        "version" : "2.30909.0"
      }
    },
    {
      "identity" : "nuke",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/kean/Nuke.git",
      "state" : {
        "revision" : "3f666f120b63ea7de57d42e9a7c9b47f8e7a290b",
        "version" : "12.1.6"
      }
    },
    {
      "identity" : "promises",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/promises.git",
      "state" : {
        "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
        "version" : "2.3.1"
      }
    },
    {
      "identity" : "purchases-ios",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/RevenueCat/purchases-ios.git",
      "state" : {
        "revision" : "d50a261eeb8a635c5927670f223971e13a34a926",
        "version" : "4.28.1"
      }
    },
    {
      "identity" : "swift-case-paths",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/pointfreeco/swift-case-paths",
      "state" : {
        "revision" : "5da6989aae464f324eef5c5b52bdb7974725ab81",
        "version" : "1.0.0"
      }
    },
    {
      "identity" : "swift-protobuf",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/apple/swift-protobuf.git",
      "state" : {
        "revision" : "3c54ab05249f59f2c6641dd2920b8358ea9ed127",
        "version" : "1.24.0"
      }
    },
    {
      "identity" : "swiftui-introspect",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/siteline/SwiftUI-Introspect.git",
      "state" : {
        "revision" : "3ced72fccb284235c266c1e8a32f1bf93129fc74",
        "version" : "1.1.0"
      }
    },
    {
      "identity" : "xctest-dynamic-overlay",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
      "state" : {
        "revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
        "version" : "1.0.2"
      }
    }
  ],
  "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.

@Pascal2807
Copy link

Unfortunately, I am dealing with the same issue. I was not able to solve it in the last hours.

@paulb777
Copy link
Member

This is a duplicate of #11890 and will be resolved in Firebase 10.17.0, due out the week of October 30th.

In the meantime the workaround is to use Xcode 15.0.*.

@paulb777 paulb777 added this to the 10.17.0 - M139 milestone Oct 26, 2023
@firebase firebase locked and limited conversation to collaborators Nov 26, 2023
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

5 participants