Search code examples
iosbuildcommand-line-interfacegoogle-maps-sdk-iosionic2

Ionic build ios for GoogleMaps - Error code 65 for command


My build use to work fine with GoogleMapSDK. but for some reason I can't get it working again.

If I remove the plugin, then build works fine.

I have tired reinstalling platform and plugin, but it comes back with same error.

I'm not sure how to fix this issue.

 google.maps/GroundOverlay.m -o /Users/basit/projects/mobile-project/platforms/ios/build/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/GroundOverlay.o
/Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/GroundOverlay.m:100:47: error: property 'request' not found on object of type 'UIView *'
        NSString *currentPath = [self.webView.request.URL absoluteString];
                                              ^
/Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/GroundOverlay.m:108:61: warning: incompatible pointer types sending 'UIView * _Nullable' to parameter of type 'UIWebView *' [-Wincompatible-pointer-types]
        urlStr = [PluginUtil getAbsolutePathFromCDVFilePath:self.webView cdvFilePath:urlStr];
                                                            ^~~~~~~~~~~~
In file included from /Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/GroundOverlay.m:9:
In file included from /Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/GroundOverlay.h:9:
In file included from /Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/GoogleMaps.h:11:
In file included from /Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/GoogleMapsViewController.h:12:
/Users/basit/projects/mobile-project/platforms/ios/app/Plugins/plugin.google.maps/PluginUtil.h:66:58: note: passing argument to parameter 'theWebView' here
+ (NSString *)getAbsolutePathFromCDVFilePath:(UIWebView*)theWebView cdvFilePath:(NSString *)cdvFilePath;
                                                         ^

** BUILD FAILED **


The following build commands failed:
    CompileC build/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/GoogleMapsViewController.o app/Plugins/plugin.google.maps/GoogleMapsViewController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC build/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/GoogleMaps.o app/Plugins/plugin.google.maps/GoogleMaps.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/basit/projects/mobile-project/platforms/ios/cordova/build-debug.xcconfig,-project,app.xcodeproj,ARCHS=i386,-target,app,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/basit/projects/mobile-project/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/basit/projects/mobile-project/platforms/ios/build/sharedpch

Solution

  • As the warning says on plugin page, "This plugin is not compatible with Cordova-iOS 4.."

    I downgraded from 4.* to 3.9.0 and now it compiles just fine!

    ionic platform remove ios
    ionic platform add [email protected]