Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ancs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ancs - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

2

lib/notification.js

@@ -58,3 +58,3 @@ var events = require('events');

if (eventFlags & 1) {
if (eventFlags & 2) {
this.flags.push('important');

@@ -61,0 +61,0 @@ }

{
"name": "ancs",
"version": "0.0.2",
"version": "0.1.0",
"description": "A node.js lib to access the Apple Notification Center Service (ANCS)",

@@ -31,4 +31,4 @@ "main": "index.js",

"dependencies": {
"noble": "~0.2.0"
"noble": "~0.3.9"
}
}

@@ -1,13 +0,14 @@

ancs
=========
# ancs
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sandeepmistry/node-ancs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A node.js lib to access the [Apple Notification Center Service (ANCS)](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html)
Install
-------
## Install
npm install ancs
```sh
npm install ancs
```
Prerequisites
-------------
## Prerequisites

@@ -17,24 +18,33 @@ * iOS 7 device with an app in peripheral mode which exposes ANCS

Usage
-----
## Usage
var ANCS = require('ancs');
```javascript
var ANCS = require('ancs');
```
__Discover__
### Discover
ANCS.discover(callback(ancs));
```javascript
ANCS.discover(callback(ancs));
```
__Connect__
### Connect
ancs.connect(callback);
```javascript
ancs.connect(callback);
```
__Disconnect__
### Disconnect
ancs.disconnect(callback);
```javascript
ancs.disconnect(callback);
```
__Notification Events__
### Notification Event
ancs.on('notification', function(notification) {
...
});
```javascript
ancs.on('notification', function(notification) {
// ...
});
```

@@ -65,40 +75,49 @@ * notification has the following properties

__Operations for 'added' or 'modified' notifications (event property)__
### Operations for 'added' or 'modified' notifications (event property)
Read App Identifier
#### Read App Identifier
notification.readAppIdentifier(function(appIdentifier) {
...
});
```javascript
notification.readAppIdentifier(function(appIdentifier) {
// ...
});
```
Read Title
#### Read Title
notification.readTitle(function(title) {
...
});
```javascript
notification.readTitle(function(title) {
// ...
});
```
Read Subtitle
#### Read Subtitle
notification.readSubtitle(function(subtitle) {
...
});
```javascript
notification.readSubtitle(function(subtitle) {
// ...
});
```
Read Message
#### Read Message
notification.readMessage(function(message) {
...
});
```javascript
notification.readMessage(function(message) {
// ...
});
```
Read Date
#### Read Date
```javascript
notification.readDate(function(date) {
// ...
});
```
notification.readDate(function(date) {
...
});
Read All Attributes
notification.readAttributes(function(attributes) {
...
});
#### Read All Attributes
```javascript
notification.readAttributes(function(attributes) {
// ...
});
```
* attributes has the following properties

@@ -110,1 +129,3 @@ * appIdentifier

* date
[![Analytics](https://ga-beacon.appspot.com/UA-56089547-1/sandeepmistry/node-ancs?pixel)](https://github.com/igrigorik/ga-beacon)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc