Not able to Install plugin for iOS gets stuck at installing
imrranbadshah opened this issue · comments
I'm submitting a ... (check one with "x")
- question
- any problem or bug report
- feature request
If you choose 'problem or bug report', please select OS: (check one with "x")
- Android
- iOS
- Browser
cordova information: (run $> cordova plugin list
)
cordova-admob 4.2.1 "AdMob Google Ads + Tappx"
cordova-androidx-build 1.0.3 "cordova-androidx-build"
cordova-connectivity-monitor 1.2.2 "Connectivity Monitoring"
cordova-libgoogleadmobads 7.13.1 "iOS Google AdMob Ads library"
cordova-play-services-version-adapter 1.0.2 "Cordova/Ionic Google Play Services Versions Incompatibility Adapter"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filechooser 1.2.0 "File Chooser"
cordova-plugin-filepath 1.5.8 "cordova-plugin-filepath"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 4.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-market 1.2.0 "Market"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-telerik-imagepicker 2.3.3 "ImagePicker"
cordova-plugin-uniquedeviceid 1.3.2 "UniqueDeviceID"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.6.8 "SocialSharing"
cordova.plugins.diagnostic 5.0.2 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
uk.co.workingedge.phonegap.plugin.launchnavigator 5.0.4 "Launch Navigator"
If you use @ionic-native/google-maps
, please tell the package.json (only @ionic-native/core
and @ionic-native/google-maps
are fine mostly)
Current behavior:
Installing "cordova-plugin-googlemaps" for ios
gets stuck at this line and returns no error or success message for ionic 4-iOS in MacOs Mojave when installing or adding ios platform
Expected behavior:
The Plugin should install successfully
It's depends on your internet and your PC environment.
The dependency plugin https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk takes long time for some people.
Please install it from local first, then install this plugin.
$ git clone git@github.com:mapsplugin/cordova-plugin-googlemaps-sdk.git
$ cordova plugin add (path to)/cordova-plugin-googlemaps-sdk
$ cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps
Hi, I have experienced the same issue. The installation process is not stuck but takes a long time.
This was really annoying for us because when building from the CI, we need to rebuild our Cordova workspace. This means: running cordova prepare
to download and install plugins defined in our package.json
.
Despite a good bandwith (3Mb/s), more than 5 minutes of the whole cordova prepare
process was spent on the line
Installing "cordova-plugin-googlemaps" for ios
This is barely acceptable.
But we eventually found the culprit: the size of the git history of cordova-plugin-googlemaps-sdk
(a dependency of cordova-plugin-googlemaps
) is more than 500Mb (!).
Our workaround:
- Create a new repo which contains a snapshot of the
cordova-plugin-googlemaps-sdk
. Do not fork it but copy it: you just copy all the source files (without the big 500Mb .git directory), git add all those files and commit thoses files, in a kind of a squashed commit. (We set the project number version in our commit message, such asv3.9.0
). - Then, fork
mapsplugin/cordova-plugin-googlemaps
project - In your forked repo of
cordova-plugin-googlemaps
, update theplugin.xml
file to point toward your new repo containing the version of thecordova-plugin-googlemaps-sdk
:
<dependency id="com.googlemaps.ios" url="https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk" />
becomes something like:
<dependency id="com.googlemaps.ios" url="https://github.com/your_company/squashed-cordova-plugin-googlemaps-ios-sdk#3.9.0" />
- Update your project
package.json
dependency ofcordova-plugin-googlemaps
to point towards your forked repo
🚀 Now, the whole cordova prepare
process takes about 1 minute (instead of 6 minutes before) 🚀
@wf9a5m75 you could save a lot of required bandwith if you could just clean up the git history (500Mb) of cordova-plugin-googlemaps-sdk
. It'd avoid doing this workaround.
Thank you for your tips. It seems the hashtag is the best way. I can specify latest
tag on the SDK repo, and add #latest
in the plugin.xml file
I don't know if this will prevent from downloading the whole SDK repo but indeed, it's a straightforward modification with no side effects, it's worth giving it a try!