iOS: 221 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1

Hi! I updated to the newest Xcode version and my App was building fine so far. But now it doesn’t. I tried two days everything I found, but no way.

The error is:

221 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1

and then
xcodebuild: Command failed with exit code 65

My ionic info:

Ionic:

   Ionic CLI          : 5.4.2 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 3.1.2, (and 17 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.8 

System:

   ios-deploy : 1.9.2
   ios-sim    : 8.0.2
   NodeJS     : v10.16.3 (/usr/local/bin/node)
   npm        : 6.10.2
   OS         : macOS Mojave
   Xcode      : Xcode 11.1 Build version 11A1027

I also tried
ionic cordova build ios --buildFlag='-UseModernBuildSystem=0'
Setting binaryMode on/off in Xcode
Complete reinstall ionic/cordova
ionic cordova plugin remove cordova-plugin-console is not necessary anymore
It has worked with all the plugins before, so I think that the plugins can’t be the problem.

Can anybody please give me a hint?

The olution for me was open the
.xcworkspace file insted of .xcodeproj located inside my ‘/platforms/ios’ folder.the solution for me was open the .xcworkspace file insted of .xcodeproj located inside my ‘/platforms/ios’ folder.

I also tried this, but there is no difference.
When I use cordova-ios 4.4.0 instead of 5.0.1 (
<engine name="ios" spec="^5.0.1" /> in config.xml ) the error changes to

Reading build config file:
Cannot read property 'toLowerCase' of undefined

After going back to 5.0.1 it stays on this error.

With the --prod flag I get

ionic-app-script task: "build" 
[20:30:26]  TypeError: Object prototype may only be an Object or null: undefined 
TypeError: Object prototype may only be an Object or null: undefined
    at setPrototypeOf (<anonymous>)

I’m really confused now.

Also try:-
Another workaround (without changes in plugin.xml) could be:

  • Open your project with XCode.
  • Go to " Build Phases " and access to " Link Binary With Libraries "
  • Remove the next libraries:
    • libGTMSessionFetcher_core.a
    • libGTMSessionFetcher_full.a
    • libGTM_AddressBook.a
    • libGTM_core.a
    • libGTM_GTMURLBuilder.a
    • libGTM_iPhone.a
    • libGTM_KVO.a
    • libGTM_Regex.a
    • libGTM_StringEncoding.a
    • libGTM_SystemVersion.aAnother workaround (without changes in plugin.xml) could be:

I can’t find these libraries