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

No such module 'Promises' when building for testing on Xcode 15.0-beta5 #11656

Closed
pgorrindo opened this issue Aug 7, 2023 · 18 comments · Fixed by #11815
Closed

No such module 'Promises' when building for testing on Xcode 15.0-beta5 #11656

pgorrindo opened this issue Aug 7, 2023 · 18 comments · Fixed by #11815
Assignees

Comments

@pgorrindo
Copy link

pgorrindo commented Aug 7, 2023

Description

We have been using the Firebase iOS SDK for some time in our iOS project. In looking to start using Xcode 15 exclusively, when using current versions of everything (specified below), we see the following issue, using the same Xcode project file:

  1. In Xcode 14.3.1, Build for Running -> builds ok
  2. In Xcode 14.3.1, Build for Testing -> builds ok
  3. In Xcode 15.0-beta5, Build for Running -> builds ok
  4. In Xcode 15.0-beta5, Build for Testing -> fails to build with the following error:

No such module 'Promises in FirebaseSessions at line 21: @_implementationOnly import Promises

We've tried adding the -ld64 other linker flag, cleaning the build and Derived Data folders, as well as removing and re-adding the Firebase package.

Screenshot:
258692003-2f3f88ad-7aaf-4b57-aec7-2cbd7b42982d

Reproducing the issue

No response

Firebase SDK Version

10.13.0

Xcode Version

15.0 beta 5 (15A5209g)

Installation Method

Swift Package Manager

Firebase Product(s)

All

Targeted Platforms

iOS

Relevant Log Output

No response

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

Expand Package.resolved snippet
{
  "object": {
    "pins": [
      {
        "package": "abseil",
        "repositoryURL": "https://github.com/google/abseil-cpp-binary.git",
        "state": {
          "branch": null,
          "revision": "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
          "version": "1.2022062300.0"
        }
      },
      {
        "package": "Diagnostics",
        "repositoryURL": "https://github.com/WeTransfer/Diagnostics.git",
        "state": {
          "branch": null,
          "revision": "c3816d37ff6993b7de46aff3370354c4cadca7c8",
          "version": "4.5.0"
        }
      },
      {
        "package": "ExceptionCatcher",
        "repositoryURL": "https://github.com/sindresorhus/ExceptionCatcher",
        "state": {
          "branch": null,
          "revision": "a7acaf40f8bd67a1f3a05a14de5b6a861ac3d1ac",
          "version": "2.0.1"
        }
      },
      {
        "package": "Firebase",
        "repositoryURL": "https://github.com/firebase/firebase-ios-sdk",
        "state": {
          "branch": null,
          "revision": "df2171b0c6afb9e9d4f7e07669d558c510b9f6be",
          "version": "10.13.0"
        }
      },
      {
        "package": "GoogleAppMeasurement",
        "repositoryURL": "https://github.com/google/GoogleAppMeasurement.git",
        "state": {
          "branch": null,
          "revision": "03b9beee1a61f62d32c521e172e192a1663a5e8b",
          "version": "10.13.0"
        }
      },
      {
        "package": "GoogleDataTransport",
        "repositoryURL": "https://github.com/google/GoogleDataTransport.git",
        "state": {
          "branch": null,
          "revision": "aae45a320fd0d11811820335b1eabc8753902a40",
          "version": "9.2.5"
        }
      },
      {
        "package": "GoogleUtilities",
        "repositoryURL": "https://github.com/google/GoogleUtilities.git",
        "state": {
          "branch": null,
          "revision": "c38ce365d77b04a9a300c31061c5227589e5597b",
          "version": "7.11.5"
        }
      },
      {
        "package": "gRPC",
        "repositoryURL": "https://github.com/google/grpc-binary.git",
        "state": {
          "branch": null,
          "revision": "f1b366129d1125be7db83247e003fc333104b569",
          "version": "1.50.2"
        }
      },
      {
        "package": "GTMSessionFetcher",
        "repositoryURL": "https://github.com/google/gtm-session-fetcher.git",
        "state": {
          "branch": null,
          "revision": "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
          "version": "3.1.1"
        }
      },
      {
        "package": "Kingfisher",
        "repositoryURL": "https://github.com/onevcat/Kingfisher.git",
        "state": {
          "branch": null,
          "revision": "c75584ac759cbb16b204d0a7de3ebf53ea6b304d",
          "version": "7.9.0"
        }
      },
      {
        "package": "leveldb",
        "repositoryURL": "https://github.com/firebase/leveldb.git",
        "state": {
          "branch": null,
          "revision": "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
          "version": "1.22.2"
        }
      },
      {
        "package": "nanopb",
        "repositoryURL": "https://github.com/firebase/nanopb.git",
        "state": {
          "branch": null,
          "revision": "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
          "version": "2.30909.0"
        }
      },
      {
        "package": "Promises",
        "repositoryURL": "https://github.com/google/promises.git",
        "state": {
          "branch": null,
          "revision": "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
          "version": "2.3.1"
        }
      },
      {
        "package": "RevenueCat",
        "repositoryURL": "https://github.com/RevenueCat/purchases-ios.git",
        "state": {
          "branch": null,
          "revision": "f2f5314fa92d3556fe23e857b34eeed13934c6fb",
          "version": "4.25.2"
        }
      },
      {
        "package": "SFSafeSymbols",
        "repositoryURL": "https://github.com/SFSafeSymbols/SFSafeSymbols",
        "state": {
          "branch": null,
          "revision": "7cca2d60925876b5953a2cf7341cd80fbeac983c",
          "version": "4.1.1"
        }
      },
      {
        "package": "swift-log",
        "repositoryURL": "https://github.com/apple/swift-log.git",
        "state": {
          "branch": null,
          "revision": "32e8d724467f8fe623624570367e3d50c5638e46",
          "version": "1.5.2"
        }
      },
      {
        "package": "SwiftProtobuf",
        "repositoryURL": "https://github.com/apple/swift-protobuf.git",
        "state": {
          "branch": null,
          "revision": "ce20dc083ee485524b802669890291c0d8090170",
          "version": "1.22.1"
        }
      },
      {
        "package": "swiftui-introspect",
        "repositoryURL": "https://github.com/siteline/SwiftUI-Introspect.git",
        "state": {
          "branch": "master",
          "revision": "e93995cb75170a18113ddf1e3cf0d0668c33c8b2",
          "version": null
        }
      },
      {
        "package": "SwiftUIX",
        "repositoryURL": "https://github.com/SwiftUIX/SwiftUIX",
        "state": {
          "branch": null,
          "revision": "75d5be2c85ec1e3ccbd9d99d321dd3abb5955e8d",
          "version": "0.1.6"
        }
      }
    ]
  },
  "version": 1
}

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 sessions Changes pertaining to the Firebase Sessions SDK Xcode 15 - iOS 17 and removed needs-triage labels Aug 7, 2023
@paulb777
Copy link
Member

paulb777 commented Aug 7, 2023

@pgorrindo Thanks for the report. Would you check if File -> Packages -> Reset Package Caches makes a difference?

@pgorrindo
Copy link
Author

thanks @paulb777 -- tried reseting package caches, same result as originally described.

@paulb777
Copy link
Member

paulb777 commented Aug 7, 2023

Hmm, we may need a reproducible example, since I'm able to successfully build Sessions for testing in beta 5.

@pgorrindo
Copy link
Author

Here is a reproducible example @paulb777 -- https://github.com/whforward/promises-debugging -- a fresh new Xcode project created with Xcode 15-beta5, bringing in only the current 10.13.0 version of the Firebase SDK, and I get the results as described above.

Greatly appreciate any insight you might have here.

@paulb777
Copy link
Member

paulb777 commented Aug 7, 2023

Thanks! I've reproduced and I'm investigating ....

@paulb777
Copy link
Member

paulb777 commented Aug 7, 2023

I've reduced the test case to determine it's sufficient to have only FirebasePerformance and FirebaseCrashlytics as dependencies of the test target. Removing one of them is sufficient to build successfully.

We might want to do a bit more investigation, but my current thought is that this is an Xcode build system bug.

A workaround may be to remove one of those two dependencies if you don't need to depend on both in the test target.

Screenshot 2023-08-07 at 2 39 38 PM

@pgorrindo
Copy link
Author

Thanks @paulb777 -- ok, this is what I've found:

recapitulate FirebaseCrashlytics + FirebasePerformance

If I whittle down to just those two, I can reproduce what you see -- Promises error if both Crashlytics and Performance are present:

Screenshot 2023-08-07 at 15 31 03

and then by removing Performance, it builds:
Screenshot 2023-08-07 at 15 33 52

removing FirebasePerformance alone is insufficient

but if I add everything back, and only remove FirebasePerformance, then I get a new error, about undefined symbols in FirebaseFirestoreSwift:

Screenshot 2023-08-07 at 15 36 31 Screenshot 2023-08-07 at 15 36 55

ultimately need to remove all Firestore, and FirebasePerformance

to get past the undefined symbols error, I needed to remove all three Firestore dependencies, and FirebasePerformance, to get be able to successfully Build for Running and Build for Testing:

Screenshot 2023-08-07 at 15 45 01 Screenshot 2023-08-07 at 15 51 51

Thoughts?

You are correct, Paul, that we don't need all of those dependencies for the test target. But we do need Firestore, unfortunately. Thoughts?

@paulb777
Copy link
Member

paulb777 commented Aug 7, 2023

Yes, I can reproduce with only FirebaseFirestoreSwift as a dependency of the test target:

ld: Undefined symbols:
  grpc::ClientContext::AddMetadata(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&), referenced from:
      firebase::firestore::remote::FirebaseMetadataProviderApple::UpdateMetadata(grpc::ClientContext&) in FirebaseFirestore[x86_64][74](firebase_metadata_provider_apple.o)
      firebase::firestore::remote::FirebaseMetadataProviderApple::UpdateMetadata(grpc::ClientContext&) in FirebaseFirestore[x86_64][74](firebase_metadata_provider_apple.o)
      firebase::firestore::remote::FirebaseMetadataProviderApple::UpdateMetadata(grpc::ClientContext&) in FirebaseFirestore[x86_64][74](firebase_metadata_provider_apple.o)
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      ...
  grpc::ClientContext::TryCancel(), referenced from:
      firebase::firestore::remote::GrpcStream::Shutdown() in FirebaseFirestore[x86_64][109](grpc_stream.o)
      firebase::firestore::remote::GrpcUnaryCall::Shutdown() in FirebaseFirestore[x86_64][111](grpc_unary_call.o)
  grpc::ClientContext::ClientContext(), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::ClientContext::~ClientContext(), referenced from:
      std::__1::unique_ptr<grpc::ClientContext, std::__1::default_delete<grpc::ClientContext>>::~unique_ptr() in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateStream(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, firebase::firestore::remote::GrpcStreamObserver*) in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateStream(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, firebase::firestore::remote::GrpcStreamObserver*) in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateStream(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, firebase::firestore::remote::GrpcStreamObserver*) in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateUnaryCall(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, grpc::ByteBuffer const&) in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateUnaryCall(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, grpc::ByteBuffer const&) in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateUnaryCall(absl::lts_20220623::string_view, firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, grpc::ByteBuffer const&) in FirebaseFirestore[x86_64][105](grpc_connection.o)
      ...
  grpc::SslCredentials(grpc::SslCredentialsOptions const&), referenced from:
      firebase::firestore::remote::(anonymous namespace)::CreateSslCredentials(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec), referenced from:
      firebase::firestore::remote::Datastore::PollGrpcQueue() in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::PollGrpcQueue() in FirebaseFirestore[x86_64][35](datastore.o)
  grpc::CompletionQueue::Shutdown(), referenced from:
      firebase::firestore::remote::Datastore::Shutdown() in FirebaseFirestore[x86_64][35](datastore.o)
  grpc::ChannelArguments::SetSslTargetNameOverride(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::ChannelArguments::SetInt(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::ChannelArguments::ChannelArguments(), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::ChannelArguments::~ChannelArguments(), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::CreateCustomChannel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<grpc::ChannelCredentials> const&, grpc::ChannelArguments const&), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::g_core_codegen_interface, referenced from:
      firebase::firestore::remote::Datastore::PollGrpcQueue() in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::CommitMutationsWithCredentials(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<firebase::firestore::model::Mutation, std::__1::allocator<firebase::firestore::model::Mutation>> const&, std::__1::function<void (firebase::firestore::util::Status const&)>&&) in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::CommitMutationsWithCredentials(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<firebase::firestore::model::Mutation, std::__1::allocator<firebase::firestore::model::Mutation>> const&, std::__1::function<void (firebase::firestore::util::Status const&)>&&) in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::LookupDocumentsWithCredentials(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<firebase::firestore::model::DocumentKey, std::__1::allocator<firebase::firestore::model::DocumentKey>> const&, std::__1::function<void (firebase::firestore::util::StatusOr<std::__1::vector<firebase::firestore::model::Document, std::__1::allocator<firebase::firestore::model::Document>>> const&)>&&) in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::LookupDocumentsWithCredentials(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<firebase::firestore::model::DocumentKey, std::__1::allocator<firebase::firestore::model::DocumentKey>> const&, std::__1::function<void (firebase::firestore::util::StatusOr<std::__1::vector<firebase::firestore::model::Document, std::__1::allocator<firebase::firestore::model::Document>>> const&)>&&) in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::RunAggregateQueryWithCredentials(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, firebase::firestore::core::Query const&, std::__1::vector<firebase::firestore::model::AggregateField, std::__1::allocator<firebase::firestore::model::AggregateField>> const&, std::__1::function<void (firebase::firestore::util::StatusOr<firebase::firestore::model::ObjectValue> const&)>&&) in FirebaseFirestore[x86_64][35](datastore.o)
      firebase::firestore::remote::Datastore::RunAggregateQueryWithCredentials(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, firebase::firestore::core::Query const&, std::__1::vector<firebase::firestore::model::AggregateField, std::__1::allocator<firebase::firestore::model::AggregateField>> const&, std::__1::function<void (firebase::firestore::util::StatusOr<firebase::firestore::model::ObjectValue> const&)>&&) in FirebaseFirestore[x86_64][35](datastore.o)
      ...
  grpc::InsecureChannelCredentials(), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateChannel() const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::Status::OK, referenced from:
      grpc::SerializationTraits<grpc::ByteBuffer, void>::Deserialize(grpc::ByteBuffer*, grpc::ByteBuffer*) in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::g_glip, referenced from:
      grpc::GrpcLibraryCodegen::GrpcLibraryCodegen(bool) in FirebaseFirestore[x86_64][35](datastore.o)
      grpc::GrpcLibraryCodegen::~GrpcLibraryCodegen() in FirebaseFirestore[x86_64][35](datastore.o)
  grpc::Channel::GetState(bool), referenced from:
      firebase::firestore::remote::GrpcConnection::EnsureActiveStub() in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::Version(), referenced from:
      firebase::firestore::remote::GrpcConnection::CreateContext(firebase::firestore::credentials::AuthToken const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in FirebaseFirestore[x86_64][105](grpc_connection.o)
  grpc::ByteBuffer::Dump(std::__1::vector<grpc::Slice, std::__1::allocator<grpc::Slice>>*) const, referenced from:
      firebase::firestore::remote::ByteBufferReader::ByteBufferReader(grpc::ByteBuffer const&) in FirebaseFirestore[x86_64][106](grpc_nanopb.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@paulb777
Copy link
Member

paulb777 commented Aug 7, 2023

Seems to be some sort of C++ symbol or linkage problem. I'm not sure why it only shows up in the test target. @ncooke3 any ideas?

@paulb777
Copy link
Member

Beta 6 makes no difference on the Firestore grpc linkage problem.

@ncooke3
Copy link
Member

ncooke3 commented Aug 14, 2023

Hi @pgorrindo, I unfortunately don't have any advice to work around this issue at this time. We'll keep this open to verify against the issue against future betas.

@pgorrindo
Copy link
Author

Hi @pgorrindo, I unfortunately don't have any advice to work around this issue at this time. We'll keep this open to verify against the issue against future betas.

bummer, ok thanks for the update @ncooke3

CC @andrewsexcellent

@pgorrindo
Copy link
Author

Beta 6 makes no difference on the Firestore grpc linkage problem.

Same with Xcode 15 Betas 7 and 8, and Firebase v10.14.0 -- the problem persists.

@pgorrindo
Copy link
Author

Same with Xcode 15 Release Candidate, and Firebase v10.15.0 -- the problem persists in the minimal reproducible example previously noted. Trying -ld64 or -ld_classic as other linker flags doesn't fix the issue either. Any other thoughts @ncooke3 or @paulb777 ? CC @andrewsexcellent

Screenshot 2023-09-12 at 21 22 22
@paulb777
Copy link
Member

Yep. I still see the C++ linkage issue from Firestore with the Xcode 15 RC. The original issue reported here of not being able to add both Crashlytics and Performance to the test target has been addressed.

I suspect something about the Xcode 14 generated binary for Firestore may be missing something needed by Xcode 15. We'll continue to investigate.

@ncooke3
Copy link
Member

ncooke3 commented Sep 18, 2023

Hi @pgorrindo, we identified a fix for the undefined symbols errors. The fix should go out in the next release.

Until then, I have a manual workaround that can help unblock your workflow.

  1. Find the Process FirebaseFirestore.xcframework step in a build log from your project. This should appear whenever building a target that depends on Firestore.
Screenshot 2023-09-18 at 1 08 55 PM
  1. Copy the path of the xcframework being processed. In my case, it's the following path from the above image:
/Users/nickcooke/Library/Developer/Xcode/DerivedData/testApp1-gplcekzwfpjbfyendznnuavepyqs/SourcePackages/artifacts/firebase-ios-sdk/FirebaseFirestore/FirebaseFirestore.xcframework
  1. The FirebaseFirestore.xcframework contains a directory for each supported architecture slice. Within each slice is a FirebaseFirestore.framework. For each of the architectures you build for, find the module.modulemap within the architecture's corresponding FirebaseFirestore.framework.

    For me, the module.modulemap used when building your repro project is here:

     /Users/nickcooke/Library/Developer/Xcode/DerivedData/testApp1-gplcekzwfpjbfyendznnuavepyqs/SourcePackages/artifacts/firebase-ios-sdk/FirebaseFirestore/FirebaseFirestore.xcframework/ios-arm64_x86_64-simulator/FirebaseFirestore.framework/Modules/module.modulemap 
    

    Then, open the module.modulemap in a text , vim, etc. and it should look like:

    framework module FirebaseFirestore {
    umbrella header "FirebaseFirestore-umbrella.h"
    export *
    module * { export * }
      link framework "Foundation"
      link framework "Security"
      link framework "SystemConfiguration"
      link framework "UIKit"
      link "c++"
      link "z"
    }

    Link in BoringSSL-GRPC, gRPC-Core, and gRPC-C++ so it looks like this:

    framework module FirebaseFirestore {
    umbrella header "FirebaseFirestore-umbrella.h"
    export *
    module * { export * }
      link framework "BoringSSL-GRPC"
      link framework "gRPC-Core"
      link framework "gRPC-C++"
      link framework "Foundation"
      link framework "Security"
      link framework "SystemConfiguration"
      link framework "UIKit"
      link "c++"
      link "z"
    }
  2. Repeat this last step for each of the architectures you wish to build for.

  3. Try building your target again, and it should work with the locally modified artifact.

You will need to repeat these steps if the DerivedData directory is deleted, or if you re-add Firebase via SPM.

Let me know if you have any trouble.

@paulb777 paulb777 added this to the 10.16.0 - M138 milestone Sep 18, 2023
@pgorrindo
Copy link
Author

woohoo, thanks @ncooke3 and @paulb777 !! 🎉

@firebase firebase locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
5 participants