- Fix class naming in default classes
- Add User in PNInstallation - Varius fix
This commit is contained in:
parent
a5550fb7c2
commit
33672c87eb
@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "PNObject"
|
||||
s.version = "0.7.7"
|
||||
s.version = "0.7.8"
|
||||
s.summary = "PNObject is a simple replica of the more complex ParseObject"
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
@implementation PNAddress
|
||||
|
||||
+ (NSString *) objectClassName {
|
||||
return @"Address";
|
||||
return @"PNAddress";
|
||||
}
|
||||
|
||||
+ (NSString *)objectEndPoint {
|
||||
return @"Address";
|
||||
return @"PNAddress";
|
||||
}
|
||||
|
||||
+ (NSDictionary *) objcetMapping {
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "PNObject.h"
|
||||
#import "PNUser.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, PNInstallationType) {
|
||||
PNInstallationTypeNew = 0,
|
||||
@ -48,7 +49,7 @@ typedef NS_ENUM(NSInteger, PNInstallationType) {
|
||||
///--------------------------------------
|
||||
#pragma mark - PNInstallation Properties
|
||||
///--------------------------------------
|
||||
|
||||
@property (nonatomic, strong, nullable) PNUser *user;
|
||||
/**
|
||||
* <#Description#>
|
||||
*/
|
||||
|
||||
@ -8,6 +8,10 @@
|
||||
|
||||
#import "PNInstallation.h"
|
||||
#import "DJLocalization.h"
|
||||
#import "PNObjectConfig.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@interface PNInstallation() <PNObjectSubclassing>
|
||||
|
||||
@ -28,7 +32,7 @@ static bool isFirstAccess = YES;
|
||||
|
||||
+ (NSDictionary *)objcetMapping {
|
||||
|
||||
NSDictionary *mapping = @{
|
||||
NSDictionary *mapping = @{@"user":@{@"key":@"user",@"type":[[[PNObjectConfig sharedInstance] userSubClass] PNObjClassName]},
|
||||
@"deviceType":@"deviceType",
|
||||
@"deviceModel":@"deviceModel",
|
||||
@"deviceName":@"deviceName",
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
@implementation PNLocation
|
||||
|
||||
+ (NSString *) objectClassName {
|
||||
return @"Location";
|
||||
return @"PNLocation";
|
||||
}
|
||||
|
||||
+(NSString *)objectEndPoint {
|
||||
return @"Location";
|
||||
return @"PNLocation";
|
||||
}
|
||||
|
||||
+ (NSDictionary *) objcetMapping {
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
@implementation PNObjcPassword
|
||||
|
||||
+ (NSString *) objectClassName {
|
||||
return @"Password";
|
||||
return @"PNObjcPassword";
|
||||
}
|
||||
|
||||
+(NSString *)objectEndPoint {
|
||||
return @"Password";
|
||||
return @"PNObjcPassword";
|
||||
}
|
||||
|
||||
+ (NSDictionary *) objcetMapping {
|
||||
|
||||
@ -55,12 +55,16 @@ static bool isFirstAccess = YES;
|
||||
|
||||
- (instancetype)copy
|
||||
{
|
||||
return [[PNUser alloc] init];
|
||||
Class objectClass = NSClassFromString([[self class] PNObjClassName]);
|
||||
|
||||
return [[objectClass alloc] init];
|
||||
}
|
||||
|
||||
- (instancetype)mutableCopy
|
||||
{
|
||||
return [[PNUser alloc] init];
|
||||
Class objectClass = NSClassFromString([[self class] PNObjClassName]);
|
||||
|
||||
return [[objectClass alloc] init];
|
||||
}
|
||||
|
||||
- (instancetype) initForCurrentUser
|
||||
@ -405,7 +409,7 @@ static bool isFirstAccess = YES;
|
||||
@"sex":@"sex",
|
||||
@"birthDate":@"birthDate",
|
||||
@"phone":@"phone",
|
||||
@"password":@{@"key":@"password",@"type":@"PNObjcPassword"},
|
||||
@"password":@{@"key":@"password",@"type":[PNObjcPassword PNObjClassName]},
|
||||
@"hasAcceptedPrivacy":@"hasAcceptedPrivacy",
|
||||
@"hasAcceptedNewsletter":@"hasAcceptedNewsletter",
|
||||
@"hasVerifiedEmail":@"hasVerifiedEmail",
|
||||
|
||||
@ -216,6 +216,7 @@ extern NSString* _Nonnull const Client_Secret;
|
||||
#pragma mark - PNObjectConfig Properties
|
||||
///--------------------------------------
|
||||
|
||||
@property (nonatomic, readonly, nonnull) Class userSubClass;
|
||||
/**
|
||||
* <#Description#>
|
||||
*/
|
||||
|
||||
@ -58,7 +58,7 @@ NSString* const Client_Secret = @"client_secret";
|
||||
@property (nonatomic, strong) NSString *currentOAuthClientSecret;
|
||||
@property (nonatomic, strong) AFOAuth2Manager *authManager;
|
||||
|
||||
@property (nonatomic) Class userSubClass;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user