arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1k stars 1.55k forks source link

Can't install ios platform because file already exists at destination '.../Resources/GoogleService-Info.plist' for resource file specified by plugin cordova-plugin-firebase in iOS platform #1046

Open EmilienRamos opened 5 years ago

EmilienRamos commented 5 years ago

Hey !

So I'm getting an error when I try to add IOS platform (ionic cordova platform add ios) :

Failed to install 'cordova-plugin-firebase': CordovaError: Uh oh!
File already exists at destination: 
"/Users/username/Documents/<projects>/platforms/ios/<project-name>/Resources/GoogleService-Info.plist" for resource file specified by plugin cordova-plugin-firebase in iOS platform

So I can't see my app on emulator, because IOS platform is not fully loaded.

This is my Ionic version :

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.1.1
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.4.0

Cordova:

   cordova (Cordova CLI) : 9.0.0
   Cordova Platforms     : android 7.1.4, ios 5.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 13 other plugins)

System:

   ios-deploy : 1.9.4
   ios-sim    : 7.0.0
   NodeJS     : v11.12.0 (/usr/local/Cellar/node/11.12.0/bin/node)
   npm        : 6.9.0
   OS         : macOS High Sierra
   Xcode      : Xcode 10.1 Build version 10B61

I also have this version of plugin : "cordova-plugin-firebase": "2.0.5"

On android it's perfectly working. Does someone has already solve this error ?

ryanmtaylor commented 5 years ago

I solved this by removing <resource-file src="GoogleService-Info.plist" /> from my config.xml file. If that alone doesn't work then try deleting the platform and plugin folders and re-adding each platform (resetting everything never hurts!)

arvindroot commented 4 years ago

check here " platforms/ios/projectname/Resources" if twice "GoogleService-Info.plist" then remove one clean and make build then you can successfully make build.

bryanfaundez commented 3 years ago

marque aquí "plataformas / ios / projectname / Resources" si dos veces "GoogleService-Info.plist", luego elimine uno limpio y haga la compilación, entonces puede realizar la compilación con éxito.

Thank you. Your solution worked for me