Device to Device Notifications in iOS - ios

I'm a newbie iOS developer and trying to implement device to device notification in iOS something to handle friend requests etc.. I'm looking for documentation that guides me in the process. I'm using firebase as my backend system but I'm cannot find any documentation about device to device notification . I also checked out One Signal but still having hard time figuring out how this is implemented , Can anyone point me in the right direction

You'd need to implement this logic with server-side code using one of Firebase's server SDKs. You can look their fantastic documentation to learn more.

hope it help:
OS X and iOS application and framework to play with the Apple Push Notification service (APNs)
https://github.com/noodlewerk/NWPusher

Related

Ionic 4 iOS app using APNS Push Notifications without a third party service

I would like to build an Ionic 4 app for iOS platform only (no android/windows/web version required) that supports APNS based Push Notifications. My backend is going to be NodeJS/ExpressJS based. After so many days of searching I wasn't able to find one solid example/solution that does not use a third party service such as OneSignal or Firebase. This is an enterprise app and we cannot use a thirdparty service other than Apple's APNS. We'd like to send the notification from our NodeJS backend to APNS (which I am well aware of how to implement). What've I've been suffering with is to find a good Ionic 4 library that allows me to interact with the OS's Push Notification capabilities such as capturing device token, listening for notifications when app is in foreground etc. Could someone please direct me to a good resource that shows how to accomplish this straightforward requirement of using Ionic 4 to work with ios push notifications sent via APNS?
My suggestion for you is to implement this functionality in swift and create a plugin which will call your javascript code.
I think this is a simple example of how to implement push notifications with swift.
You should get the phonegap-plugin-push plugin, which is popular and well mantained. It supports both APNS and Firebase, and it is remarkably well documented. Not sure about Ionic 4 support, but that's a solid starting point anyway.

Get all new notifications when posted or removed on iOS

I am wondering if there is a way I can get all the notifications when they are posted or removed on iOS using Swift 3?
For example, the Android Wear iOS app has the ability to get all notifications and alert me when a new one arrived on my phone.
On Android, there is Notification Listener Service which I used to work with, but I would like to make it work for iOS too. However there seemed to be no resources online about that.
https://developer.android.com/reference/android/service/notification/NotificationListenerService.html
Any thanks would be appreciated. Thanks in advance!
UPDATE:
I understand that ANCS can do that and I found that I do not have to write any code (Swift) for it. However, most of the examples I found can only send the notifications and nothing else.
For the Android Wear app, it can connect to the BLE device within the app, send not just notifications, but also settings to the device. How can I achieve this?
I forgot to mention that the device I am working on is an Arduino.

Sending a notification from OS X to iOS

I have a Mac application and an iOS application. I need to display a notification on iOS, coming from the Mac app.
Is there any easier way to do it than using Push Notifications or network sockets (UDP or TCP)? Maybe Apple provides it away?
I need to make sure that the user hears this notification. The application should launch in the background and start playing sound.
If they are on the same network you can use bonjour ( https://developer.apple.com/bonjour/index.html ) for communication between mac app and iOS app.
If they are on different network you have to use a server, the server will be connected to both mac app and iOS app via tcp, and you can send msgs via the server. And if the iOS device is locked or app is in background you have to implement push notification for sending data to the iOS app.
Not sure of your use case, but using Apple's push notifications to serve notifications for your app seems like a suitable choice. Again, not sure of your use case, but an alternative may be to send a text-message using the Twilio API.
There is another option known as BLE .With BLE you can interact between mac and iOS using core bluetooth framework.
When you receive any message from mac to iOS using this framework you can show a local notification and can wake an app, since BLE also works well in background mode.
For mac to act as peripheral there is a good open source project over here.
you can find more information about BLE here.
Hope this helps.
I think the only acceptable solution is to send push notifications via APNS from mac to iOS device due to limitations on app lifetime on iOS. There is nothing hard in implementing APNS, there are lots of ready implementations, like NWPusher - you may copy it to your project and setup the environment - keys, device tokens - and you're done. To transmit tokens from iOS to your mac app, you may use tons of ways. For example, implement simple web-service on mac and send tokens via http/https.
You may also use a ready server-side implementations, like parse.com, to send push notifications.

How does Pushbullet for iOS manage to access and show all of iOS notifications on other devices?

The new version of Pushbullet app (https://itunes.apple.com/us/app/pushbullet/id810352052?mt=8) for iOS and Mac can show you all the notifications you get on your phone inside their Mac app.
Not just the notifications going to the app itself - all notifications from all applications.
How did they manage to do that? I can't figure out which APIs they are using to do this.
In General, Apple device gives the access to Notification to BLE, so that Notifications can be shown on any onboard system like Car's Dashboard. So I think they are using ani API related to that.
This might be helpful
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html

Is there a way to access Bluetooth 4.0 Low Energy devices in iOS?

The new iPhone 4S has support for Bluetooth 4.0 Low Energy devices. Is there an API for communicating with these devices in iOS?
It is part of the iOS 5.0 SDK. You can download the SDK and check it out.
As someone has mentioned, the APIs are available in the iOS 5.0 SDK. However, bear in mind that those APIs only provide support for ATT client, if you want to add services and act as a server you're out of luck for now. I truly hope Apple will add server support at some point, since some profiles (Alert Notification or Proximity) would benefit enormously: being able to be notified when you receive a new SMS/email or being able to "ping" your phone to find it would be great.
TI has a nice development package that includes a BLE peripheral, programmer, sample code, and sample iOS App. This is a great place to start and shows off most aspects of the Core Bluetooth API in iOS
http://processors.wiki.ti.com/index.php/Category:BluetoothLE

Resources