apple-push-notifications

Time based iOS Auto Start

三世轮回 提交于 2019-12-13 04:25:12
问题 I am trying to build an iOS app that aids in Ecological Momentary Assessment of Patients. Basically it is a simple survey app that the patients need to take thrice a day. I am new to iOS development and thus I cannot take some design decisions, I would really appreciate if some of you could look at these design decisions and let me know if it is possible in an iOS app. I want the patients to take these surveys thrice a day after their Breakfast, Lunch and Dinner. So I want my app to auto

Passbook Update Push not shown on Lockscreen

牧云@^-^@ 提交于 2019-12-13 04:24:02
问题 I am playing with apples Passbook service. I have a really strange behaviour on all devices. If I send a push via APNS to the device to let them know that there is a update for a certain pass they do the update but they do not show any notification on the Lockscreen on the device. Right now I am logging the whole communication between my PHP-Webservice and the APNS. I always answer with headre 200, and the requested answer. (1st Serials; 2nd Pass.pkpass) and the device does the update as I

Hide, do not display remote notification from code (swift)

给你一囗甜甜゛ 提交于 2019-12-13 04:09:35
问题 is it possible to do not display or even cancel remote notification after receive it on device from code? Regards, Radek 回答1: So I will send silent push notification from my server and then based on payload I will show or not local notification alert with sound. What do you think? I know how to clear existing notifications but I mean cancel before this notification appears in UI. Maybe I was not so precise in my question. Tx for help. 来源: https://stackoverflow.com/questions/32432628/hide-do

UNNotificationServiceExtension not working on iPhone 5 (iOS 10)

人走茶凉 提交于 2019-12-13 03:49:57
问题 I am not able to intercept push notification via UNNotificationServiceExtension on iPhone 5 running on iOS 10. The mutable-content flag is set as 1 inside the aps in payload. The same notification is getting intercepted in the extension for iPhone 6S. Is Notification Service app extension not supported on iPhone5(because of 32-bit maybe)? I have looked at the documentation and it is no where mentioned that it will work only on specific devices. Asked the same question in Apple Developer forum

Push Notifications: I almost always get “Connection failed” but it worked few times

大城市里の小女人 提交于 2019-12-13 03:23:17
问题 I'm testing an iPhone app with push notifications. In the last 5 days I got it working few times (and it usually worked for consecutive notifications in a range of time of few minutes). Instead I almost always get the error message: "Connection failed". Since it worked few times, I assume the code to be correct, and the certificates valid as well. So I have no clue how to solve this. I've also tried to connect multiple times with the following code: $ctx = stream_context_create(); stream

PushSharp APNS Service Stop working after windows shutdown

放肆的年华 提交于 2019-12-13 02:31:53
问题 I can send notifications to my iPhone device succeffully using Push Sharp via sandbox APNS server but I am having a problem. I have generated .cer and .p12 files and then installed them on my windows 8 development machine successfully. I used this tutorial to install the certificates on my windows 8 machine. Yesterday things were working fine and I was sending the notification successfully. I shutdown my system and then next day when I try to run the code I was getting following exception:

Apple Push Notification Service on user response

跟風遠走 提交于 2019-12-13 01:56:57
问题 Is there a way to track user response (the choice between the 'View' and 'Close') when the message has been push into the user device? Thank you. 回答1: Your app is not notified if the user clicks "Close"; but if the user clicks "View", your app is launched, and you can detect that it was launched from a notification -- the notification's payload is passed to application:didFinishLaunchingWithOptions:. Also, don't forget about the case where your app might already be running when the

How do I know if user didn't allow push notifications

陌路散爱 提交于 2019-12-13 01:28:18
问题 I saw this question but didn't understand if there is a clear answer. I can tell if the user pressed "don't allow" on the SECOND launch of the app by setting a flag: BOOL didRequest = [[NSUserDefaults standardUserDefaults] boolForKey:@"DidRequestPushNotifications"]; UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; if (types == UIRemoteNotificationTypeNone && didRequest) { [self showAlertToUserToEnableRemoteNotificationsOnDeviceInSettings]; }

Critical outcome when sending push notification from our server

ぐ巨炮叔叔 提交于 2019-12-13 00:34:30
问题 We have an app on appstore, and with registered push notifications. They have successfully worked all the time, but we now tried to send a 'global' push, and something weird happened. This is what we have in our server-side .php file: //Loop through tokens in tokenArray $i = 0; $t = 0; foreach($tokenArray as $token) { $t++; // Make notification $msg = chr(0) . pack('n', 32) . pack('H*', $token) . pack('n', strlen($payload)) . $payload; // Send $result; if($message != null) { $result = fwrite(

Push notifications not working after generating new certificate

和自甴很熟 提交于 2019-12-12 23:34:14
问题 My app was configured to use push notifications and was working fine. My certificate expired and another of the team members created a new cert and sent me the p12 file to use. Got the certificate and updated the mobileprovision to use this new certificate. I also regenerated the pem files for push notification. But now my push notifications don't work. I tried generating the pem files twice already but apns wouldn't work. Can someone let me know what the issue could be? Thanks. 回答1: Take in