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

A node.js lib to access the Apple Notification Center Service (ANCS)

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ancs

Gitter

A node.js lib to access the Apple Notification Center Service (ANCS)

Install

npm install ancs

Prerequisites

  • iOS 7 device with an app in peripheral mode which exposes ANCS
  • your iOS device will ask to be paired with your Mac

Usage

var ANCS = require('ancs');

Discover

ANCS.discover(callback(ancs));

Connect

ancs.connect(callback);

Disconnect

ancs.disconnect(callback);

Notification Event

ancs.on('notification', function(notification) {
    // ...
});
  • notification has the following properties
    • event (one of):
      • added
      • modified
      • removed
    • flags (array):
      • silent
      • important
    • category (one of):
      • other
      • incomingCall
      • missedCall
      • voicemail
      • schedule
      • email
      • other
      • news
      • healthAndFitness
      • businessAndFinance
      • location
      • entertianment
    • categoryCount
    • uid

Operations for 'added' or 'modified' notifications (event property)

Read App Identifier
notification.readAppIdentifier(function(appIdentifier) {
  // ...
});
Read Title
notification.readTitle(function(title) {
  // ...
});
Read Subtitle
notification.readSubtitle(function(subtitle) {
  // ...
});
Read Message
notification.readMessage(function(message) {
  // ...
});
Read Date
notification.readDate(function(date) {
  // ...
});
Read All Attributes
notification.readAttributes(function(attributes) {
  // ...
});
  • attributes has the following properties
    • appIdentifier
    • title
    • subtitle
    • message
    • date

Analytics

Keywords

FAQs

Package last updated on 26 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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