Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Framework/Framework/URLTransaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ FOUNDATION_EXPORT double URLTransactionVersionNumber;
FOUNDATION_EXPORT const unsigned char URLTransactionVersionString[];

#import <Helpers/Helpers.h>
#import <CoreData/CoreData.h>
#import <JSONSchema/JSONSchema.h>

extern NSErrorDomain const HTTPErrorDomain;
Expand Down Expand Up @@ -117,7 +116,6 @@ typedef void (^URLRequestHandler)(__kindof NSURLRequest *);

- (instancetype)session:(NSURLSession *)session;
- (instancetype)queue:(NSOperationQueue *)queue;
- (instancetype)moc:(NSManagedObjectContext *)moc;
- (instancetype)info:(id)info;
- (instancetype)blocking:(BOOL)blocking;
- (instancetype)success:(URLRequestHandler)success;
Expand All @@ -129,7 +127,6 @@ typedef void (^URLRequestHandler)(__kindof NSURLRequest *);

@property (class, readonly) NSMutableDictionary<NSString *, NSURLComponents *> *baseComponents;
@property (readonly) NSOperationQueue *queue;
@property (readonly) NSManagedObjectContext *moc;
@property (readonly) id info;
@property (readonly) NSData *data;
@property (readonly) NSHTTPURLResponse *response;
Expand Down Expand Up @@ -158,7 +155,6 @@ typedef void (^URLTransactionHandler)(URLTransaction *);

- (instancetype)session:(NSURLSession *)session;
- (instancetype)queue:(NSOperationQueue *)queue;
- (instancetype)moc:(NSManagedObjectContext *)moc;
- (instancetype)info:(id)info;
- (instancetype)blocking:(BOOL)blocking;
- (instancetype)addRequest:(NSURLRequest *)request;
Expand All @@ -170,7 +166,6 @@ typedef void (^URLTransactionHandler)(URLTransaction *);
- (void)cancel;

@property (readonly) NSOperationQueue *queue;
@property (readonly) NSManagedObjectContext *moc;
@property (readonly) id info;
@property (readonly) NSArray *requests;
@property (readonly) NSError *error;
Expand Down
24 changes: 0 additions & 24 deletions Framework/Framework/URLTransaction.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ @interface NSURLRequest (URLTransactionSelectors)

@property NSURLSession *session;
@property NSOperationQueue *queue;
@property NSManagedObjectContext *moc;
@property BOOL blocking;
@property id info;

Expand Down Expand Up @@ -94,11 +93,6 @@ - (instancetype)queue:(NSOperationQueue *)queue {
return self;
}

- (instancetype)moc:(NSManagedObjectContext *)moc {
self.moc = moc;
return self;
}

- (instancetype)info:(id)info {
self.info = info;
return self;
Expand Down Expand Up @@ -168,14 +162,6 @@ - (NSMutableDictionary *)JSONSchemas {
return objc_getAssociatedObject(self, @selector(JSONSchemas));
}

- (void)setMoc:(NSManagedObjectContext *)moc {
objc_setAssociatedObject(self, @selector(moc), moc, OBJC_ASSOCIATION_RETAIN);
}

- (NSManagedObjectContext *)moc {
return objc_getAssociatedObject(self, @selector(moc));
}

- (void)setInfo:(id)info {
objc_setAssociatedObject(self, @selector(info), info, OBJC_ASSOCIATION_RETAIN);
}
Expand Down Expand Up @@ -336,7 +322,6 @@ @interface URLTransaction ()
@property NSURLSession *session;
@property NSOperationQueue *queue;
@property NSMutableDictionary<NSNumber *, JSONSchema *> *JSONSchemas;
@property NSManagedObjectContext *moc;
@property id info;
@property BOOL blocking;

Expand Down Expand Up @@ -385,11 +370,6 @@ - (instancetype)JSONSchema:(JSONSchema *)schema forStatusCode:(HTTPStatusCode)st
return self;
}

- (instancetype)moc:(NSManagedObjectContext *)moc {
self.moc = moc;
return self;
}

- (instancetype)info:(id)info {
self.info = info;
return self;
Expand Down Expand Up @@ -544,10 +524,6 @@ - (void)prepare {
}
}

if (!request.moc && self.moc) {
request.moc = self.moc;
}

if (!request.info && self.info) {
request.info = self.info;
}
Expand Down