Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brodycj/cordova-plugin-syr-core-experimental

Native Cordova view plugin using syr core - EXPERIMENTAL
https://github.com/brodycj/cordova-plugin-syr-core-experimental

Last synced: about 2 months ago
JSON representation

Native Cordova view plugin using syr core - EXPERIMENTAL

Awesome Lists containing this project

README

        

# Native Cordova view using syr core - experimental work

Experimental adaptations to syr.js core to work as a Cordova plugin for Android and iOS, with help from some extra WebView hacks

using local webpack dev server for now

LICENSE: MIT

## Usage

Note: these directions assume knowledge of Cordova framework and some familiarity with syr.js.

On a Cordova project:

- Add this plugin to the Cordova project
- Update the application JavaScript to execute the following after receiving the `deviceready` event:

```js
cordova.exec(null, null, 'SYRPlugin', 'start', [])
```

Do the following steps on before running the app
(from [Running the local Sample](#running-the-local-sample) section below):

* Clone the repo
* `npm install`
* `npm run serve`

Then run the app on Android emulator or iOS simulator.

## Demo project

Cordova demo project along with instructions at:

### Screenshots

With black number labels as proposed in [syrjs / core#274](https://github.com/syrjs/core/pull/274)

#### Android

![Calculator demo on Android](https://user-images.githubusercontent.com/1559888/45881127-3fdd6800-bd78-11e8-9f04-82cf42dbed66.png)

#### iOS

![Calculator demo on iOS](https://user-images.githubusercontent.com/1559888/45881159-5b487300-bd78-11e8-8f92-bb4620d104cd.png)

## Major issues

* Use of extra dialog on Android breaks operation of back button
* Images do not seem to work

## Other TODO items

* Export cleaner JavaScript startup API
* Fix to use native HTML and JavaScript from assets instead of local webpack server
* Support for using bundled JavaScript part of syr.js core within a Cordova project
* Fix SyrBridge to work with existing Cordova WebView on Android and iOS
* Remove extra Android and iOS artifacts not needed

## For future consideration

* Support for concurrent native views, possibly with multiple JavaScript execution contexts

## End of Cordova plugin documentation

# original documentation for syr js - development version


syr

syr


minimally obtrusive reactisque view engine, aimed at native developers


[![Build Status](https://travis-ci.org/syrjs/core.svg?branch=master)](https://travis-ci.org/syrjs/syr)
[![NPM Version](https://img.shields.io/npm/v/@syr/core.svg)](https://www.npmjs.com/package/@syr/core)
[![Coverage Status](https://coveralls.io/repos/github/syrjs/core/badge.svg?branch=master)](https://coveralls.io/github/dmikey/syr?branch=master)
[![Docs](https://img.shields.io/badge/docs-1.3.0-blue.svg?style=flat)](https://syr.js.org)

Build dynamic UIs for Native Platforms, with less than 200kb of extra libraries!

The goal to provide, Native SDK developers the benefits of the React Native API, with a much smaller footprint and reduced complexity.

Easily package Syr with your Native SDKs and Apps and drive dynamic updatable experiences with JavaScript.

Syr uses a React like API with a custom JS API bridge, that allows an SDK developer to bundle an updatable experience through Apple's iTunes terms.

### help

gitter: https://gitter.im/syrjs/general

otherwise open an issue.

### breaking change

`syr` moved to scoped packages. Please move to `@syr/core`.

### Read the Docs

https://syr.js.org

### Getting Started

Install

```bash
npm i @syr/core
```

### Roadmap

Even (starting with 2) releases are stable, Odd (starting with 1) releases are development builds. Every fourth (starting with 4.0.0) release is an LTS and will be branched as well as tagged.

* LTS Currently means support beyond 2 Stable Releases. Support for 4.0.0 will be sunset when 8.0.0 is released, as 6.0.0 will become the lowest LTS version.

How contributions will be scheduled for intake starting with version 2.0.0.

Major

* Any Native Code Change in the Core Library Results in an Immediate Major Change.
* Any Guest deprecations must force a major change.

Minor

* Any Guest System Rendering Changes.
* If new dependent features are changed, which causes instability it must be promoted to `Major` release schedule.

Patch

* Corrects undesired consistent behavior.
* Adds new features without collision

https://github.com/syrjs/syr/milestones

### Development Example

![native_checkout_syr](https://user-images.githubusercontent.com/328000/33408997-0ceecb7e-d52e-11e7-8f63-ca2f984751f7.gif)

### Running the local Sample

First steps:

* Clone the repo
* `npm install`
* `npm run serve`

To run on iOS simulator:

* Open [ios/SyrNativeSample](https://github.com/dmikey/syr/tree/master/ios/SyrNativeSample/SyrNativeSample.xcodeproj) in xcode
* Run the project in xcode.

To run on Android emulator, using Gradle:

* `cd android && ./gradlew installDebug`
* run the app on the Android emulator

## Contributors

[dmikey](https://github.com/dmikey) |[MSiddharthReddy](https://github.com/MSiddharthReddy) |[pvenkatakrishnan](https://github.com/pvenkatakrishnan) |[gabrielcsapo](https://github.com/gabrielcsapo) |[edwinwebb](https://github.com/edwinwebb) | [Sherman-Chen](https://github.com/Sherman-Chen)
:---:|:---:|:---:|:---:|:---:|:---:|
[dmikey](https://github.com/dmikey)|[MSiddharthReddy](https://github.com/MSiddharthReddy)|[pvenkatakrishnan](https://github.com/pvenkatakrishnan)|[gabrielcsapo](https://github.com/gabrielcsapo)| [edwinwebb](https://github.com/edwinwebb)|[Sherman-Chen](https://github.com/Sherman-Chen)



syr