The application where only four users can share the videos other three users can see the videos and vice versa. I am using cloudkit as a central server.
I would like to send a Push notification without using any Backend server setup to user if one user shared the video.
is there any third party library to obtain this?
Sorry no this is not possible. With Push notifications the Provider needs to send the notification to the APNS (Apple Push Notification Service) which will send it to the correct device.
This works like:
You are also not able to send files just notifications in the for of Text, sound etc. So no XML file via Push notifications sorry.
You could however do it were you notify the user through Push Notification that there is a file available and then download it when the app opens.
Apple provides CloudKit to handle the backend server for you. You can use push notifications though CloudKit by subscribing to record changes. You can pair devices with GameKit for peer to peer connection. Without more information on what you are trying to accomplish this is all the information I can provide.
Related
I've set up an app to send motion data from one device to another using websockets (Starscream library). Now I need to send push notifications when a critical event happens (when app is minimized), does it have anything to do with websockets or I just need to use something like Pusher?
As you said, I think you should use Pusher or any other external service (Pushwoosh, Onesignal, among others) to send push notifications to the users. You can't do this with websockets.
I recommend you to use OneSignal (it is free and some big companies like Uber or Zillow are using it)
EDIT:
I think you can't send a push notification from one device to the other one. One device (let's say Kid.app) should notify the server of an event, and then the server will send the push notification to the other (Parent.app).
Check this link, it will be useful for you.
I work perfectly with Push Notifications for iOS using APNS. So for some customers, I need an on-premise or local solution, where I could send notifications to the device without APNS and without dependence on the internet. Somebody knows? can you help me?
Not possible. You cannot get notification from APNS without internet.
What you can do to accomplish this is you send message from your server to the app while it is in background mode and generate local notification accordingly.
Let me clarify your question.
"Locally" means: you got either no internet connection, a local network without connection to APNS OR the users simply did not register for push notifications.
1. iBeacon with Local Push Notification
So, here is an alternative, and that's kind of NOT what it is basically used for, but as you may know. iBeacons can be used to transport small data chunks, very very small ones. If your users did enable location services, you could include these for your application to trigger certain events (in this case, a very small notification that users came into range of a point of interest).
Downside: The application bundle requires either a static "notification text" to beacon mapping or you have to dynamically download the mapping from a web source, so you could update the notification's text.
2. Bluetooth with Local Push Notification
Another alternative would be to use bluetooth instead.
Devices could auto connect to your Bluetooth Station "Peripheral" - These devices now (with the help of your app) would register to a broadcasting characteristic of your Peripheral.
The peripheral could send messages to the registered devices.
If now the device does receive such a broadcasted message, you could perform a local push. - Without any network connection, just with the help of bluetooth, which itself also requires user permissions, of course.
3. Internet Connection / Silent Push with Local Push Notification
If your application of course had a working internet connection, you could avoid the APNS from Apple and send your own notifications to the device as silent push notifications.
As of iOS 14 this is available through Local Push Connectivity, but you will require the App Push Provider entitlement that you must apply for specifying why you are unable to use APNS.
Apple sample code is available here.
APNS works only with internet. If you need to push a message to the user without internet one solution (probably only solution currently) is using SMS api. But that requires user mobile number. Using URL Schema the user can open your app from the SMS message.
I am working on an app which fetches student info from a server, like absences and events and grades. I have no access to the server, I only have the API.
I am asked to implement push notifications in the app, such that if a teacher marks a student absent, that student get a notification about that. I searched and found several approaches:
1- Background fetch: I tried using background fetch to check if the student logged in to the app was marked absent today, if yes, show a local notification. It worked when I simulated w background fetch, but never worked on the physical device.
2- I searched for using Apple Push Notification Service, and they all wanted me to build a server, and I dont know how to start. Can I build a server which pushes notifications to devices in a way facebook does it? That is, one user triggers a notification at another user, in other words: I dont want to use broadcast notifications.
3- Using third party, like backendless, firebase or any alternatives. Would that be a useful approach?
With Backendless your app (on the student side) can register itself to receive push notifications. This is done with an API call that registers the device on the servers provided by Backendless. Then you would build an additional application (could be a browser web app or a mobile app) for the teachers. The system allows to send targeted notifications, so when a student is marked as absent, you could use the API to deliver a push notification specifically to the student's device. Would be happy to discuss in detail, you can post your question to the Backendless support forum.
For my app I have designed Push service using Java APNS library.
Or You could use Microsoft Azure Mobile services to push a notifications to devices.
How do iOS "push" notifications get delivered to a particular device without that device needing to poll a server?
For example, let's say I have received a new message on Facebook. Facebook notifies Apple that my device should receive a notification as such. But how does Apple know which device/IP to push the message to?
Each device can be updated with data using their own unique device tokens. This picture explains everything . .
It was too much for me to put in a comment so.
From the documentation.
Apple Push Notification service (APNs) propagates push notifications to devices having applications registered to receive those notifications. Each device establishes an accredited and encrypted IP connection with the service and receives notifications over this persistent connection. Providers connect with APNs through a persistent and secure channel while monitoring incoming data intended for their client applications. When new data for an application arrives, the provider prepares and sends a notification through the channel to APNs, which pushes the notification to the target device..
I suggest reading the documentation for more information and how to use and configure. It's all there.
Push Notifications
I created an infographic to explain the workflow of push notifications. Hope this is helpful.
Device does not keep polling the server for the push notifications.
To keep it simple, consider an iPhone is connected to internet. On connecting to internet iPhone establishes connection to Apple Push Notifications server this connection is open connection which means data can be thrown to iPhone from server the moment data arrives to server.
Apple does not use HTTP protocol for Push notifications but if you understand HTTP Protocol its almost a similar methodology.
http://en.wikipedia.org/wiki/Push_technology#HTTP_server_push
There is a really nice exaplanation of push notifications in this article.
In iOS, apps can’t do a lot in the background. Apps are only allowed to do limited set of activities so battery life is conserved.
But what if something interesting happens and you wish to let the user know about this, even if they’re not currently using your app?
i have an app and i'm thinking about implementing push notifications in it. however, i want to use remote notifications. i've tried Parse's push notification service and it's great and works well. You can type any text you want to inform your users about and just press send in order to be delivered to all your App users. On the other hand, i don't know if Apple has any such service that can facilitate the process of sending remote notifications. so which is better to stick to, Apple or Parse? and can i have the same service as Parse from Apple?
Yes, you can get the same services as Parse. You have to build your own server that will talk with Apple APNS. Just for example sending a push notification from your own server without using parse is here.
I didn't understand what are you trying to ask.
You can use Apple push notification service for sending remote content. With Any content related to your App.
Check RemoteNotifications for details. Parse is also using the Apple's push notification service.
Edit: For implementing your own servers for push notification check this tutorial : Push Notification Services