-2

Problem: I am trying to use Firebase in my iOS app. I have installed the SDK using cocoapods as incstructed by Firebase's docs (here) However, when I build by app I face an error of conditional binding in the source files of firebase as shown in the picture below.

enter image description here

Already tried solution: I tried to edit these files and reran the building process. But the problem is that this issue is in hundreds of files and certainly changing each line manually is not the solution.

Version Details:

  • Xcode: 13.3
  • Firebase: 10.28
  • Macbook Pro: Mid-2015
3
  • 1
    On Stack Overflow, please don't show pictures of text and code. Copy the text into the question itself and format it so that it's easy to read, copy, and search. You can edit the question to correct this using the edit link at the bottom. Commented Jul 2 at 13:21
  • 2
    Which version of Swift (or at least Xcode) you are using? if let value = value {} can be shorten since a few Swift version (5.7 refer to github.com/swiftlang/swift-evolution/blob/main/proposals/…) to if let value {}.
    – Larme
    Commented Jul 2 at 13:30
  • Yes the issue was with the version of Firebase and Xcode. Firebase has officially dropped support for older versions of Xcode and I am using 13.3 Firebase has added the shorthand syntax for optional binding with if-let but older Xcode was complaining about it. I used 8.13.0 version of Firebase with Xcode 13.3 and now its working without any complains. Commented Jul 2 at 14:51

2 Answers 2

1

Recent versions of Firebase require at least Xcode 15.2

0
0

Solution: The issue was with the versions of Firebase and Xcode. Firebase has officially dropped support for older versions of Xcode (e.g. 13 or 14) and I am using 13.3

Firebase has added the shorthand syntax for optional binding with if-let but older Xcode was complaining about it. I used 8.13.0 version of Firebase (pod 'Firebase', '8.13.0') with Xcode 13.3 and now its working without any complains.

Some helpful links:

Not the answer you're looking for? Browse other questions tagged or ask your own question.