cordova-plugin-firebasex: Build error with MacOS Monterey: building for iOS Simulator, but linking in object file built for iOS

Bug report

CHECKLIST

  • I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
  • I have checked that no similar issues (open or closed) already exist.

Current behavior:

I have a new laptop which came with macOS Monterey, when I checkout the cordova-plugin-firebasex-test project and try and run ios it fails to build with the follow message. I have tried with system Ruby an cocoapods and also brew based Ruby and cocoapods all result in the same issue. I suspect something is changed with the latest xcode simulator that stops it from working.

We get the same issue for our own project.

ld: in /Users/joel/dev/cordova-plugin-firebasex-test/platforms/ios/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDEMMErrorHandler_3a47e13d8ca81b41e9cdb7ef5468004a.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/joel/dev/cordova-plugin-firebasex-test/platforms/ios/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

buildlog.txt

Expected behavior: It compiles

Steps to reproduce: From macOS Monterey with Xcode Version 13.1 (13A1030d) follow the instructions from the test project

Screenshots NA

Environment information

  • Cordova CLI version
    • 10.0.0 (cordova-lib@10.1.0)
  • Cordova platform version
    • `Installed platforms:
  ios 6.2.0
Available platforms:
  android ^9.1.0
  browser ^6.0.0
  electron ^1.1.1
  osx ^6.0.0`
  • Plugins & versions installed in project (including this plugin)
    • cordova plugin ls
cordova-custom-config 5.1.0 "cordova-custom-config"
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
cordova-plugin-customfcmreceiver 1.0.0 "Custom FCM Receiver"
cordova-plugin-dialogs 1.3.2-dev "Notification"
cordova-plugin-enable-multidex 0.2.0 "Enable Multidex"
cordova-plugin-firebasex 13.0.1 "Google Firebase Plugin"
cordova-plugin-hello-c 1.1.1 "Hello"
  • Dev machine OS and version, e.g.
    • OSX
      • sw_vers
ProductName:	macOS
ProductVersion:	12.0.1
BuildVersion:	21A559

iOS build issue:

  • Node JS version
    • v14.18.1
  • XCode version Xcode Version 13.1 (13A1030d)

Related code: NA

Console output

console output
See attached buildoutput.txt


Other information: NA

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27

Commits related to this issue

Most upvoted comments

GoogleSignIn 6.x is able to be built for simulator + m1 chip. However, a bit of code in this lib will need to be updated to use it. If nobody else will, I’ll submit a PR within the next week. @dpa99c are you able to review/merge it? Screen Shot 2022-01-19 at 20 04 25

Hi @studioromeo, I gave the blank example repo a try and got the following error on build:

ld: in …/cordova-firebase-example/platforms/ios/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o), building for iOS Simulator, but linking in object file built for iOS, file ‘…/cordova-firebase-example/platforms/ios/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities’ for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also facing the issue.

Its seems the issue is with Google Sign in. Verison 5.0.2 is being bundled and that doesn’t support M1. Google have updated to ‘GoogleSignIn’, ‘6.0.2’ this does support M1. Investigating if this fixes the simulator issue.