Complete procedure to implement APNS in ios application - ios

I am trying to implement the push notification in my application .
For this i searched and i found that when my application is not running in foreground then user can be notified by using APNS . And i read many related articles and blogs for this however i got confused because it is not clearly mentioned how to create the server and where it will physically exist .Also APNS (assuming that it is the service provided by apple )will reside with ios on device.
IF some has link which will clearly shows each and every step involved to implement the APNS then please do tell me ..
Thnx in advnce
Paggggyyy123

http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
This will get you the basics..
http://www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2
the above will get you with the server part..
If you have any problem..do tell ..

Related

How to access content of Apple Push Notification by using MDM?

I'm trying to find a way to access content of all push notifications through notification center.
In other words I want to know what my employees/kids have received from WhatApp and SnapChat etc.
I have done some R&D to see which port of apple receive the message or to see how smart watches access push notification.
Has anyone done something similar or any hint or lead can be greatly appreciated?
In Android there is an API to access notifications but not sure about iOS!!
Ports used by apple:
https://support.apple.com/en-au/HT202944
Ports on APN
https://support.apple.com/en-au/HT203609
Access to push notifications through Bluetooth:
https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
I am sorry to inform you that such a system is not possible in iOS . All iOS apps are sanboxed and data of one app cannot be read by another. Thats the reason you cant find any apps to read OTP password form message except the native keyboard app.
Apple will not allow any apps/service even in future as Apple devices are designed for more security and privacy. It violated basic privacy of end user and it should not be done.
Having said that , you can always control installing of apps / removing app remotely etc through MDM . You can take more control of your employees devices through a MDM software .

Razer Nabu iOS Authorisation

I'm trying to setup a test iOS app to see what I can do with the Razer Nabu but I'm struggling with the patchy documentation. The example for authentication only mentions a 'fitness' scope and with that I don't seem to be able to send a notification to the band (the main thing I'd like to try).
When I try and send a notification I get Operation 36 returned and no notification on the band so I assume that means it failed (return codes from the SDK aren't documented it seems).
Does anyone know if there is a different scope for notifications? I tried 'notification' and 'notifications' but they resulted in failure to authorise in the Nabu Utility app.
Any help or pointers to documentation/samples/guides I might have missed would be very helpful!
NB I managed to get authorised with the 'fitness' scope and read some fitness data so everything's working except for the notifications!
Having got in touch with the Razer support guys and talking to this lovely chap called Brandon the issue was that I had the Nabu Utility app from the App Store and the version from the developer site was actually more up to date in this respect, so getting that one installed (and uninstalling the App Store version) made everything work correctly!

iOS Push Notifications with Windows Azure and Unity3D

I am using Windows Azure Notifications Hub to create a push notifications service for my iOS game made with Unity3D. I only want simple notifications like informing about an update or a new feature.
But I am having some issues. I am following the tutorial Get Started with Notifications Hubs.
I did everything except the sending notification part, because I don't receive any token.
Moreover, I can't add the Windows Azure SDK into my application because I don't have any AppDelegate.h or AppDelegate.m in the XCode project generated by Unity3D.
When I call in Unity3D RegisterForRemoteNotificationTypes I don't receive any token back. And I think it's the first main problem.
I don't know where the issue comes from. Should I use another service ? How can I solve the issue as I don't know where does it comes from ?
Thank you very much !
If you are asking for push notification permissions make sure that you haven't accidentally denied this permission at some point as iOS will only show this option once.
You can check and see the status of push notification permissions in the Settings menu of your iPhone/iPad.
If you are willing to spend a little money you can get the etcetera plugin from prime31
that can help you get a token and also provides access to other native APIs.
Regarding the lack of a AppDelegate.h file from the XCode project, this is because Unity doesn't generate 2 files: one for the app delegate and one for the controller, they are in the same file called UnityAppController.h/m.
Note: is not trivial to add cocoa touch controls using this class if this is what you want.

Push notifications issues: key,failed/message not reach

I'm still new to iOS dev.
And I'm very, very new to whole APNS idea. I followed many tutorials, and didn't go so well.
I'd like to ask some questions.
Can I use same .certSigningRequest file for dev/dist/apns certificates? Does it matter if some of this certificates from this .certSigningRequest have been revoked?
When I export my key in keychain to .p12 file, can I use this one for both dev/distribute version?
If my server open port 2195, by giving .pem generated from above cer, my server should be able to send push message, right?
How can I unsubscribe/unregister from my device and/or from server/apns service? I mean when I need to remove, and try to build&run the code again.
4.1 How does
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
really work? Does it tell apns not to send message/just turn it off? How can my server/provider know if device need to unsubscribe?
I find this tutorial really useful: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
And here some questions I have about what I encountered.
1. The sample app from the tutorial worked fine, using both my laptop & my server to send a message. But after a few days, it doesn't. (the response is still 'Connected to APNS Message successfully delivered', but the message never reach my device)
What could be the cause? My friend have revoked a dev cert? (I shared acc. w/ my friends) Or I reinstall the app? I also tried method unregisterForRemoteNotifications & register again, but nothing happens.
2. I also tried https://apphq.shephertz.com for a provider. This one requires .p12 key file in their format. (link) I have another project (this one is unity) register apns thru the app. It seems fine since I can see device token & user store in the web. But when I tried to send message, I got an error, like
iOS KeystoreException Device ID : <my-device-token> : Invalid keystore password! Verify settings for connecting to Apple... Does anyone know what this mean?
Sorry for my poor English.

In Newsstand app how do I find a list of devices that are subscribed?

I can't afford UrbanAirship so I'm trying to program the server side of a Newsstand app myself.
I plan on using the JavaPNS API.
The one thing I can't seem to figure out is how to find a list of users who have a subscription in my app.
Can I query this information from Apple some how?
If I can't then I guess that means that each time a user subscribes they send their device token directly to my server. I hope this is not the case because I was hopping to run the server on my laptop and send out pushes myself without having to keep the laptop running all day listening for new subscribers.
Thanks!
Looks like I do need to register each device with my server: http://www.ibm.com/developerworks/web/library/mo-ios-push/index.html#resources
You kind of found your answer but just in case you really need a server for not only handling the push notification (for telling your app in Newsstand to check the new issue and download it in the background) but also for subscription and in-app purchasing.
Every time you launch the app you should check few things before you refresh the UI. You should check if the user is a subscriber or has user already bought the issue so you can show view/download button instead of Buy button.
Check out these tutorials if they help to understand these communications better but believe me you will end up with one of those services like Urban Airship (Which I think UA is the best option because it handles all in one not just push notification):
http://ios-blog.co.uk/tutorials/how-to-make-a-magazine-app-in-ios-part-i/
this one is more focus on server part:
http://ios-blog.co.uk/tutorials/how-to-make-a-magazine-app-in-ios-part-ii/
http://www.viggiosoft.com/blog/blog/2011/10/17/ios-newsstand-tutorial
http://www.raywenderlich.com/2797/introduction-to-in-app-purchases
And as always this is the best place for start (it has everything you need):
https://developer.apple.com/devcenter/ios/newsstand/
These are some resources to help you in developing app for Newsstand but still there are not enough people out there to share their experience.
Best of luck.
Edit: Add these two links two this list:
http://www.marco.org/2012/10/11/the-magazine
http://www.marco.org/2012/12/12/the-magazine-future-of-publishing

Resources