Hi everyone, I have a problem with building an iOS app in XCode.
It is not possible to build an app supposedly due to errors in CDVViewController.h and AppDelegate.h files.
What is expected to happen?
The app should be built.
What does actually happen?
I get the following errors:
Parse issue
and
Expected identifier or (
Information
It worked fine with this app before, then I did several updates- Node, Gradle and XCode, and created a new project (exactly the same as the previous one), and it cannot be build anymore.
Command or Code
(Locations of errors are bold)
`#import <UIKit/UIKit.h>
import <Foundation/NSJSONSerialization.h>
import "CDVAvailability.h"
import "CDVInvokedUrlCommand.h"
import "CDVCommandDelegate.h"
import "CDVCommandQueue.h"
import "CDVScreenOrientationDelegate.h"
import "CDVPlugin.h"
import "CDVWebViewEngineProtocol.h"
@interface CDVViewController : UIViewController {
@protected
id _webViewEngine;
@protected
id _commandDelegate;
@protected
CDVCommandQueue* _commandQueue;
}
Bug Report
Hi everyone, I have a problem with building an iOS app in XCode.
It is not possible to build an app supposedly due to errors in CDVViewController.h and AppDelegate.h files.
What is expected to happen?
The app should be built.
What does actually happen?
I get the following errors:
Parse issue
and
Expected identifier or (
Information
It worked fine with this app before, then I did several updates- Node, Gradle and XCode, and created a new project (exactly the same as the previous one), and it cannot be build anymore.
Command or Code
(Locations of errors are bold)
`#import <UIKit/UIKit.h>
import <Foundation/NSJSONSerialization.h>
import "CDVAvailability.h"
import "CDVInvokedUrlCommand.h"
import "CDVCommandDelegate.h"
import "CDVCommandQueue.h"
import "CDVScreenOrientationDelegate.h"
import "CDVPlugin.h"
import "CDVWebViewEngineProtocol.h"
@interface CDVViewController : UIViewController{
@protected
id _webViewEngine;
@protected
id _commandDelegate;
@protected
CDVCommandQueue* _commandQueue;
}
@property (nonatomic, readonly, weak) IBOutlet UIView* webView;
@property (nonatomic, readonly, strong) NSMutableDictionary pluginObjects; @property (nonatomic, readonly, strong) NSDictionary pluginsMap; @property (nonatomic, readonly, strong) NSMutableDictionary settings; @property (nonatomic, readonly, strong) NSXMLParser configParser;
@property (nonatomic, readwrite, copy) NSString appScheme; @property (nonatomic, readwrite, copy) NSString configFile; @property (nonatomic, readwrite, copy) NSString wwwFolderName; @property (nonatomic, readwrite, copy) NSString startPage; @property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue; @property (nonatomic, readonly, strong) id webViewEngine;
@property (nonatomic, readonly, strong) id commandDelegate;
/* Takes/Gives an array of UIInterfaceOrientation (int) objects ex. UIInterfaceOrientationPortrait / @property (nonatomic, readwrite, strong) NSArray* supportedOrientations;
(UIView*)newCordovaViewWithFrame:(CGRect)bounds;
(NSString*)appURLScheme;
(NSURL*)errorURL;
(UIColor)colorFromColorString:(NSString)colorString CDV_DEPRECATED(7.0.0, "Use BackgroundColor in xcassets");
(NSArray)parseInterfaceOrientations:(NSArray)orientations;
(BOOL)supportsOrientation:(UIInterfaceOrientation)orientation;
(id)getCommandInstance:(NSString*)pluginName;
(void)registerPlugin:(CDVPlugin)plugin withClassName:(NSString)className;
(void)registerPlugin:(CDVPlugin)plugin withPluginName:(NSString)pluginName;
(void)parseSettingsWithParser:(NSObject*)delegate;
(void)showLaunchScreen:(BOOL)visible;
@end`
and
`#import "AppDelegate.h"
import "MainViewController.h"
@implementation AppDelegate
@end`
and
`#import <Cordova/CDVViewController.h>
import <Cordova/CDVAppDelegate.h>
@interface AppDelegate : CDVAppDelegate {}
@end`
Environment, Platform, Device
MacOS, XCode, iOS, different devices
Version information
Cordova 10.0.0 Platform: ios 6.1.1 Plugins: cordova-plugin-badge 0.8.8 "Badge" cordova-plugin-device 2.0.3 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-local-notification 0.9.0-beta.3 "LocalNotification" cordova-plugin-splashscreen 6.0.0 "Splashscreen" cordova-plugin-vibration 3.1.1 "Vibration" cordova-plugin-whitelist 1.3.4 "Whitelist"
MacOS Big Sur 11.0.1 XCode 12.2
Node 14.15.1
Checklist