Last active
December 16, 2015 08:18
-
-
Save kandelakig/5404484 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 <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