-
-
Save marcweil/8756b2b894f4478c060f to your computer and use it in GitHub Desktop.
This file contains 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 <CloudMine/CloudMine.h> |
This file contains 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
var myObject = CMObject(objectId: "mycar") |
This file contains 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
CMStore *store = [CMStore defaultStore]; | |
[store allObjectsWithOptions:nil | |
callback:^(CMObjectFetchResponse *response) { | |
NSLog(@"Objects: %@", response.objects); | |
} | |
]; |
This file contains 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
CMStore.defaultStore().allObjectsWithOptions(nil, callback: { | |
response : CMObjectFetchResponse!) -> Void in | |
NSLog("Fetched: %@", response.objects); | |
}) |
This file contains 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
[mycar save:^(CMObjectUploadResponse *response) { | |
NSLog(@"Status: %@", [response.uploadStatuses objectForKey:mycar.objectId]); | |
}]; |
This file contains 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
myObject.save { | |
(response : CMObjectUploadResponse!) -> Void in | |
NSLog("Object was uploaded successfully! %@", response.uploadStatuses) | |
} |
This file contains 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
myObject.save { | |
response in NSLog("Object was uploaded successfully! %@", response.uploadStatuses) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have sample code on loginWithCallback in swift? I've been trying the sample code in objective c and converted it in Swift, been having an error.