I have an application in ionic 3 (legacy) when building it I get the error in the Firebase Messaging library in this part of the file "GtalkExtensions.pbobjc"
if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
[worker release];
}
Conflicting types for 'OSAtomicCompareAndSwapPtrBarrier'
Declaration of 'OSAtomicCompareAndSwapPtrBarrier' must be imported from module 'Darwin.libkern.OSAtomic' before it is required
Implicit declaration of function 'OSAtomicCompareAndSwapPtrBarrier' is invalid in C99
How to solve this problem I already removed cocoapods completely and tested several versions and it didn't help.
Mac Mini M1 Mac OS Ventura XCode 14.2
The problem is related to new Protobuf (3.23.X) library. If you want to fix your current version of Firebase without upgrading to the latest one you can pin a previous working version of 'Protobuf' in your Podfile:
...
target 'YourTarget' do
project 'YourProject'
...
pod 'Protobuf', '= 3.22.1' # Pinned version for Firebase Messaging
end
Then remove Podfile.lock and run pod install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With