在我的登录中,我UIPageViewController在末尾包含一个 \xe2\x80\x98primer\xe2\x80\x99 屏幕,用于授权通知。用户将点击标有 \xe2\x80\x9cEnable Notifications\xe2\x80\x9d 的按钮,然后将出现通知权限对话框。我该如何实现这个目标?
permissions notifications objective-c apple-push-notifications ios
Skype新的iOS应用程序允许您回复推送通知,我如何在自己的应用程序中执行此操作?
我是iPhone开发新手,但设法在我的iOS应用程序中接收推送通知.但是,当我轻扫传入的推送通知时,它只会打开应用程序,但不会打开通知的相关帖子.
这是我的代码:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
NSLog(@"Eine Nachricht ist angekommen, während die App aktiv ist");
NSString* alert = [[userInfo objectForKey:@"aps"] objectForKey:@"id"];
NSLog(@"Nachricht: %@", alert);
//This is to inform about new messages when the app is active
//UIApplicationState state = [[UIApplication sharedApplication] applicationState];
//if (state == UIApplicationStateActive) {
// UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Neuer Artikel" message:@"Nachricht" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
// [alertView show];
// }
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSLog(@"Device Token=%@", deviceToken);
NSUInteger theCount = [deviceToken length]; …Run Code Online (Sandbox Code Playgroud)