question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No known instance method for selector 'initWithWebView:' in GoogleMaps.m

See original GitHub issue

Hi, I had strange issue with this plugin. I already installed this plugIn in fresh Project and it’s working fine.

While i switched to the my existing project i got below 3 errors :

MyProject/Plugins/plugin.google.maps/GoogleMaps.m:24:30: warning: incompatible pointer types assigning to 'UIWebView *' from 'UIView *' [-Wincompatible-pointer-types]
    self.pluginLayer.webView = self.webView;
                             ^ ~~~~~~~~~~~~
MyProject/platforms/ios/Uponor&more/Plugins/plugin.google.maps/GoogleMaps.m:28:45: warning: incompatible pointer types assigning to 'UIWebView *' from 'UIView *' [-Wincompatible-pointer-types]
    self.pluginScrollView.debugView.webView = self.webView;
                                            ^ ~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:34:30: warning: incompatible pointer types assigning to 'UIWebView *' from 'UIView *' [-Wincompatible-pointer-types]
    self.pluginLayer.webView = self.webView;
                             ^ ~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:167:30: warning: incompatible pointer types assigning to 'UIWebView *' from 'UIView *' [-Wincompatible-pointer-types]
        self.mapCtrl.webView = self.webView;
                             ^ ~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:176:59: error: no known instance method for selector 'initWithWebView:'
        Map *mapClass = [[NSClassFromString(@"Map")alloc] initWithWebView:self.webView];
                                                          ^~~~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:186:38: warning: incompatible pointer types assigning to 'UIWebView *' from 'UIView *' [-Wincompatible-pointer-types]
            self.pluginLayer.webView = self.webView;
                                     ^ ~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:245:68: error: no known instance method for selector 'initWithWebView:'
                pluginClass = [[NSClassFromString(className)alloc] initWithWebView:self.webView];
                                                                   ^~~~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:321:19: error: no visible @interface for 'UIView' declares the selector 'stringByEvaluatingJavaScriptFromString:'
    [self.webView stringByEvaluatingJavaScriptFromString:jsString];
     ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MyProject/Plugins/plugin.google.maps/GoogleMaps.m:404:34: warning: incompatible pointer types assigning to 'UIWebView *' from 'UIView *' [-Wincompatible-pointer-types]
        self.pluginLayer.webView = self.webView;
                                 ^ ~~~~~~~~~~~~
6 warnings and 3 errors generated.

If you are interested in ilist of installed plugins then below is complete list of installed plugins in my project : By give “cordova plugin list” command i got below list of installed plugins :

com.googlemaps.ios 1.13.0 "Google Map iOS SDK for Cordova"
cordova-plugin-battery-status 1.1.2 "Battery"
cordova-plugin-camera 2.1.1 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-contacts 2.0.1 "Contacts"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-device-motion 1.2.1 "Device Motion"
cordova-plugin-device-orientation 1.0.3 "Device Orientation"
cordova-plugin-dialogs 1.2.1 "Notification"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-geolocation 2.1.0 "Geolocation"
cordova-plugin-globalization 1.0.3 "Globalization"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-listpicker 2.2.2 "ListPicker"
cordova-plugin-media 2.2.0 "Media"
cordova-plugin-media-capture 1.2.0 "Capture"
cordova-plugin-network-information 1.2.1 "Network Information"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-vibration 2.1.1 "Vibration"
cordova-plugin-whitelist 1.2.2 "Whitelist"
phonegap-plugin-barcodescanner 5.0.0 "BarcodeScanner"
plugin.google.maps 1.3.9 "phonegap-googlemaps-plugin"

Help me regarding this

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chadwhitakercommented, Jun 29, 2016

Thanks for all your hard work @Hirbod and @wf9a5m75! While the plugin is currently a little unstable, it’s a blessing to work with over Google Maps JS. 😃

1reaction
gurpritksainicommented, Jun 23, 2016

We are also looking into the same type of plugin and always getting the similar issue. I think we have to check for the updated version of plugin and that will solve the issue. But till now after trying that so many times we are yet to get a proper solution on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in Google Maps iOS Utils - No known instance method ...
I downloaded the Google Maps iOS Utils framework via pod install. ... No known instance method for selector mapView: didTapPOIWithPlaceID: ...
Read more >
How to fix "No known class method for selector ... - Unity Forum
UnityAds: 2.1.2 (from Asset Store) When build to ios project, then archive by xcode, it always show error below: Showing All Issues
Read more >
Maps SDK for iOS release notes - Google Developers
This will ensure that your builds remain stable against a known version, and will not switch to the next major version until you...
Read more >
No known class method for selector - Apple Community
No known class method for selector. Getting the above error and not sure ... Those methods appear to be instance methods, not class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found