New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nativescript-play-livesync

Package Overview
Dependencies
Maintainers
11
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-play-livesync

Playground LiveSync plugin for iOS and Android

  • 0.0.13
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
11
Weekly downloads
 
Created
Source

NativeScript PlayLiveSync

This plugin is used for communication between NativeScript Playground website and NativeScript Preview applications(iOS and Android).

The communication between the site and the mobile applications is made through PubNub. The repository contains the native implementation in Java and Objective-C respectively.

To debug the plugin you can follow the steps from here.

Installation

tns plugin add nativescript-play-livesync

Configuration

As the plugin needs the a scheme to restart the current application when needed, the following configurations should be present in the application's App_Resources folder:

Android

The following activity configuration should be added to the AndroidManifest.xml file somewhere above <activity android:name="com.tns.ErrorReportActivity"/> if you want to use nsplay scheme:

<activity
    android:name="com.tns.playlivesync.NativeScriptActivity"
    android:configChanges="keyboardHidden|orientation|screenSize"
    android:launchMode="singleTask">

        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="nsplay"/>
    </intent-filter>
</activity>

iOS

Add in Info.plist file the following configurations:

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string>org.nativescript.playground</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>nsplay</string>
            </array>
        </dict>
    </array>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>nsplayqr</string>
</array>

In the configuration above there are 3 values that need to be set:

  • nsplay - the scheme of the current application which is needed to generate a url with the following format nsplay://.... that will be used for restarting the application with given arguments
  • nsplayqr - the scheme of the QR application which is used for restarting the current application
  • org.nativescript.playground - the CFBundleURLName is used in the plugin only to get the first item of the CFBundleURLSchemes array from the dictionary having CFBundleURLName property set. This is needed as some plugins may add additional CFBundleURLSchemes and we may end up resolving them as the application scheme. So we used this property to distinguish the right dictionary in the CFBundleURLTypes array.

License

Apache License Version 2.0, January 2004

FAQs

Package last updated on 22 Sep 2020

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