firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.73k stars 3.98k forks source link

[firebase_core]: SPM usage fails to find firebase_sdk_version.rb #13726

Closed kuhnroyal closed 3 weeks ago

kuhnroyal commented 3 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Core

Which platforms are affected?

iOS

Description

When trying to use the firebase_core package with SPM, the firebase_sdk_version.rb file does not get correctly resolved.

This is probably coming from this line: https://github.com/firebase/flutterfire/blob/main/packages/firebase_core/firebase_core/ios/firebase_core/Package.swift#L44

@russellwheatley The current path construction looks like it only works when run from inside this repo/example?

Reproducing the issue

Firebase Core version

3.6.0

Flutter Version

3.27.0-0.1.pre

Relevant Log Output

xcodebuild: error: Could not resolve package dependencies:
  <unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'main/Package.swift:75: Fatal error: Failed to load configuration: fileNotFound("Error loading or parsing
  firebase_sdk_version.rb: Error Domain=NSCocoaErrorDomain Code=260 \"The file “firebase_sdk_version.rb” couldn’t be opened because there is no such file.\"
  UserInfo={NSFilePath=/Users/USER/.pub-cache/hosted/pub.dev/firebase_core-3.6.0/ios/firebase_core/../../../firebase_core/ios/firebase_sdk_version.rb, NSUnderlyingError=0x60000239c000 {Error Domain=NSPOSIXErrorDomain Code=2
  \"No such file or directory\"}}")

### Flutter dependencies

<!--- Look below for instructions on how to share your Flutter Dependencies. --->

<details>
<summary>Expand <code>Flutter dependencies</code> snippet</summary>
<br>

```yaml

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

Additional context and comments

No response