Apple Push Notification Service - ios

I am developing an alarm app in iphone. To set alarm I have to use APNS (Apple Push Notification Service). Can you suggest me how to do this or some important tutorial regarding this.

Start here for authoritative information from the Push Notification Service Programming Guide. You might also search here on Stack Overflow, and on Google. If you can explain in more detail what, exactly, you're looking for help with, we can help with more specific information.
If your plan is to have someone configure alarms on some web site (or desktop app, or whatever), and the use push to send a notification to the device when the alarm "goes off", I encourage you to reconsider that. Push is an unreliable medium (in the same sense as UDP): no guarantees are made as to when, or whether, the notifications will be delivered. It is not something you should depend on to happen at a particular time. It does not get you around the prohibition on background processes on iPhone.
That said, you can certainly try. The Programming Guide I linked above will get you started. There are definitely many APNS tutorials on the web. And if you have specific questions, this site can certainly help. But right now, you're asking, essentially, "how do I write my app?" That's a pretty broad scope for a Q&A site like this.

I believe that you actually mean Local Notifications, not Apple Push Notification Service (APNS). Using Local Notifications you can set timers that will show an alert to the user after a specific time. Using APNS you can basically push events from a server to the users handset.
I suggest you read the Push Notification Service Programming Guide.

Related

Communication Notifications Requirements for iOS

Perhaps I missed the specific WWDC video, but there is a concept increasingly predominant on iOS amongst chat apps where the avatar of the sender and reciever is observed within the PUSH notifications. Articles exist on Apples official documentation where it implicitly suggests that such a Push notification where Avatars are utilised would only be possible for apps that make use of communication UX.
This is vague.
My question for clarification which will affect the direction of our commercial app used by millions is quite simply can we make use of this functionality for a uni directional communication app?

Send message from php/mysql to iPhones

i am building a website which needs to send reminder messages to iOS (and Android) devices at certain times/dates. So not to a specific app on an iPhone, but to the iPhone itself.
like in the way the reminders app on the iPhone works: even when the app isn't active, reminders pop up.
For the last two days i've been googling on-and-off and reading about apns and firebase etc., but every script and tutorial understandably mentions tokens and id's that you need to receive from Apple and/or Android to get it to work.
One thing i can't find on google is: do i need to have an developer ID or something for this? I'm no xcode or swift programmer, i mainly work with php and query etc. and hopefully can avoid paying yearly for a developer license with Apple or Google.
Hopefully someone can point me in the right direction?
And surely any pointers to a good service or script to use is also very helpful. In the mean time i'll keep digging.
Thanks in advance for any help!
If you want to be able to run your app on an actual device you need to be registered developer, to be able to create certificates and provisioning profiles to sign your app with. You also need to be able to create certificates to be able to send push notifications.
You write that you want to send notifications directly to the phone. This isn't possible. All push notifications must be sent to an app. It doesn't matter if the app is running or not. Which makes sense. Otherwise you would be able to send push notifications to any iOS device out there...

How it really is... 5.6 Apps cannot use Push Notifications to send advertising, promotions, or direct marketing of any kind?

Yes,
This rule clearly states that any advertising or marketing activity by Push Notification could cost your a ban in App Store.
So how about Groupon and other special offer focused apps? Each day I receive notifications from Groupon with clear marketing content, and when I open it I'm redirected into the view with big "Buy" button (Btw. do you know any other live apps using push in similar way? I mean not exact Groupon-clone apps).
Ofcourse user need to have a choice if he wants to receive such notifications or not, and from who (like in Groupon you can choose subscribed cities), privacy policy need to clearly state what kind of notifications user will receive. Maybe the frequency of notifications does matter (1 per day for Groupon)?
Ok lets get back to the point of my question:
Whats the receipe for such app which explicitly bends the 5.6 rule to stays up and running in App Store?
Have you ever trying to submit similar application?
App reviews rules are not strict, since Groupon is just that, an advertisement platform, an app is expected to send these kind of push notification.
But if, for example, the Facebook app would be using push notification to tell there users to download some other app the rulle 5.6 will come in to play.
But just that some other app got approved does in no way mean that you app will, even if it has the same functionality. So the answer you are seeking for will not do you any good, since even if someone got there app approved will not mean you will get it approved.

How do I add a free subscription to a NewsStand app

I want to add free subscriptions to a newsstand app i've been working on, the only problem I can find out how to do this is from this guide. However as helpful as that is you have to use urban airship, where it cost $0.10 per subscribe, so for a free app, it'd be costing me, which i couldn't afford to do every month.
Are there any other ways;
How would i set up a server my self?
Would it be the same for any IAP stuff?
Thank you in advance.
Apple requires that Newsstand apps offer its contens using iTunes managed subscriptions. This means you have to run a server that hosts the Newsstand content, which won't be free.
Your only alternative is to release your app as a non-Newsstand app, build the content into your app, and release an App Store update when it's time for a new issue. This isn't ideal as only Newsstand apps have background downloading.
So... get some funding, or find someone else with a Newsstand app who will host your content for free :)
I'm in the same boat. Right now I'm considering using the JavaPNS API to send push notifications. (Local notifications wont work since they don't wake up the app when its not active).
As far as hosting goes... for some unknown reason Google AppEngine does not support JavaPNS.
I'm thinking about writing a JavaPNS program and running it on my own laptop daily to send out push notifications.
The only thing I have yet to figure out is how to get a list of users who have subscribed to my app. If the user must register the device token with my server then that means my server will have to be running all the time, which I cant do. Man I hope I don't have to use urban airship.
There should be a free way to do this. Hopefully we can figure this out...

Apple Push Notification Service Statistics(apns)

Is it possible to find information about Apple Push Notification Service usage?
How many people are using, and how many people are declining them?
Or maybe, somebody already has this sort of information?
Apple does not provide a lot of information about how many users actually accept/decline push notifications but you can get a good idea of what's going on by comparing the number of total installs and the number of valid push notification tokens you have ( I'm assuming that since you are interested in analytics you already have a Push server set up ) Push notification tokens are only generated if a user accepts.
If you need more information about the actual push notifications, you'll need to get your hands dirty and actually add tracking code in the application. If you're looking for something free try Google Analytics for iOS with Custom Event Tracking: https://developers.google.com/analytics/devguides/collection/ios/v2/events
Urban Airship also provides a pretty good analytics service, but you have to be using their push notification server: http://urbanairship.com/products/push-messaging#analyze

Resources