1

I have an error on the line: #if !TARGET_OS_OSX && !TARGET_OS_WATCHOS

This is in the file named FIRAuthDefaultUIDelegate.h

And the error I get is: TARGET_OS_WATCHOS is not defined, evaluates to 0

I have tried updating/ reinstalling the pods but to no effect as well as cleaning my project and restarting Xcode. Any help on this would be appreciated.

I should also mention this error came out of "nowhere". By that I mean is that I left the code for a few days, and when I came back it started giving me an error.

Hubert Rzeminski
  • 469
  • 4
  • 15

1 Answers1

3

'TARGET_OS_WATCHOS' is not defined on Xcode 12.5 It is still in BETA so I guess that the 6.9.2 release of firebase library is not fully compatible

if you can use xcode 12.4 then the 6.9.2 firebase lib should work properly

if you are using xcode 12.5 then the 'TARGET_OS_WATCHOS' has to be changed in 'TARGET_OS_WATCH'

NOTE: the 6.9.2 is not the latest version. The 7.7.0 version is the latest one

I guess that 7.7.0 version of the firebase library will fix also this compatibility issue.

cristallo
  • 1,951
  • 2
  • 25
  • 42
  • This solved the problem for the firebase pod but it gave lots of different errors to a different pod. However after removing the pod with the errors, I get a new error saying "982 duplicate symbols for architecture x86_64" – Hubert Rzeminski Mar 02 '21 at 10:54
  • obviously it is unrelated with the original targeting issue... I've found an old question about it https://stackoverflow.com/questions/24298144/duplicate-symbols-for-architecture-x86-64-under-xcode – cristallo Mar 02 '21 at 10:59
  • 1
    Firebase was fixed in https://github.com/firebase/firebase-ios-sdk/pull/7423 and that fix is available in 7.7.0 – Paul Beusterien Mar 02 '21 at 16:57