Tag: 苹果推通知

生成推送通知SSL证书和提供使用新的苹果面板的发展?

使用这个链接,我尝试做推送通知应用程序。 但是,这使用旧的苹果面板来生成SSL和提供证书。 任何一个生成ssl和提供使用新的苹果面板? 下面的步骤来生成ck.pem 1)$ openssl x509 -in aps_developer_identity.cer -inform der -out PushChatCert.pem 2)$ openssl pkcs12 -nocerts -out PushChatKey.pem -in PushChatKey.p12 input导入密码: MACvalidationOK inputPEM密码短语: validation – inputPEM密码短语: 3)$ cat PushChatCert.pem PushChatKey.pem> ck.pem 4)$ telnet gateway.sandbox.push.apple.com 2195 尝试17.172.232.226 … 连接到gateway.sandbox.push-apple.com.akadns.net。 转义字符是'^]'。 这是正确的一步吗? 请帮帮我…… 谢谢

有没有办法调用saveCurrentTurnWithMatchData而不发送推送通知?

我有一个游戏中心游戏,让玩家每回合多次移动。 在iOS 6中,苹果公司在saveCurrentTurnWithMatchData中实现了一个很棒的function,它可以让你做到这一点 – 它将数据保存到游戏中心,防止通过反复重做移动来作弊,而不会前进到下一个玩家。 问题是,我发现这实际上触发了相同的推送通知,当玩家结束时发送。 所以游戏中的其他玩家会在应用程序的图标上看到一个徽章,并错误地认为这是轮到他们的时候。 有没有人find一个解决方法呢? 任何方式调用saveCurrentTurnWithMatchData而不发送推送通知? 如果不是,这似乎是一个应该引起苹果关注的devise缺陷。

推送通知:didFailToRegister和didRegister委托没有调用

我正在创build一个支持推送通知的应用程序 我正在遵循所有的步骤。 它给模拟器上的错误 Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo=0x5813d20 {NSLocalizedDescription=remote notifications are not supported in the simulator} 但在设备上它不会调用委托方法 didFailToRegisterForRemoteNotificationsWithError didRegisterForRemoteNotificationsWithDeviceToken 我的代码: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; NSLog(@"application didFinishLaunchingWithOptions"); // Override point for customization after application launch. […]

推送通知applicationIconBadgeNumber在ios7中不更新

我在应用程序委托中使用以下代码来接收远程通知,但是它的applicationIconBadgeNumber(在应用程序图标的左上angular以红色/白色出现)不会在后台应用程序中更新。 当收到的推送通知出现在幻灯片animation屏幕的上angular时,在通知载荷中徽章计数完美地从服务器端进行。 在didFinishLaunchingWithOptions我把下面的代码 [application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; 代表远程通知: – (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSString *deviceTokenTrimmed = [[[[deviceToken description] stringByReplacingOccurrencesOfString:@"<"withString:@""] stringByReplacingOccurrencesOfString:@">" withString:@""] stringByReplacingOccurrencesOfString: @" " withString: @""]; currentdeviceToken=deviceTokenTrimmed; [[NSUserDefaults standardUserDefaults] setValue:deviceTokenTrimmed forKey:@"pushtoken"]; NSLog(@"Device Token didRegisterForRemoteNotificationsWithDeviceToken : %@",deviceTokenTrimmed); } – (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSLog(@"Device Token in FailToRegister RemoteNotifications ERROR %@",error); } – […]

仅在使用生产证书时无法注册推送通知

使用开发证书时,推送通知工作正常。 当我在专门分配中切换到生产证书时,应用程序无法注册推送通知。 在UIApplicationDelegate中,既不didRegisterForRemoteNotificationsWithDeviceToken也不didFailToRegisterForRemoteNotificationsWithError 。 另外当我看了一下设备日志,我发现这个: Sep 30 12:47:09 Heshams-iPad amfid[483] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile Sep 30 12:47:09 Heshams-iPad amfid[483] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile Sep 30 12:47:09 Heshams-iPad amfid[483] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile Sep 30 […]

APNs证书在login钥匙串中看起来不同

我正在生成一些替代APNs服务器证书,我很担心,因为当我把它们拖入钥匙串login时,他们看起来不一样。 证书看起来像这样: Apple Production IOS Push Services: com.mycompany.myproduct 但现在他们看起来像 Apple Production IOS Push Services: AB12C3DEF4;AB12C3DEF4 其中“AB12C3DEF4”是应用程序前缀。 有没有人看到这个? 如果您最近已经生成了APN证书,是否看起来像这样? 自从苹果改变了他们的证书界面以来,这是我第一次做这样的一代。

如何更新IOS推送通知中的徽章号码?

我最近使用亚马逊SNS推送我的IOS应用程序的通知。 它运作良好,我遇到的唯一问题是当我收到通知,徽章号码将不会更新,这里是我如何实现: 首先我按照这里的例子https://aws.amazon.com/articles/9156883257507082这里是教程中的示例代码。 – (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { application.applicationIconBadgeNumber = 0; NSString *msg = [NSString stringWithFormat:@"%@", userInfo]; NSLog(@"%@",msg); [[Constants universalAlertsWithTitle:@"Push Notification Received" andMessage:msg] show]; } -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //Register for push notification application.applicationIconBadgeNumber = 0; [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; if(launchOptions!=nil){ NSString *msg = [NSString stringWithFormat:@"%@", launchOptions]; NSLog(@"%@",msg); [[Constants […]

iOs推送通知

有没有办法知道在设备上,或通过使用苹果反馈服务的使用已经超前,并通过进入设置 – >通知 – > MyAppclosures通知closures特定的应用程序,并closures所有的东西? 我需要一个编程的方式来做到这一点,无论是在设备itsels使用Objective-C或通过使用推送反馈服务。 谢谢大家。

打开通知到特定的视图

我正在使用推送通知在Swift上开发一个应用程序。 到目前为止,我的AppDelegate中有以下代码: func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { println("Received alert and opened it") debugPrintln(userInfo) if application.applicationState == UIApplicationState.Active { // App in foreground println("App in foreground already") } else { // App in background if let tripId = (userInfo["trip"] as? String)?.toInt() { println(tripId) Trips.load(tripId) { (responseCode, trip) in debugPrintln("Got the trip") if […]

如何在iOS中注册GCM

我似乎无法得到GCM推送通知的工作。 我的问题是我不知道如何从GCM获得注册ID。 我可以从APN获得一个令牌。 但我不确定接下来要做什么。 我试着按照教程,但它不是真的为我工作。 我是一个初学者,所以请明确。 我问的是,从APN获得一个令牌之后,我该怎么办? 提前致谢。 https://developers.google.com/cloud-messaging/ios/client