Skip to content

Commit

Permalink
v0.2.8 - Do not use magical record shorthands which causes bogus app …
Browse files Browse the repository at this point in the history
…store rejection
  • Loading branch information
Tony Xiao committed Sep 23, 2014
1 parent 19da5fe commit 30a69f7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CLToolkit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'CLToolkit'
s.version = '0.2.7'
s.version = '0.2.8'
s.summary = 'CLToolkit is a collections of common macros, classes and utilities for Mac / iOS.'
s.homepage = 'https://github.com/collections/CLToolkit'
s.author = { 'Tony Xiao' => '[email protected]' }
Expand Down Expand Up @@ -61,7 +61,7 @@ Pod::Spec.new do |s|

ss.dependency 'CLToolkit/Core'
ss.dependency 'CLToolkit/Operation'
ss.dependency 'MagicalRecord/Shorthand', '~> 2.2'
ss.dependency 'MagicalRecord', '~> 2.2'
ss.dependency 'Base64', '~> 1.0'
end

Expand Down
1 change: 0 additions & 1 deletion CLToolkit/CoreData/CoreData.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#ifndef CLToolkit_CoreData_h
#define CLToolkit_CoreData_h

#define MR_SHORTHAND
#import <CoreData/CoreData.h>
#import <MagicalRecord/CoreData+MagicalRecord.h>
#import "Core.h"
Expand Down
6 changes: 3 additions & 3 deletions CLToolkit/CoreData/MagicalRecord+Reactive.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ - (RACSignal *)performBlockAndSave:(void (^)())block {

- (RACSignal *)saveToPersistentStore {
return [RACSubject mr_subject:^(MRCompletionHandler completionBlock) {
[self saveToPersistentStoreWithCompletion:completionBlock];
[self MR_saveToPersistentStoreWithCompletion:completionBlock];
}];
}

- (RACSignal *)saveOnlySelf {
return [RACSubject mr_subject:^(MRCompletionHandler completionBlock) {
[self saveOnlySelfWithCompletion:completionBlock];
[self MR_saveOnlySelfWithCompletion:completionBlock];
}];
}

- (RACSignal *)saveWithOptions:(MRSaveContextOptions)mask {
return [RACSubject mr_subject:^(MRCompletionHandler completionBlock) {
return [self saveWithOptions:mask completion:completionBlock];
return [self MR_saveWithOptions:mask completion:completionBlock];
}];
}

Expand Down
6 changes: 3 additions & 3 deletions CLToolkit/Firebase/FObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ - (void)bindFirebase {
if (!self->_disposable) return; // Firebase remove observer bug

if (snap.value == [NSNull null])
[self deleteEntity];
[self MR_deleteEntity];
}]];
[disposables addObject:[[self onPrepareDelete] subscribeNext:^(id x) {
[self.ref removeValue];
Expand Down Expand Up @@ -245,7 +245,7 @@ - (void)didTurnIntoFault {
#pragma mark Class Methods

+ (instancetype)findByFPath:(NSString *)fPath {
return [self findByFPath:fPath inContext:[NSManagedObjectContext defaultContext]];
return [self findByFPath:fPath inContext:[NSManagedObjectContext MR_defaultContext]];
}

+ (instancetype)findByFPath:(NSString *)fPath inContext:(NSManagedObjectContext *)context {
Expand All @@ -271,7 +271,7 @@ + (instancetype)findByFPath:(NSString *)fPath inContext:(NSManagedObjectContext
}

+ (NSEntityDescription *)entityForFPath:(NSString *)fPath {
for (NSEntityDescription *entity in [[NSManagedObjectModel defaultManagedObjectModel] entities]) {
for (NSEntityDescription *entity in [[NSManagedObjectModel MR_defaultManagedObjectModel] entities]) {
NSString *entityName = [[entity.name.lowercaseString $append:@"s"] sliceFrom:1];
if ([[fPath sliceFrom:1] hasPrefix:entityName])
return entity;
Expand Down

0 comments on commit 30a69f7

Please sign in to comment.