- Implement code for requesting APNS(push notification) easily.
- iOS 7.0 or later
WZPushNotificationRequest is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "WZPushNotificationRequest"
Import header
#import <WZPushNotificationRequest/WZPushNotificationRequest.h>"
After import, call
[WZPushNotificationRequest requestPermission];
This will request permission for receiving push notification.
In your AppDelegate.m
If success:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
If error:
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
Weber, weberlolz.1111@gmail.com
WZPushNotificationRequest is available under the MIT license. See the LICENSE file for more info.