Can't install native googlemaps plugin on IOS


#1

Hi everyone,
I’ve tried to add googlemaps cordova plugin to my proyect (which is already published in android- google play) in ios platform in order to build the app and send it to app store review process…

But the problem is that as soon as I try to add the plugin I get an error related to plugin dependency com.googlemaps.ios

I run:
ionic plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID=“xxx” --variable API_KEY_FOR_IOS=“xxx”

And I get:

Installing "cordova-plugin-googlemaps" for ios

Installing "com.googlemaps.ios" for ios


Error during processing of action! Attempting to revert...


Failed to install 'com.googlemaps.ios': CordovaError: Uh oh!
Cannot find resource file "/Users/aehn/Documents/cs_app/plugins/com.googlemaps.ios/Maps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" for plugin com.googlemaps.ios in iOS platform
    at install (/Users/aehn/Documents/cs_app/platforms/ios/cordova/lib/plugman/pluginHandlers.js:61:23)
    at Object.process (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:117:20)
    at PluginManager.addPlugin (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:147:17)
    at Api.addPlugin (/Users/aehn/Documents/cs_app/platforms/ios/cordova/Api.js:235:10)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:619:6)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:379:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)

Failed to install 'cordova-plugin-googlemaps': CordovaError: Uh oh!
Cannot find resource file "/Users/aehn/Documents/cs_app/plugins/com.googlemaps.ios/Maps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" for plugin com.googlemaps.ios in iOS platform
    at install (/Users/aehn/Documents/cs_app/platforms/ios/cordova/lib/plugman/pluginHandlers.js:61:23)
    at Object.process (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:117:20)
    at PluginManager.addPlugin (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:147:17)
    at Api.addPlugin (/Users/aehn/Documents/cs_app/platforms/ios/cordova/Api.js:235:10)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:619:6)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:379:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)


Error: Uh oh!
Cannot find resource file "/Users/aehn/Documents/cs_app/plugins/com.googlemaps.ios/Maps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" for plugin com.googlemaps.ios in iOS platform

I’ve deleted everything related to the plugin and dependecy:

cordova plugin rm cordova-plugin-googlemaps
cordova plugin rm com.googlemaps.ios

And also I’ve tried with the experimental 2.0 version with no success:

MacBook-Air-de-aehn:cs_app aehn$ cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk
Installing "com.googlemaps.ios" for android
Installing "com.googlemaps.ios" for ios
Error during processing of action! Attempting to revert...
Failed to install 'com.googlemaps.ios': CordovaError: Uh oh!
Cannot find resource file "/Users/aehn/Documents/cs_app/plugins/com.googlemaps.ios/Maps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" for plugin com.googlemaps.ios in iOS platform
    at install (/Users/aehn/Documents/cs_app/platforms/ios/cordova/lib/plugman/pluginHandlers.js:61:23)
    at Object.process (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:117:20)
    at PluginManager.addPlugin (/Users/aehn/Documents/cs_app/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:147:17)
    at Api.addPlugin (/Users/aehn/Documents/cs_app/platforms/ios/cordova/Api.js:235:10)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:619:6)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:379:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
Error: Uh oh!
Cannot find resource file "/Users/aehn/Documents/cs_app/plugins/com.googlemaps.ios/Maps/Frameworks/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle" for plugin com.googlemaps.ios in iOS platform

Any idea?

Thanks!


#2

Have you tried to remove and add again the iOS platform ?

ionic platform rm ios

Then

ionic platform add ios


#3

I’ve just do it, and same error :S


#4

Have you looked through the Github issues of this plugin?
You could try to cordova plugin add ... directly if this changes anything (I don’t exepect it to, but make sure)


#5

try to re-install all dependencies :

npm install


#6

Th solution : https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1435#issuecomment-299580754
Cheers!