apple-push-notifications

Apple Push Notification not working on shared server

╄→гoц情女王★ 提交于 2019-12-01 06:05:11
问题 I want to send APN (Apple Push Notification) from PHP script. My PHP script is working fine and I receive notification in the iphone device as well when sending from localhost but when I upload the same script with same .pem file to the shared server it returns error... Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused) in /mypath/SendPushNotification.php on line 28 Failed to connect: 111 Connection

Display image in notification bar with remote notification(Rich media push notification) in iOS 10

自古美人都是妖i 提交于 2019-12-01 06:01:15
I have integrated APNS and want to display image in remote notification like below; I have used below code with reference link ; AppDelegate.h #import <UserNotifications/UserNotifications.h> @interface AppDelegate : UIResponder <UIApplicationDelegate,UNUserNotificationCenterDelegate> AppDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self registerForRemoteNotification]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; UIViewController *vc1 = [storyboard

iPhone push-notification works in sandbox but not in production mode

六眼飞鱼酱① 提交于 2019-12-01 05:44:58
As the title says, I have an app with built in APNS. It does work perfectly in Sandbox-mode. But in production-mode, it fails miserably. It seems that I have the right certificates on the server, because I don't get an error back from the APNS-Service. Everything seems to work fine. I am using ApnsPHP by Aldo Armiento. It has a built-in function to spit out the results from the APNS-Server. When I try to use the Sandbox with the app from the store, I get - as expected - an invalid-token-error (since tokens from sandbox and production are different). When I use the production-certificate with

does my app display second time notification iOS 9

99封情书 提交于 2019-12-01 05:35:08
I am receiving the duplicate Notification. for both Remote notification and Local notifications. I have used the following code [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]]; if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0){ [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)

Push notifications aren't send to some devices [closed]

浪子不回头ぞ 提交于 2019-12-01 05:04:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm having a very strange behavior in my push notification service. I'm testing a new application in 20 devices but I have 3 devices that doesn't receive any push notification. I have my own server here a manage the push subscription, and in this service I have the tokens of these devices. But the strange thing,

Does iOS 13 has new way of getting device notification token?

落爺英雄遲暮 提交于 2019-12-01 04:34:46
So my friend got this email from OneSignal Due to a change that may occur as part of the upcoming iOS 13 release, you must update to the latest version of the iOS SDK before building your app with Xcode 11. All of OneSignal’s wrapper SDKs including React Native, Unity, and Flutter have been updated as well. The reason for this is that Xcode 11, which is being released alongside iOS 13, breaks a common technique that apps and libraries like OneSignal were using to get a push token for the device. If you do not use our new SDK then new users will not be able to subscribe to notifications from

Firebase silent notification does not start up a closed iOS app

[亡魂溺海] 提交于 2019-12-01 03:59:38
Can FCM silent notification start up a closed iOS app? Request Type: POST Request URL: https://fcm.googleapis.com/fcm/send Request Headers: Authorization -> key=MY_KEY Content-Type -> application/json Request Body: { "to": "/topics/my_topic", "content_available": true, "data": { "contentAvailable": 1 }, "priority": 10 } However, this payload does not start up my iOS app if the user closes it. How to make the iOS to start my app whenever a silent notification is received? It's the expected behavior to not launch the app. I mean why should it? The user for some reason has decided to kill the app

does my app display second time notification iOS 9

强颜欢笑 提交于 2019-12-01 03:54:09
问题 I am receiving the duplicate Notification. for both Remote notification and Local notifications. I have used the following code [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]]; if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0){ [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings

#ifdef __IPHONE_8_0 code runs also on iOS 7

倾然丶 夕夏残阳落幕 提交于 2019-12-01 03:16:21
I've got the following code in my app - and I see some crashes on iOS 7 in the line with the comment. + (void)registerDeviceForRemoteNotifications { #if !TARGET_IPHONE_SIMULATOR if ([[KOAAuthenticator sharedAuthenticator] currentUser] != nil) { UIApplication *sharedApplication = [UIApplication sharedApplication]; #ifdef __IPHONE_8_0 [sharedApplication registerForRemoteNotifications]; // <--- CRASH HERE #else [sharedApplication registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert]; #endif } #endif } Crashlytics says: -

How to use APNs Auth Key (.p8 file) in C#?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 03:13:43
I'm trying to send push notifications to iOS devices, using token-based authentication. As required, I generated an APNs Auth Key in Apple's Dev Portal, and downloaded it (it's a file with p8 extension). To send push notifications from my C# server, I need to somehow use this p8 file to sign my JWT tokens. How do I do that? I tried to load the file to X509Certificate2, but X509Certificate2 doesn't seem to accept p8 files, so then I tried to convert the file to pfx/p12, but couldn't find a way to do that that actually works. I found a way to do that, using BouncyCastle : private static CngKey