Unable to send MDM Push Notification to the device via APNS.
We are in process of installing our own MDM server and there by controlling the devices enrolled.
Our MDM server is 64 bit Windows 2008 R2 server. We have obtained the push certificate from the website https://identity.apple.com/pushcert/ using the mdm certificate created using our enterprise license.
We have also completed the enrollment of the device using the configuration profile. We could retrieve the pushmagic and UDID using the check in url provided in the configuration profile.
Now using that information we are trying to send push notificate to the apple sandbox server "gateway.sandbox.push.apple.com". I have installed the push certificate received from the apple in the MDM server (by conveting the pem to p12).
We are using C#(MOONAPNS/PUSHSHARP) as program to send the payload information to the APNS. The information which we are sending is something like {"mdm","C00B83E6-7B66-4DE3-BBE4-B728E0E3E16F"} along with the device token. This never gets to wake up the device. The c# program which connects to the APNS is not throwin any error and says successfully sent. But the APNS doenst seem to be waking up the ipad device( based on the logs in the ipad.)
I am completely stuck here and not sure how to proceed further. How to debug this?
Thanks!
I believe you have the wrong certificate. You need a different switch flipped in your profile to become an MDM Vendor in order to have the correct certificate to administer devices like you are trying to. You cannot use the certificate you got with your enterprise account.
For MDM you don't need to use the Sandbox URL you can use the Production URL itself.
Try using production environment through gateway.push.apple.com, port 2195.
Refer this
Related
I want to build a chat application but I don't want to use WNS because WNS required a visa card. Is there any way to send and receive raw data to Windows store app without WNS?
I found Push Notifications without Azure service? but it is MPNS for Windows phone, not for windows store app.
Is there any way to send and receive raw data to Windows store app
without WNS?
You can send and receive raw data by establishing socket connection between your application and server and handle the information in foreground or background task.
To know how to use stream socket to send and receive data , please see StreamSocket Sample on GitHub.
Moreover, you can use SocketAcitivityTrigger class to register a background task to notify the socket broker when your app is not active. For the complete sample , please refer to SocketActivityStreamSocket sample, which requires the capability Private Networks (Client & Server). And if your app uses socket activity triggers, you must specify the User Notification Listener capability in the app manifest.
The sample consists of SocketActivityStreamSocket (for client side) and StreamSocketListenerServer (for server side), please note the sample scenario will not work if both apps are testing on the same machine. Be sure to run the apps on separate machine so that they can communicate with each other.
I want to use Pushsharp for sending push notifications on ios devices. So I made a simple windows forms program for sending notifications on my device. I store my apns certificate in local certificate store. Program works great and notification arrives but when I use this code for work in windows service it doesn't work. There aren't any events from pushbroker and I really don't know how to fix this. I give necessary permissions to read certificate from store to user who launch the service.
I want to send push notification to Android device using Amazon SNS service.
But as listed on Amazon's official site:
You send push notification messages to both mobile devices and desktops using one of the following supported push notification services:
Amazon Device Messaging (ADM)
Apple Push Notification Service (APNS) for both iOS and Mac OS X
Baidu Cloud Push (Baidu)
Google Cloud Messaging for Android (GCM)
Microsoft Push Notification Service for Windows Phone (MPNS)
Windows Push Notification Services (WNS).
So I am using GCM as an intermediary to send push notification to my Android device.
Here is an another link that states how to create project with GCM: http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html.
So far I have able to successfully create project in Google with my Server key and project number but only thing I am not getting is how to generate Registration Id and from where.
Do I need to programmatically generate registration id from my C# code?
But I couldn't find any code in C# to generate registration id. I have just find code in Android to generate Registration Id.
Having just set up SNS for a mobile app let me try and clarify a few things about SNS.
Amazon SNS is the intermediary not GCM. The workflow goes like this:
Using the GCM Project Key you set your app up for push notifications
A user downloads your app and when it launches, it connects to GCM
and lets Google know that this app/user combo would like to receive
push notifications.
GCM sends back a device token that represents this individuals device
and app instillation.
You send this device token to your c# server code where you can use
the SNS api to register the token with amazon and save it as a SNS
mobile endpoint.
Then you can use that endpoint Id and your server API key to send out
the notification.
This part of the documentation should be exactly what your looking for.
Hope this helps,
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html
I would like to automatically test my application that sends push notifications.
I would like to be able to get (or generate) a token from Apple/Google for both Android and Apple devices that will be accepted by Apple's or Google's server and making the notification sent to my tester-program.
i.e, I am running my program (lets call it A) to test some server. The tests are relatively complex and involve a lot of network communication. I am testing the server as a black box, I cannot mock anything. I want to simulate a phone with program A that opens the client application and registers for push notifications. Then, I want to be able to see these notifications received on program A. Everything should be done in code, and not depended a real device.
Is this even possible? Does Apple/Google allow this type of test? I've read that the Android simulator is capable of receiving notifications as long as it has an active Google account on it, which is fine. Can this be simulated without the overhead of an Android simulator? Can it be done for Apple's iStuff ?
Push Notifications in Mavericks iOS Simulator: It seems you can use the iOS simulator to test push notifications, but I get it that you do not want to use a the simulator nor a device.
What you are asking for should not be allowed by Apple, as it means non-Apple devices would be allowed to register for push notifications. Per https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW12, "APNs generates a device token using information contained in the unique device certificate. The device token contains an identifier of the device. It then encrypts the device token with a token key and returns it to the device." Thus, in order to create the desired token, you need a unique device certificate -- in other words, a real device or iOS 8 simulator. If you are trying to test on a single "device," perhaps you could forge one or copy from a real device, but I am sure that is against Apple's policies.
I have used the push notification in my app and I have used our own server, it communicates with the apple server. But the problem is, the notifications are queued in the apple server and it doesn't send any notification to the device.
In server side, they are using C# for push notification services and they have traced the value in that method "service.QueueNotification(alertNotification)". So always the notifications are in the QUEUE and it doesn't send any notification to the device.
I have solved the issue, i am testing the notification in the adhoc mode. The problem is, my developer account was expired so that the notification always in the queue from the apple server and it doesn't send any notification to the device. After that i have used some different valid accounts and it work's fine now.
Thanks!