This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void) scheduleRequest:(id<SODataRequestParam>)request completionHandler:(void(^)(NSArray *entities, id<SODataRequestExecution>requestExecution, NSError *error))completion | |
| NSString *finishedSubscription = [NSString stringWithFormat:@"%@.%@", kRequestDelegateFinished, request]; | |
| [[NSNotificationCenter defaultCenter] addObserverForName:finishedSubscription | |
| object:nil | |
| queue:[NSOperationQueue mainQueue] | |
| usingBlock:^(NSNotification *note) { | |
| id<SODataRequestExecution>requestExecution = note.object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)createEntity:(id<SODataEntity>) entity withCompletion:(void(^)(BOOL success))completion; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "ODataStore.h" | |
| #import "SODataStore.h" | |
| #import "SODataStoreSync.h" | |
| #import "SODataStoreAsync.h" | |
| #import "Framework-Constants.h" | |
| @interface DataController : NSObject | |
| @property (nonatomic, assign) WorkingModes workingMode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(id<ODataStore>)storeForRequestToResourcePath:(NSString *)resourcePath | |
| { | |
| /* | |
| First, test if mode is online- or offline-only anyway. | |
| */ | |
| if (self.workingMode == WorkingModeOnline) { | |
| return self.networkStore; | |
| } else if (self.workingMode == WorkingModeOffline) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)fetchContactsWithCompletion:(void(^)(NSArray *entities))completion { | |
| NSString *resourcePath = @"ContactCollection; | |
| [self scheduleRequestForResource:resourcePath withMode:SODataRequestModeRead withEntity:nil withCompletion:^(NSArray *entities, id<SODataRequestExecution> requestExecution, NSError *error) { | |
| if (entities) { | |
| NSMutableArray *completeEntities = [[NSMutableArray alloc] init]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)fetchContactsWithCompletion:(void(^)(NSArray *entities))completion { | |
| NSString *resourcePath = @"ContactCollection?$filter=length(company) gt 0 and length(function) gt 0"; | |
| [self scheduleRequestForResource:resourcePath withMode:SODataRequestModeRead withEntity:nil withCompletion:^(NSArray *entities, id<SODataRequestExecution> requestExecution, NSError *error) { | |
| if (entities) { | |
| completion(entities); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "links" : [ | |
| {"source": "5530bcc5298d000e396ff280", "target": "5530bd47298d000e396ff281"}, | |
| {"source": "5530bd47298d000e396ff281", "target": "5530bd83298d000e396ff282"}, | |
| {"source": "5530bd47298d000e396ff281", "target": "5530bdcb298d000e396ff283"}, | |
| {"source": "5530bd83298d000e396ff282", "target": "5530be68298d000e396ff285"}, | |
| {"source": "5530bdcb298d000e396ff283", "target": "5530bd83298d000e396ff282"}, | |
| {"source": "5530bdcb298d000e396ff283", "target": "5530be28298d000e396ff284"}, | |
| {"source": "5530be28298d000e396ff284", "target": "5530bd83298d000e396ff282"}, | |
| {"source": "5530be28298d000e396ff284", "target": "5530be93298d000e396ff286"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Switch to older version (e.g.: v0.10.39) | |
| sudo n 0.10.39 | |
| # install : node-v0.10.39 | |
| # mkdir : /usr/local/n/versions/node/0.10.39 | |
| # fetch : https://nodejs.org/dist/v0.10.39/node-v0.10.39-darwin-x64.tar.gz | |
| # installed : v0.10.39 | |
| # Switch to current version | |
| sudo n stable | |
| # install : node-v0.12.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iPhoneSE: portrait UIEdgeInsets(top: 0.0, left: 16.0, bottom: 0.0, right: 16.0) // compact | |
| iPhoneSE: landscape UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact | |
| iPhone6s: portrait UIEdgeInsets(top: 0.0, left: 16.0, bottom: 0.0, right: 16.0) // compact | |
| iPhone6s: landscape UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact | |
| iPhone6sPlus: portrait UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact | |
| iPhone6sPlus: landscape UIEdgeInsets(top: 0.0, left: 32.0, bottom: 0.0, right: 32.0) // regular | |
| iPhone7: portrait UIEdgeInsets(top: 0.0, left: 16.0, bottom: 0.0, right: 16.0) // compact | |
| iPhone7: landscape UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact | |
| iPhone7Plus: portrait UIEdgeInsets(top: 0.0, left: 20.0, bottom: 0.0, right: 20.0) // compact | |
| iPhone7Plus: landscape UIEdgeInsets(top: 0.0, left: 32.0, bottom: 0.0, right: 32.0) // regular |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0"> | |
| <edmx:DataServices> | |
| <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Microsoft.OData.SampleService.Models.TripPin"> | |
| <EnumType Name="PersonGender"> | |
| <Member Name="Male" Value="0"/> | |
| <Member Name="Female" Value="1"/> | |
| <Member Name="Unknown" Value="2"/> | |
| </EnumType> | |
| <ComplexType Name="City"> |