AleksandraMikic opened a new issue #1042:
URL: https://github.com/apache/cordova-ios/issues/1042
# 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
`**#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
<CDVScreenOrientationDelegate>{
@protected
id <CDVWebViewEngineProtocol> _webViewEngine;
@protected
id <CDVCommandDelegate> _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 <CDVWebViewEngineProtocol>
webViewEngine;
@property (nonatomic, readonly, strong) id <CDVCommandDelegate>
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 <NSXMLParserDelegate>*)delegate;
- (void)showLaunchScreen:(BOOL)visible;
@end`
and
`**#import "AppDelegate.h"**
#import "MainViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
**self.viewController = [[MainViewController alloc] init];**
return [super application:application
didFinishLaunchingWithOptions:launchOptions];
}
@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
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
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]