apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 210 forks source link

iOS build failure #115

Open craig-at-rsg opened 7 years ago

craig-at-rsg commented 7 years ago

Issue: xcode fails to build AppPreferences.m

The message is: .../Plugins/cordova-plugin-app-preferences/AppPreferences.m:24:16: No visible @interface for 'UIView' declares the selector 'stringByEvaluatingJavaScriptFromString:'

Here's the function:

- (void)defaultsChanged:(NSNotification *)notification {
    NSString * jsCallBack = [NSString stringWithFormat:@"cordova.fireDocumentEvent('preferencesChanged');"];
    [self.webView stringByEvaluatingJavaScriptFromString:jsCallBack];
}

Please specify your environment

Plugin version:

Toolchain:

Platforms affected:

What the scope of your problem:

craig-at-rsg commented 7 years ago

Here's an example fix: https://github.com/Telerik-Verified-Plugins/PushNotification/commit/ddaa7a1548b01eccbc7f3fdd24f7356057c3931e