Skip to content

Commit

Permalink
docummented iOS quirks
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrebnov committed Mar 18, 2014
1 parent 6736d78 commit 3ed7749
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,27 @@ Exposes Windows Azure [Notification Hubs](http://www.windowsazure.com/en-us/serv
hub.onPushNotificationReceived = function (msg) {
console.log("Push Notification received: " + msg);
};;


### Platform Quirks ###
**iOS**

On iOS the following code must be manually added to AppDelegate.m in order to have plugin to functional correctly.
~~~
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *) deviceToken
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidRegisterForRemoteNotifications" object:deviceToken];
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidFailToRegisterForRemoteNotifications" object:error];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidReceiveRemoteNotification" object:userInfo];
}
~~~~
### Copyrights ###
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 3ed7749

Please sign in to comment.