Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
pusher-nativescript
Advanced tools
Readme
Pusher NativeScript adds Pusher support to {N} applications.
There is not official support for NativeScript in pusher-js sdk, but the Pusher team made a great work designing the JS library to target multiple platforms (react-native, node, browser, etc), while reusing a lot of code in the process. Taking advantage of that architecture, we were able to create a version of the pusher-js sdk that maintains the original API and provides support for NativeScript.
You can install the library using any npm compatible package manager, like npm or yarn:
$ npm install --save pusher-nativescript
Or use NativeScript CLI:
$ tns plugin add pusher-nativescript
Once the package has been installed, you can import it
As a CommonJS module:
const Pusher = require('pusher-nativescript');
Or ES6 module:
import Pusher from 'pusher-nativescript';
If you are using Typescript you might have to import it like this:
import * as Pusher from 'pusher-nativescript';
This build of pusher-js
uses NativeScript's Connectivity API to detect changes on connectivity state. It will use this to automatically reconnect.
On Android, to access any connection related information we will need explicit permission from the user. To enable the permission request add the follwing in app/App_Resources/Android/AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
NativeScript do not have official support for WebSockets. We are relying on nativescript-websockets plugin to add that support. That is why the plugin is a peer dependency.
As it was mentioned above, pusher-nativescript
shares the same API as the official pusher-js
library. To see how the library is used and configured checkout pusher-js repository.
FAQs
Pusher plugin for NativeScript with support to iOS and Android platforms
The npm package pusher-nativescript receives a total of 0 weekly downloads. As such, pusher-nativescript popularity was classified as not popular.
We found that pusher-nativescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.