Skip to content

Instantly share code, notes, and snippets.

@kandelakig
Last active December 16, 2015 08:18
Show Gist options
  • Save kandelakig/5404484 to your computer and use it in GitHub Desktop.
Save kandelakig/5404484 to your computer and use it in GitHub Desktop.
#import <WindowsAzureMobileServices/WindowsAzureMobileServices.h>
MSClient *client = [MSClient clientWithApplicationURLString:@"https://lmd-kitesurfer-pusher.azure-mobile.net/"
withApplicationKey:@"JzGucSijyOsYJDehJGJIGFCzJiujhR38"];
NSDictionary *input = @{
@"alert": @"Hey looser! I've just beat your highscore! :-P", // Notification text
@"sound": @"default", // Always send "default"
@"filters": @{
@"devices": @[@"88888888 88888888 ... . . . .", @"12345678 90abcdef ... . . . ."] // Device token list
},
@"payload": @{ // Any custom dictionary
@"foo": @"bar"
}
};
MSTable *pushRequestsTable = [azureClient getTable:@"pushRequests"];
[pushRequestsTable insert:input completion:^(NSDictionary *response, NSError *error) {
if (error) {
// Handle error . . .
} else {
// Process response . . .
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment