Я - новичок в программировании iOS и должен [быстро] портировать приложение Кордовы в iOS. Я столкнулся с приведенной ниже ошибкой при попытке реплицировать найденный проект here.AppDelegate - непризнанный селектор, отправленный в экземпляр
Что может быть причиной и как я могу ее решить, не углубляясь в код? (Если возможно)
AppDelegate getCommandInstance:]: unrecognized selector sent to instance <instance>
ebKit discarded an uncaught exception in the
webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate:
<NSInvalidArgumentException> -[AppDelegate getCommandInstance:]: unrecognized selector
sent to instance <instance>
Спасибо.
[Редактировать]
AppDelegate.h имеет линии ниже
@property (nonatomic, retain) IBOutlet UIWindow* window;
@property (nonatomic, retain) IBOutlet CDVViewController* viewController;
AppDelegate.m имеет
CGRect screenBounds = [[UIScreen mainScreen] bounds];
self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
self.window.autoresizesSubviews = YES;
и
[self.window addSubview:self.viewController.view];
[self.window makeKeyAndVisible];
[Редактировать]
Это единственная часть кода, которая ссылается на getCommandInstance, которая упоминается в ошибке, как видно выше. Этот фрагмент кода находится в SQLitePlugin.m
-(CDVPlugin*) initWithWebView:(UIWebView*)theWebView
{
self = (SQLitePlugin*)[super initWithWebView:theWebView];
if (self) {
openDBs = [NSMutableDictionary dictionaryWithCapacity:0];
[openDBs retain];
CDVFile* pgFile = [[self appDelegate] getCommandInstance: @"org.apache.cordova.file"];
NSString *docs = [pgFile appDocsPath];
[self setAppDocsPath:docs];
}
return self;
}
почта, которая вызывает сбой. – Morion
См. Править для кода, на который ссылаются при сбое. – myuzikoda