App not building cordova firebase messaging plugin

Build fails with the following error:

The following build commands failed:
	CompileC /Users/vagrant/Library/Developer/Xcode/DerivedData/AC_Worker_assist-ffayshafitrqmpedvxvjtcpaprpz/Build/Intermediates.noindex/ArchiveIntermediates/AC\ Worker\ assist/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/FirebaseMessaging.build/Objects-normal/arm64/GtalkCore.pbobjc.o /platforms/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Protos/GtalkCore.pbobjc.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'FirebaseMessaging' from project 'Pods')
(1 failure)
Command finished with error code 65: xcodebuild -workspace,AC Worker assist.xcworkspace,-scheme,AC Worker assist,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,AC Worker assist.xcarchive,archive,CONFIGURATION_BUILD_DIR=/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/platforms/ios/build/sharedpch,ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO,LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)
/platforms/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Protos/GtalkCore.pbobjc.m:794:10: error: implicit declaration of function 'OSAtomicCompareAndSwapPtrBarrier' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
         ^
/platforms/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Protos/GtalkCore.pbobjc.m:794:10: error: declaration of 'OSAtomicCompareAndSwapPtrBarrier' must be imported from module 'Darwin.libkern.OSAtomic' before it is required
In module 'Protobuf' imported from /platforms/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Protos/GtalkCore.pbobjc.m:27:
In module 'UIKit' imported from /platforms/ios/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:

There is also the following output RE targeting earlier versions of iOS

/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Firebase' from project 'Pods')
warning: Run script build phase 'Copy www directory' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AC Worker assist' from project 'AC Worker assist')
/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Protobuf' from project 'Pods')
/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'PromisesObjC' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'PromisesObjC' from project 'Pods')
/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GoogleDataTransport' from project 'Pods')
/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GoogleUtilities' from project 'Pods')
/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')

Have you determined which plugin is causing the error?

This might be the solution:

Using:

1 Like

We’ve not yet deployed Xcode 14.3, so I’m not sure if that’s the issue or not.

In order to help, we need to know what firebase plugin you’re using. Please let us know.

I am using cordova-plugin-push version 3.0.1, upgrading it to 4.0.0-dev.0 seems to resolve this issue. Do you know when you will be upgrading to 14.3?

1 Like

Glad to hear you resolved it!

We’re currently internally testing Xcode 14.3 and we expect it’ll go into a public beta in the next week or so depending on how our internal tests proceed.

1 Like

Cool thats good to hear. I am now experiencing different issues after a successful build

“This app could not be installed because its integrity could not be verified”

On iOS? That usually indicates a provisioning problem.