apple-push-notifications
Handling Push Notifications when App is NOT running
When your app is not running or killed and you tap on push notification this function will trigger; – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions so you should handle it like this, UILocalNotification *localNotif = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; if (localNotif) { NSString *json = [localNotif valueForKey:@”data”]; // Parse your string to dictionary }
Missing Push Notification Entitlement
I am pretty certain that it is a bug in Apples checking system. I uploaded an app yesterday and got this message. This app has been updated at least 30 times without any problems. I didn’t add any push notification code in the last version and I don’t use any frameworks like PhoneGap or Cordova … Read more
SwiftUI – Open a specific View when user opens a Push Notification
You need some sort of shared state that you can modify that SwiftUI knows to react to. An ObservableObject is perfect for this: class AppState: ObservableObject { static let shared = AppState() @Published var pageToNavigationTo : String? } Then, to listen to it and respond to it, you can do a couple different methods in … Read more
How to write an Apple Push Notification Provider in C#?
Working code example: int port = 2195; String hostname = “gateway.sandbox.push.apple.com”; //load certificate string certificatePath = @”cert.p12″; string certificatePassword = “”; X509Certificate2 clientCertificate = new X509Certificate2(certificatePath, certificatePassword); X509Certificate2Collection certificatesCollection = new X509Certificate2Collection(clientCertificate); TcpClient client = new TcpClient(hostname, port); SslStream sslStream = new SslStream( client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null ); try { sslStream.AuthenticateAsClient(hostname, certificatesCollection, SslProtocols.Tls, true); … Read more
How do I send a HTTP/2 POST request in PHP
The CURL extension for PHP >= 5.5.24 has support for HTTP/2. (since this commit) You also need a libcurl installed — the underlying library that the curl functions use — with HTTP/2 support enabled. That means a libcurl newer than 7.38.0 but really, the newer the better. Libcurl has to have been built with HTTP/2 support … Read more
Local and Push Notifications in IOS version compatible
IOS 12 :- Group notification set threadIdentifier UNMutableNotificationContent to create group notification create local notification group let content = UNMutableNotificationContent() content.title = “Group Notifications” content.body = “Body of notification” content.threadIdentifier = “group-identifire” create remote notification group need to pass thread-id in payload { “aps” : { “alert” : { “title” : “Group Notifications”, “body” : … Read more
Enable/Disable Apple Push Notification from iPhone app?
You can read your app’s permissions using UIRemoteNotificationType enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; and then performing a bitwise and operation with the different types to see which are enabled. You can also call unregisterForRemoteNotifications to disable notifications. The one thing you can’t do is turn on notifications, although you can direct the user.
iOS 13 Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP callback
On this thread from apple forums, someone from apple staff explained this: On iOS 13.0 and later, incoming Voice over IP calls must be reported when they are received and before the didReceiceIncomingPush() method finishes execution, using the CallKit framework, or the system will terminate your app. Repeatedly failing to report calls may prevent your … Read more
How to catch all iOS Push Notifications with different user actions including tap on app icon
You can’t, you will only receive information about the notification that was used to open your app. So if a user opens your app, and your app has notifications, you will not be able to retrieve them from with in your app. A work around could be to also keep track of notification on a … Read more