Tag: 苹果推通知

如何在终止应用程序后运行swift代码

有没有办法运行ios应用程序代码无限长时间,而用户从后台终止我的应用程序? 请帮帮我。 我搜查了很多,但没有find任何适当的解决scheme。

苹果推送通知:不接收设备令牌?

在涉及推送通知的应用程序中,我正在接收设备令牌,但是我的客户端设备没有收到设备令牌(因此导致无法接收推送通知)。 我正在使用Parse推送通知。 这是我在我的AppDelegate : -(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken { // Store the deviceToken in the current installation and save it to Parse. PFInstallation *currentInstallation = [PFInstallation currentInstallation]; [currentInstallation setDeviceTokenFromData:newDeviceToken]; PFACL *objectACL = [[PFACL alloc] init]; [objectACL setPublicReadAccess:YES]; [objectACL setPublicWriteAccess:YES]; [currentInstallation saveInBackground]; } -(void) application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSString *errorString = [NSString stringWithFormat:@"%@", error]; UIAlertView […]

Swiftparsing推送高级定位不发送

遵循Parse高级定位和推送通知的文档仍然没有发送。 (我可以从Parse的控制台接收推送,并启用客户端推送。) let userQuery: PFQuery = PFUser.query()! userQuery.whereKey("objectId", equalTo: "JrePAMWUbm") // The user I am logged in with let pushQuery: PFQuery = PFInstallation.query()! pushQuery.whereKey("user", matchesQuery: userQuery) let push = PFPush() push.setQuery(pushQuery) push.setMessage("Hello, World!") push.sendPushInBackgroundWithBlock { success, error in if success { println("The push succeeded.") } else { println("The push failed.") } } 我不断收到“推送成功”。 但是我看看推送详情,它说“0推送”。 如果我删除userQuery并只使用PFInstallation查询,我收到通知。 […]

苹果推送通知与定期蜂鸣声

iOS上的苹果推送通知有效载荷有一个小而棘手的问题。 从我所知的推送通知有效载荷可以有声音(长度<= 30秒),文本和徽章。 现在,我想要与我的iPhone应用程序是由我的提供商(服务器)发送到iPhone应用程序在iPhone屏幕上的推送通知不断定期(每隔1分钟)蜂鸣,直到用户点击屏幕上的通知(即检查信息)。 因此,通知将不断播放声音,并在用户点击并启动应用程序时停止。 这可行吗? 怎么样? PS:它是一个企业应用程序,不会在App Store上部署。 提前致谢。

在后台自动启动应用程序?

有没有办法在后台坚持一个iOS应用程序,以便在设备打开时自动启动,并在终止后重新启动? 我已经读过voip和gps服务上的几个post。 我的应用程序发送紧急短信与用户的位置。 它需要保持活跃,听取遇险触发器。 是否有可能自动启动应用程序发送推送通知到应用程序使用APNS服务器?

APNS推进工作在前景,但不是背景

是否有可能有前台推送进来,但没有收到推送通知时,应用程序在后台? 我有一些用户报告这个问题,并想知道可能是什么原因。 也许这只是混乱? 如果其他人有同样的问题,请指教我,如果是的话,原因是什么。 谢谢!

如何在多个iOS设备上同步推送通知?

如何在多个iOS设备上同步推送通知? scheme是:用户在两台设备上安装了一个应用程序。 这两个设备都会收到远程通知。 用户在一台设备上打开应用程序。 其他设备上的推送通知应该会消失。 这是由许多应用程序,例如Facebook Messenger,但如何实现? (迅速)

在iOS 7上集成PushWoosh不会在pushwoosh上订阅

如在他们的网站上提到的3个步骤 第1步 – 将推送通知SDK添加到您的项目(完成) 第2步 – 在Info.plist中添加以下Pushwoosh_APPID键和您的Pushwoosh id 第3步 – 在App代理中添加以下代码 #import "PushNotificationManager.h – (void) onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification { NSLog(@"Push notification received"); } 我做了所有这三个简单的步骤,但我没有订阅我的应用程序在PushWoosh。 任何人都可以告诉我,如果我忘了做任何步骤。

用PHP发送IOS批量推送通知的正确方法

我试图发送推送通知在IOS使用PHP有30万设备令牌 我已经写了一个小例程,每次执行例程发送通知到100个设备,1秒后延迟例程再次执行,并通知发送到下一100个设备,例程如下 $body['aps'] = array('alert' => 'Energy is full', 'sound' => 'default', 'badge' => '0' ); $url = 'ssl://gateway.push.apple.com:2195'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'ProductionCertificate.pem'); stream_context_set_option($ctx, 'ssl', 'passphrase', 'my pass phrase'); stream_context_set_option($ctx, 'ssl', 'cafile', 'trusted_ca.cer'); $fp = stream_socket_client($url, $err, $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx); if (!$fp) { return -1;} foreach($OneHundredTokens as $deviceToken) { $payload = […]

交互式推送通知 – 隐藏/显示button

我按照本教程在推送通知上显示button。 通过在didFinishLaunchingWithOptions调用registerNotification来注册button。 但是,在less数情况下,我需要显示一个简单的通知没有任何button。 如何显示/隐藏不同通知的button?