apple-push-notifications

APNS spoof/fake

感情迁移 提交于 2019-12-06 02:50:57
I want to have a standalone network (no internet access) for testing. Is there any way to spoof the APNS servers to test notifications and MDM. Is there a way to create your own APNS server. Sure. The APNS protocol is defined in Apple's documentation here: The Binary Interface and Notification Formats . Basically, it's just an SSL server that speaks a simple binary protocol. We have implemented a mock push server and feedback server for our internal testing. 来源: https://stackoverflow.com/questions/4184655/apns-spoof-fake

Is it possible to send a “silent” push notification on iPhone (without any alert to the user)?

拟墨画扇 提交于 2019-12-06 02:28:34
问题 I need to do it on a chat app to notice the client that there is new data to fetch from the server. I know that technically it is possible with an empty payload (at least on ios 5 device it worked), but can Apple see it as abuse of service or is it OK to do it? And is it technically possible on ios 4 device? 回答1: Yes, increment only badge number, dont send sound and alert, So, there will be one badge on the App icon. So, here unknowingly the badge number will be incremented to show that

Batch / multiple iOS Push Notification code - works for 2 devices, but not for 100

孤街浪徒 提交于 2019-12-06 02:26:39
The following code works fine if the number of devices I send to is 2 - i.e., they both receive the push notifications. But if I raise that limit to 100, no push notifications are received. I have read up on this and it looks like I am sending the batch notifications correctly (i.e., multiple requests via a single connection); the timeout of the connection is set nice and high (60 seconds); the output of the code all looks in order; nothing in the apache error log, so I don't see where the problem is. My customer's getting really hacked off. Can anyone help?? function sendIosPushes() {

How to update the badge number in IOS push notification?

霸气de小男生 提交于 2019-12-06 00:15:01
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; NSString *msg = [NSString stringWithFormat:@"%@", userInfo]; NSLog(@"%@",msg); [[Constants

PushSharp doesn't send notifications

不打扰是莪最后的温柔 提交于 2019-12-05 23:29:31
问题 I have got a simple code: PushBroker pushBroker = new PushBroker(); string path = HttpContext.Current.Server.MapPath("~/" + AppSettings.CertificatePath); var appleCert = File.ReadAllBytes(path); pushBroker.RegisterAppleService( new ApplePushChannelSettings(AppSettings.IsProductionPushNotificationServer, appleCert, AppSettings.CertificatePassword)); var notification = new AppleNotification().ForDeviceToken(deviceToken.TrimStart('<').TrimEnd('>')) .WithBadge(unviewedInvitationCount); pushBroker

Know if the app received the notification from server side

我的梦境 提交于 2019-12-05 22:33:18
问题 I'm building a newspaper-like app and I would like to know how many people received the article's push notification vs how many actually read it . I was thinking to implement a way in which when the notification is received the app wakes up and send a request to the server saying " Hi I'm _____, I've received the notification of the article ____ " and store it in the database. Then afterwards if the user click on the notification and goes to read the article I send another request saying " Hi

no valid 'aps-environment' entitlement string

落花浮王杯 提交于 2019-12-05 21:30:23
问题 I've searched on Google and Stack Overflow, but I'm unable to resolve this problem. My app has an AdHoc and Appstore provisioning profiles, both of which are giving the error "no valid 'aps-environment' entitlement string found for application" in my X Code console, and I'm unable to send push notifications. So far the steps I've taken are: - edited profile in development portal, downloaded new profile and inspected the .mobliprovision file. Found aps-environment: production get-task-allow :

Why is app not getting registered for push notifications in iOS 8?

只愿长相守 提交于 2019-12-05 20:59:31
问题 I upgarded my Xcode to Xcode 6.0.1, now remote notification registration is not happening for iOS 8 device. It is working fine for iOS 7 device. I have added the code in app delegate as mentioned below: //-- Set Notification if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert) categories:nil]; [

Open view controller when APNS is received in iOS

梦想与她 提交于 2019-12-05 20:57:28
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","badge":1,"sound":"default"}} my code is : - (BOOL)application:(UIApplication *)application

iPhone 6 doesn't receive push notification

强颜欢笑 提交于 2019-12-05 19:49:29
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:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil]; [[UIApplication