MEWconnect-iOS icon indicating copy to clipboard operation
MEWconnect-iOS copied to clipboard

Password isn't working after app update

Open Cybertwip opened this issue 5 years ago • 2 comments
trafficstars

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 avatar Dec 12 '19 23:12 Cybertwip

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 avatar Dec 12 '19 23:12 Cybertwip

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

Cybertwip avatar Dec 13 '19 02:12 Cybertwip