apple-push-notifications

ios - local notification not updating badge number when application is closed

╄→гoц情女王★ 提交于 2019-12-13 12:27:00
问题 I have noticed that when a local notification is being received in an ios device, the notification appears in the Notification Center but the app badge number is not updated when the app is closed. I need to touch the notification in the Notification Center for the local push message to be transferred to the app. Is this the normal behavior? Can this be solved by using remote push notifications? 回答1: You can utilize the applicationIconBadgeNumber parameter in a UILocalNotification object.

how to make iPhone app asks to register device for push notification multiple times

白昼怎懂夜的黑 提交于 2019-12-13 11:36:30
问题 I have used the following code to register my app to receive push notification, and I got the alert that asks me to register for push notification and I accidentally press cancel. Now I want to have the alert again so I can fire the delegate method in order to get the device token. But I don't get this alert any more and every time I open the settings I found that the notification is turned off for the app. I tried to delete the app from device, change app version, delete testing profile

PHP not using SSL certificate

谁说我不能喝 提交于 2019-12-13 10:23:00
问题 I am trying to use a feedback.php file to remove inactive devices from my database. I have the script working for now code: <?php # -*- coding: utf-8 -*- ## ## Copyright (c) 2010 Benjamin Ortuzar Seconde <bortuzar@gmail.com> ## ## This file is part of APNS. ## ## APNS is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as ## published by the Free Software Foundation, either version 3 of ## the License, or (at your option) any

Handle Push Notification when the App is off, or without opening the App at all - iOS

倖福魔咒の 提交于 2019-12-13 08:34:21
问题 I'm building a Push Notification platform with Amazon SNS, using Amazon Cognito and other Amazon AWS tools, so far working flawlessly. But my App is multi-language, so I'm trying to send just 1 single push message with a dictionary within the payload, this dictionary will contain an array with all the languages that I'm supporting. So I just don't want to simply handle the message, what I'm intending is to do not show the push message at all before selecting the proper language that should

My app display name is different with name in notification center

孤人 提交于 2019-12-13 05:49:14
问题 My bundle is like sophia.music, but I changed my display name in Bundle display name to "音乐" and it works ok. But, when I receive a notification, I check the notification on the notification center it still shows music. How can I change it? Any comments? 回答1: Follow the below steps to change the name: Go to target settings Select Build settings Search "product name". It is available under Packaging header Write your name here 回答2: For changing app name set CFBundleDisplayName value in info

go tls connection to apple push notification server is not working

本秂侑毒 提交于 2019-12-13 05:39:02
问题 My code look like below package main import ( "crypto/tls" "crypto/x509" "log" "io/ioutil" ) func main() { c := "pub.pem" p := "pri.pem" cert, err := tls.LoadX509KeyPair(c, p) if err != nil { log.Fatalf("server: loadkeys: %s", err) } pemData2, err := ioutil.ReadFile("entrust.pem") if err != nil { log.Fatalf("cant read ca cert: %s", err) } cacerts := x509.NewCertPool() cacerts.AppendCertsFromPEM(pemData2) config := tls.Config{Certificates: []tls.Certificate{cert}, RootCAs: cacerts} conn, err :

500 Error when sending a lot of push notifications, PHP?

爱⌒轻易说出口 提交于 2019-12-13 05:12:30
问题 I'm using the following code to cycle through a database containing the device ID's that my ios app collects. At around 300 or so notifications my server freezes in a 500 error. Any ideas how I can do this more efficiently? I am on a shared server; would my only option be to set this up on a dedicated machine? php.ini has the following set - set_time_limit = 999999999 max_execution_time = 999999999 memory_limit = 512M Here's the code - if(isset($_POST['pushNotify'])){ /// PROCESS PUSH

Azure Notification Hub: notifications not showing up if sent to group

帅比萌擦擦* 提交于 2019-12-13 04:43:57
问题 I have a trouble making notification hub to work. If I send notification to tag that has only one registration associated with it, then everything's fine. Here's source: var alert = "{\"aps\":{\"alert\":\"some message(targeted)\"},\"inAppMessage\": \"text\"}"; hub.SendAppleNativeNotificationAsync(alert,"mytag").ContinueWith(t => { var outcome = t.Result; Console.WriteLine(outcome); }); But if I try to sent my notification to all users, like so: var alert = "{\"aps\":{\"alert\":\"some message

Firebase iOS receive data from push notification

三世轮回 提交于 2019-12-13 04:43:31
问题 I am currently attempting to send a notification through firebase to iOS which contains data which I would like to save to a variable. My server is pushing a notification which my phone receives, and the notification contains topic_name, message_body, data_message, sound . All of which work, although I am confused as to how I can access the data. Essentially, I want to save the sent data to a variable. How would I go about doing this? 回答1: payload like this { "aps" : { "alert" : "Notification

Preform function inside ViewController from AppDelegate

感情迁移 提交于 2019-12-13 04:29:07
问题 Can an AppDelegate run a "function" in a viewcontroller on receipt of a push notification? The application contains three tabs, the third needs to reload its webview when the application gets a push notification. - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { } 回答1: yes, you need to register your viewController for the particular notification, e.g in your case when you receive a remote notification, just post a custom notification and