apple-push-notifications

iOS push notification not working using PHP

流过昼夜 提交于 2019-12-22 12:27:06
问题 I am trying to implement push notification in iOS in PHP using APNS library. Here is my code : <?php // Put your device token here (without spaces): $deviceToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; // Put your private key's passphrase here: $passphrase = 'XXXXXX'; // Put your alert message here: $message = 'My first push notification!'; //////////////////////////////////////////////////////////////////////////////// $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local

Remotely remove previously sent notification

烂漫一生 提交于 2019-12-22 12:19:31
问题 Since iOS 10 and UNUserNotificationCenter , a lot of things can be achieved with notifications, but I can't figure out how to remotely remove a push notification every time . Using the mutable-content attribute, I'm able to modify the content of my push notification. But let's say I want to remove it later (the content has expired). I used content-available and then the following code: UNUserNotificationCenter.current() .removeDeliveredNotifications(withIdentifiers: [xxx]) It almost works,

Can you mute incoming Push Notifications from the App side [iOS]

孤街醉人 提交于 2019-12-22 12:09:06
问题 I am making an app that uses Apples Push Notifications. I want to be able to have an "off duty" mode, in which the push notification is still received, but no sound is played when it comes in. Is there a way to mute these push notifications from inside the app? I know I can simply not send the sound from the JSON message, but it would be easier if I could do it from inside the app. I want to still receive the notifications, so I don't want to unregister from push notifications 回答1: If your

Push notifications to various devices through a common code

自作多情 提交于 2019-12-22 10:59:51
问题 I have a requirement which is that I have to push the messages to various users who are using android or iphone devices.I know the individual process to send the push notification to android or iphone application. Now my work is that I need to do the server side implementation in java so that messages can be sent to android and iphone devices.The number of users using the andrioid and iphone devices is large say 10000 people. So to implement this requirement What should be the approach. What

Open view controller when APNS is received in iOS

夙愿已清 提交于 2019-12-22 10:38:21
问题 Hey I'm new to iPhone and I have been trying to use an Apple push notification. Basically, what I want to do is that when user clicks on the received push notification message, then i need to open a specific view controller. I have added custom data with key parameter "type" to my payload JSON, so on behalf of notification type value i need to open particular view controller instead of the main view controller. here is my payload JSON : {"aps":{"alert":"This is testing message","type":"Notify

How to update the badge number in IOS push notification?

﹥>﹥吖頭↗ 提交于 2019-12-22 10:34:36
问题 I recently use the Amazon SNS to push notification for my IOS app. It works well, the only problem I have encountered is when I receive the notification , the badge number will not be updated, here is how I implement: First I follow the example here https://aws.amazon.com/articles/9156883257507082 Here is the example code from the tutorial. - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { application.applicationIconBadgeNumber = 0;

iPhone 6 doesn't receive push notification

拥有回忆 提交于 2019-12-22 10:03:15
问题 I'm trying to send push notification to my app running on iOS 8. I have two devices; one is iPad 2 with iOS 8 and another one is iPhone 6+. Exactly the same app running on two devices and I'm using the same php script to send push notification. I'm using following objective c code to allow push notification. if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)]) { UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes

iOS 6: update view after push notification was received, but app was closed

ぐ巨炮叔叔 提交于 2019-12-22 09:37:19
问题 After the app receives a push notification, I'd like to change titles of some buttons on my main ViewController . To achieve this behavior, I overwrote in my app delegate the method application: didReceiveRemoteNotification: to re-instantiate the UINavigationController with the controller I'd like to update as its root view controller, setting the buttons' titles to whatever I want: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {

iOS Push Notification - How many can I send from my server in a minute?

匆匆过客 提交于 2019-12-22 08:53:14
问题 I'm planning to update my app with push support. I connect to the Apple server with a php script and send all the pushs at once, the close the connection. How many can I send in a minute? Do you guys have any experience with that? All the best, John PS: Can you recommend pushwoosh.com or urbanairship.com ? How fast do they deliver Pushs? 回答1: Here's what Apple say regarding push speed in their Technical Note : Push Notification Throughput and Error Checking There are no caps or batch size

Keep receiving iOS push notifications after disabling them in settings app

╄→гoц情女王★ 提交于 2019-12-22 08:34:17
问题 During the testing of remote push notifications in my App I faced some strange behavior: I keep getting notifications even if I turn off the "notifications enabled" for my application option in settings App. Is that normal? Should my App unsubscribe from getting notifications itself after disabling that option, or it is response of iOS? Or should I do something special when registering for remote notifications? Or maybe its normal for "sandbox" notifications? Tested on iOS 5.1 on iPhone 4.