Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password isn't working after app update #6

Open
Cybertwip opened this issue Dec 12, 2019 · 2 comments
Open

Password isn't working after app update #6

Cybertwip opened this issue Dec 12, 2019 · 2 comments

Comments

@Cybertwip
Copy link

If you debug using the same session (you don't close Xcode) password will work, but if you make changes to the code and update the app in other session the layout will display wrong and the password will not work.

@Cybertwip
Copy link
Author

I think it has to do with changing the Core Data model, it doesn't match and the password can't be recognized afterwards.

@Cybertwip
Copy link
Author

Cybertwip commented Dec 13, 2019

This template works just fine.

machine.m.motemplate

//
//  _<$name$>PlainObject.m
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
//

#import "_<$name$>PlainObject.h"
#import "<$name$>PlainObject.h"

@implementation _<$name$>PlainObject

#pragma mark - NSCoding

- (void)encodeWithCoder:(NSCoder *)aCoder {
<$foreach Attribute noninheritedAttributes do$>
    [aCoder encodeObject:self.<$Attribute.name$> forKey:@"<$Attribute.name$>"];<$endforeach do$><$foreach Relationship noninheritedRelationships do$>
    [aCoder encodeObject:self.<$Relationship.name$> forKey:@"<$Relationship.name$>"];<$endforeach do$>
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self != nil) {
<$foreach Attribute noninheritedAttributes do$>
        _<$Attribute.name$> = [[aDecoder decodeObjectForKey:@"<$Attribute.name$>"] copy];<$endforeach do$><$foreach Relationship noninheritedRelationships do$>
        _<$Relationship.name$> = [[aDecoder decodeObjectForKey:@"<$Relationship.name$>"] copy];<$endforeach do$>
    }

    return self;
}

#pragma mark NSCopying

- (id)copyWithZone:(NSZone *)zone {
    <$name$>PlainObject *replica = [[[self class] allocWithZone:zone] init];


<$if hasSuperentity$>
<$foreach Attribute allAttributes do$>    replica.<$Attribute.name$> = self.<$Attribute.name$>;
<$endforeach do$>
<$else$>
<$foreach Attribute noninheritedAttributes do$>    replica.<$Attribute.name$> = self.<$Attribute.name$>;
<$endforeach do$>
<$endif$>



<$if hasSuperentity$>
<$foreach Relationship allRelationships do$>    replica.<$Relationship.name$> = self.<$Relationship.name$>;
<$endforeach do$>
<$else$>
<$foreach Relationship noninheritedRelationships do$>    replica.<$Relationship.name$> = self.<$Relationship.name$>;
<$endforeach do$>
<$endif$>
    return replica;
}

@end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant