Get all new notifications when posted or removed on iOS - 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.

Related

Xcode iOS Bluetooth connect with Bluetooth speaker

I have been searching for the past few days for a solution but havent been able to find any.
I am developing app to pair and connect to bluetooth device using a mac address.
I found one private framework API, but even that one i cant make it work, since for some reason i can not include the headers from the private API.
Anyone knows any information? How to achieve this on iOS, or is it 100% impossible to do this at the moment, until Apple decides to open up the bluetooth libraries to the developers?
EDIT:
I was looking into the BeeTee app, and using the private API BluetoothManager.framework, but for some reason it doesnt work on IOS 10 & Xcode 8.1
Has anyone managed to make it work?
I know it is private API and most probably wont pass on App Store, but that doesnt matter at this moment, since i am looking just to test the concept, wont need to publish app at this moment.
Thanks

Device to Device Notifications in 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

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

Connect iOS device to Bluetooth device with SPP

I'm working on one watch which shows iOS device notification like..
Display Installed app notification
Display Call notification
Display Message notification.. etc
I have read some articles and came to know about GATT and ANCS, and this two itself enough to display iOS device notification on other bluetooth device.
Generic Attribute(GATT) Profile : https://developer.bluetooth.org/TechnologyOverview/Pages/GATT.aspx
Apple Notification Center Service(ANCS):
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
Is that mean I do not need any iOS application to handle iOS device notification?
Currently my watch is built up with SPP, do I need to make any modification in that?
I also came to know that I have to apply for MFi Program(https://developer.apple.com/programs/mfi/).
is MFi necessary for My watch with the idea I have mentioned above?
Any suggestion will be appreciated.
Thanks in advance
SPP is classic BT whereas ANCS uses BTLE.
ANCS is free to use.
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Specification/Specification.html#//apple_ref/doc/uid/TP40013460-CH1-SW18

Resources