así que tengo esteesta clase no es valor de la clave de codificación compatible para la clave GivenName
- (void)loadView {
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString* documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString* databasePath = [documentsPath stringByAppendingPathComponent:@"ProxDeals.db"];
NSError *error;
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:databasePath];
if (fileExists==TRUE) {
[[NSBundle mainBundle] loadNibNamed:@"ProxDealsViewController" owner:self options:nil];
}
else {
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ProxDeals.db"];
NSLog(@"%@",defaultDBPath);
success = [fileManager copyItemAtPath:defaultDBPath toPath:databasePath error:&error];
if (!success) {
NSAssert1(0, @"Failed to create writable database file with message '%@/.", [error localizedDescription]);
}
[[NSBundle mainBundle] loadNibNamed:@"UserRegistration" owner:self options:nil];
}
}
y este error:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ProxDealsViewController 0x5f22160> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key givenName.'
Sé que no lo hago hacer algo wright en la inicialización de la plumilla UserRegistration, pero no sé cómo solucionarlo.
Funcionó hasta que comencé a conectar IBOutlets en la segunda clase. – flaviusilaghi