I've been stuck for some time now with the Google Maps plugin for Ionic. Until now, it worked perfectly fine on Android and iOS, but since I updated my app form Ionic 2 to 3 I cannot build it for iOS.
I've tried removing all npm modules and all plugins and platforms and reinstalling them again, I've been looking and googling for a solution for hours now and I'm starting to desperate. In android I have no problem building or running the app.
I'm building the app using xcode (opening the workspace's file, not the project's), but there are always two related errors:
/.../platforms/ios/appname/Plugins/com.googlemaps.ios/GoogleMaps.framework/Headers/GMSPolyline.h:11:9: 'UIKit/UIKIt.h' file not found
which causes the next error:
/.../platforms/ios/appname/Plugins/cordova-plugin-googlemaps/GoogleMaps.h:10:9: Could not build module 'GoogleMaps'
This is the maps plugin tag at config.xml:
<plugin name="cordova-plugin-googlemaps" spec="~1.4.0">
<variable name="API_KEY_FOR_ANDROID" value="myapikeyforandroid" />
<variable name="API_KEY_FOR_IOS" value="myapikeyforios" />
<variable name="NSLOCATIONWHENINUSEUSAGEDESCRIPTION" value="Show your location on the map" />
<variable name="NSLOCATIONALWAYSUSAGEDESCRIPTION" value="Trace your location on the map" />
</plugin>
In the package.json I have these dependences:
"dependencies": {
"@angular/common": "4.1.2",
"@angular/compiler": "4.1.2",
"@angular/compiler-cli": "4.1.2",
"@angular/core": "4.1.2",
"@angular/forms": "4.1.2",
"@angular/http": "4.1.2",
"@angular/platform-browser": "4.1.2",
"@angular/platform-browser-dynamic": "4.1.2",
"@ionic-native/background-geolocation": "^3.12.1",
"@ionic-native/background-mode": "^3.12.1",
"@ionic-native/barcode-scanner": "^3.12.1",
"@ionic-native/core": "3.11.0",
"@ionic-native/geolocation": "^3.12.1",
"@ionic-native/google-maps": "^3.12.1",
"@ionic-native/local-notifications": "^3.12.1",
"@ionic-native/push": "^3.12.1",
"@ionic-native/secure-storage": "^3.12.1",
"@ionic-native/social-sharing": "^3.12.1",
"@ionic-native/splash-screen": "^3.12.1",
"@ionic-native/status-bar": "^3.11.0",
"@ionic-native/streaming-media": "^3.12.1",
"@ionic-native/video-player": "^3.12.1",
"@ionic/storage": "2.0.1",
"angular2-jwt": "^0.2.3",
"ionic-angular": "3.3.0",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"socket.io-client": "^1.7.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.11"
}
Let me know if I can provide any more clues...
Thanks in advance for the help.
EDIT: I've tried adding the UIKit Library and reinstalling XCode, but nothing works. If I remove the google maps plugin, the app builds just fine, so it seems to be related to cordova-plugin-googlemaps I'm trying now other versions to determine whether this is a version issue.
EDIT 2: Changing the google maps version didn't have any effects...
EDIT 3: I've found this thread, which seems similar to this one, but there wasn't any answer either.