[UPDATED] Change TestFlight preprocessor toggles to TESTFLIGHT_SDK_VERSION. [IMPROVED] Change logic behind shared MPAppDelegate to inheritance, allowing for the common files to implement methods that the platform-specific class can override. [IMPROVED] Handling and checking of config changes. [ADDED] iCloud config toggle, allowing a user to turn on and off the iCloud store. [IMPROVED] Explanation of iCloud.
32 lines
689 B
Objective-C
32 lines
689 B
Objective-C
//
|
|
// MPElementGeneratedEntity.m
|
|
// MasterPassword
|
|
//
|
|
// Created by Maarten Billemont on 16/01/12.
|
|
// Copyright (c) 2012 Lyndir. All rights reserved.
|
|
//
|
|
|
|
#import "MPElementGeneratedEntity.h"
|
|
#import "MPAppDelegate.h"
|
|
#import "MPAppDelegate_Key.h"
|
|
|
|
|
|
@implementation MPElementGeneratedEntity
|
|
|
|
@dynamic counter;
|
|
|
|
- (id)content {
|
|
|
|
if (!(self.type & MPElementTypeClassGenerated)) {
|
|
err(@"Corrupt element: %@, type: %d, does not match class: %@", self.name, self.type, [self class]);
|
|
return nil;
|
|
}
|
|
|
|
if (![self.name length])
|
|
return nil;
|
|
|
|
return MPCalculateContent((unsigned)self.type, self.name, [MPAppDelegate get].key, self.counter);
|
|
}
|
|
|
|
@end
|