IOS build is showing the error

    if (@available(iOS 13.0, *)) {
        NSString *contentMode = [settings cordovaSettingForKey:@"PreferredContentMode"];
        if ([contentMode isEqual: @"mobile"]) {
            **configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;**
        } else if ([contentMode isEqual: @"desktop"]) {
            **configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop;**

These 2 bold lines are creating error on giving the command :ionic cordova build ios for xcode10.0
The error is as follows:

  • Property ‘defaultWebpagePreferences’ not found on object of type ‘WKWebViewConfiguration *’

  • Use of undeclared identifier ‘WKContentModeMobile’

  • Use of undeclared identifier ‘WKContentModeDesktop’

Please help me with this error