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.
Related
Heya im trying to create an app that people can use to send push notifications to eachohter. The only catch is that the users will be working in an offline server within a company. They won't have access to the internet so connecting to something like Azure Notification Hubs is not possible. The only thing I have been able to find is, that it is possible to create a server from which you could send push notifications. Only problem is, I can't find how to send these notifications. If anyone has any kind of clue how I could send the notifications to the server and then to the users, I would be forever gratefull. Thanks!
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 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.
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
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!