• Stars
    star
    101
  • Rank 336,174 (Top 7 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A JavaScript IDE for accessing a phone/tablet's native runtime via NativeScript bindings!

NS:IDE
NS:IDE

NS:IDE is the NativeScript IDE that lets you get 'inside' your device.

Access any native functionality at run-time by calling a Javascript API that binds to the Obj-C (iOS) or Java (Android) run-time.

Features

  • Made in NativeScript
  • Syntax highlighting
  • Very dangerous auto-complete functionality based on eval()
  • Access to the whole native run-time, fully documented on nativescript.org for both iOS and Android (see note below)
  • Potential to introduce TypeScript, if a contributor is feeling brave, or at least TypeScript's auto-completion (NativeScript is fully-typed!)

NOTE: I haven't yet implemented Android support because I lack the expertise to produce a syntax highlighter component for it, but it's perfectly possible in future.

Demo

See my teaser tweet for a video demo.

Example screenshots

auto-complete native manipulation

Example usage

See the 'Examples' tab in-app (or view them in this repo).

See also my grimoire detailing many fun things to invoke.

API Documentation

The built-in auto-complete gets you the method and property names, but doesn't tell you what params to enter into functions. For this, you need to either make a good guess of what the JS-syntax equivalent is from how the native method is invoked (which is easy if the params are all primitives like numbers), or refer to the API documentation.

I myself use my custom TypeScript Playground loaded with the appropriate tns-platform-declarations for each platform, as the official NativeScript Playground crashes if you add /// <reference path="../tns-platform-declarations/ios.d.ts" />.

My NativeScript Playground is available:

You can consult the official documentation at: https://docs.nativescript.org

It's also immensely helpful to view the platform declarations directly: https://github.com/NativeScript/NativeScript/tree/master/tns-platform-declarations

Setup

This project assumes the following folder hierarchy:

.
β”œβ”€β”€ nside
└── nativescript-syntax-highlighter

Where nside is this git repository, and nativescript-syntax-highlighter is the git repository of my NativeScript Syntax Highlighter plugin. That is to say, they are expected to be siblings.

Get my NativeScript Syntax Highlighter plugin

I haven't published it to npm, so you'll have to clone it from here:

git clone [email protected]:shirakaba/nativescript-syntax-highlighter.git

Install NS:IDE dependencies

In the root directory for this project (nside), run this command:

npm install

And then maybe make yourself one of these: β˜•οΈ

(Build and) run

To run for iOS (Android is not supported yet):

# Compile the TypeScript sources to JS.
# (Do this in a separate terminal, as it's an interactive command)
./node_modules/.bin/tsc --watch

# Build-and-run on a simulator or real phone.
# (This is shorthand for "prepare, build and deploy".)
tns run ios

And now maybe make yourself one of these: 🍡

Full documentation for tns run ios here. Useful flags to pass:

  • --hmr: activates hot module reloading (I highly recommend it).
  • --bundle: I fall back to this when webpack starts misbehaving under --hmr.
  • --clean: forces a complete rebuild. Useful if you run into caching problems.
  • --emulator: instructs NativeScript to run the app in the iOS Simulator even if you have your device connected.

Licence

Libraries

The NativeScript libraries are Apache-licensed (NativeScript-Licence.txt), whereas this project itself use a GPL 3 licence LICENCE.txt.

NativeScript Syntax Highlighter is Apache 2.0 licensed, and makes use of the MIT-licensed Highlightr iOS native library.

Art

The NS:IDE logo itself is made from images from the Firefox OS emojis under the Creative Commons Attribution 4.0 International (CC BY 4.0) licence. Modifications are as follows, and the Photoshop file can be consulted here (appicon.psd).

  • u1F50D-leftmagnifyingglass – colours adjusted, and glass portion made transparent
  • u1F4AC-speechbubble – colours adjusted, and masked off to show only the speech lines
  • u1F4F1-cellphone – colours adjusted
  • u1F52C-microscope – (unused in the end, but present in the Photoshop file)
  • u1F5AE-wiredkeyboard – (unused in the end, but present in the Photoshop file)

More of my stuff

  • LinguaBrowse (iOS) on the App Store – made in Swift
  • LinguaBrowse (macOS) on the App Store – made in React Native + TypeScript + Swift
  • Plucky Box (iOS) on the App Store, GitHub, expo.io as Android/iOS – made in React Native + TypeScript
  • @LinguaBrowse – my Twitter account. I talk about NativeScript, React Native, TypeScript, Chinese, Japanese, and my apps on there.

More Repositories

1

react-nativescript

React renderer for NativeScript
TypeScript
280
star
2

react-native-native-runtime

The Objective-C runtime exposed directly to React Native via JSI (Java runtime may follow)!
Objective-C++
239
star
3

react-native-web-browser-app

Not another wrapper around SFSafariViewController. A fully-featured, cross-platform web browser written in React Native.
TypeScript
58
star
4

react-native-typescript-2d-game

A simple 2D game (called The Box) implemented in React Native, as an Expo app, using TypeScript.
TypeScript
37
star
5

crank-native

A Crank renderer for iOS and Android apps, based on NativeScript.
TypeScript
25
star
6

dom-events-wintercg

A standalone implementation of the DOM Events APIs, extracted from the Node.js codebase, for usage in WinterCG runtimes.
JavaScript
17
star
7

react-native-nativescript-runtime

Use the NativeScript runtime from React Native
Java
14
star
8

subscripto

An app that handles subscriptions and local receipt validation – used in a real app, LinguaBrowse!
C
14
star
9

react-native-safe-popover

A faithful port of UIPopoverPresentationController, which respects the safe area, to React Native.
TypeScript
10
star
10

nativescript-grimoire

A grimoire of NativeScript incantations to invoke native APIs
9
star
11

mecab-ko

A fork of Mecab, with support for both Japanese and Korean, organised as a Cocoapod and npm package for usage with iOS/macOS.
C++
7
star
12

nativescript-html

HTML and some web platform features for NativeScript
TypeScript
7
star
13

cocoapojs

CocoaPods, ported to JavaScript
TypeScript
7
star
14

uikit-dom

Implementing DOM for UIKit; wish me luck
Swift
6
star
15

jp-pitch-accent

A demo of how to use Svelte components to take Japanese pitch accent notes.
Svelte
6
star
16

nativescript-syntax-highlighter

Syntax Highlighter for NativeScript. Currently only supports iOS (being completely based on Highlightr).
CSS
6
star
17

clang_metagen_deno

A Deno-based program for generating FFI metadata for languages like Obj-C using the Clang APIs.
TypeScript
6
star
18

react-nativescript-navigation

React Navigation integration for React NativeScript
TypeScript
4
star
19

react-nativescript-compat-react-native

Compatibility layer to allow React NativeScript projects to run React Native codebases
TypeScript
3
star
20

mecab-naist-jdic-utf-8

mecab-naist-jdic (a Japanese dictionary for use with Mecab), in UTF-8 format, organised as a Cocoapod and npm package for usage with iOS/macOS.
Ruby
3
star
21

pitch-accent

Predict pitch accent in Japanese
TypeScript
2
star
22

elementr

Convenience framework for assembling and styling a tree of HTML Elements.
TypeScript
2
star
23

seiyuu-ranker

Visualise which seiyuus were the most prolific in a given year or season.
Svelte
2
star
24

rnobjc

Repo for the code behind my React Native EU 2022 talk, "How to access all the Objective‑C APIs using JSI". A cleaner version of shirakaba/react-native-native-runtime.
Objective-C++
2
star
25

rpstrackerrns

Alex Ziskind's RPS Tracker app, ported from NativeScript Core to React NativeScript
TypeScript
2
star
26

react-nativescript-site

Source code for the React NativeScript documentation website
JavaScript
2
star
27

tns-template-blank-crank

NativeScript CLI template for building a Crank Native app.
JavaScript
1
star
28

migrate-ts-loader-to-babel-loader

JavaScript
1
star
29

url-wintercg

A polyfill for WHATWG URL and related APIs, powered by Ada.
C++
1
star
30

GrafanaSimpleJsonValueMapper-docker

Docker container for setting up GrafanaSimpleJsonValueMapper.
Shell
1
star
31

anime-diverge

JavaScript
1
star
32

JBSearchBar

React Native searchbar implemented in Swift
Swift
1
star
33

easytimeline-docker

EasyTimeline, Dockerised
Perl
1
star
34

react-nativescript-pikatalk

A real-world app, based on HelloTalk, made with React NativeScript.
TypeScript
1
star
35

rns-browser

[Under construction] A browser written in React NativeScript, based on the Cliqz and Firefox iOS browser UIs.
TypeScript
1
star
36

executor

Wrap up any executable as a Cocoa app!
Swift
1
star
37

Kanji-etymology-browser

Tools to create a lightweight, browsable digital version using scans of the 1988 kanji etymology paperback dictionary by Kenneth G. Henshall. For personal educational use.
HTML
1
star
38

nativescript-flowlayout

TypeScript
1
star
39

jmdict-sqlite

A crude script to download a release of `jmdict-simplified` and build an SQLite database from it.
JavaScript
1
star