skip to Main Content

Problem Keywords: Firebase, Flutter, and iOS.

While I encounter no issues with the Android part, I have been unable to successfully build for iOS. Below are the error codes I am experiencing.

Flutter version: 3.22.3 Stable

XCode: 15.4 (latest version at the time of release)

"flutter doctor" results: All checks are green.

The issue arises when running the flutter build ios command.

When using version 10.22.0 of the firebase-ios-sdk package:

Uncategorized (Xcode): Could not resolve package dependencies:
  file not found at path:
  /Users/username/Library/Developer/Xcode/DerivedData/Runner-dzholwmcosvbzjckrwbsnmmxsodb/SourcePackages/artifacts/firebase-ios-sdk/FirebaseAnalytics/FirebaseAnalytics-rc1.
  zip
  fatalError

When using version 11.0.0 of the firebase-ios-sdk package:

Swift Compiler Error (Xcode): Value of optional type '(any StorageProvider)?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider'
/Users/username/Desktop/project/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:72:11


Swift Compiler Error (Xcode): Value of optional type '(any StorageProvider)?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider'
/Users/username/Desktop/project/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:87:11


Swift Compiler Error (Xcode): Cannot assign value of type '(any AuthInterop)?' to type 'any AuthInterop'
/Users/username/Desktop/project/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:290:38


Swift Compiler Error (Xcode): Cannot assign value of type '(any AppCheckInterop)?' to type 'any AppCheckInterop'
/Users/username/Desktop/project/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:292:46

Thank you in advance for any assistance you can provide!

Steps I Have Taken to Resolve the Issue:

  • Uninstalling and reinstalling XCode.
  • Trying different versions of XCode.
  • Testing different versions of the Firebase iOS SDK package.
  • Using CocoaPods instead of XCode for package installation.

2

Answers


  1. Chosen as BEST ANSWER

    Its ok. The reason for this error is that I included firebase packages with any package manager for ios while integrating firebase into the project in the flutter application. When it comes to flutter, a package should not be included. Applying firebase documentation is wrong, FlutterFire documentation should be applied completely and without any excess. As some people say, do not try to learn swift and interfere with these codes, these are not your codes, they are located in the root directory of firebase packages.


  2. That was four totally useless and time wasting attempts to fix the problem.

    Step 1: Learn Swift.
    Step 2: Tell us what T? means.
    Step 3: Tell us how if let… and guard let… work.

    Step 4: With this knowledge, read the error message and easily fix your problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search