NativeScript / NativeScript/nativescript-cli

Allow building a Custom Preview App and using it with `tns preview`

Open
#4,045 0 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature preview
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.

NativeScript Playground is an amazing developer experience for some really quick tests. Sometimes I test something in the Playgrounds just because it's a great, fast and reliable sandbox. There's not always the intention to share the Playground.

From time to time I want to try something in a Playground that is not possible. That's usually because some native library is missing. I understand the reason for that. Anyways this feature request is all about a solution to this problem. A solution that allows fast, reliable testing over the air. No cables required. A solution however that is not as easy to share.

See: https://www.nativescript.org/blog/join-the-nativescript-5.0-launch-webinar#comment-4151225217

Describe the solution you'd like

Please consider adding a --custom-preview CLI param so we can:

  1. Add native libraries to our own custom preview app
  2. Run tns preview --hmr --custom-preview
  3. Scan the QR code with a Phone and run the app

This would give us a very fast, flexible dev experience. No cables needed.

Maybe something like tns deploy ios --custom-preview could build and deploy a custom preview app with the dependencies of our package.json file.

One thing that is really important to consider when reviewing this request:

A user would be able to build one custom preview app with a whole lot of plugins and reuse that for many different codebases to quickly fiddle around. The idea is not to run tns deploy ios --custom-preview on a daily basis. This is for situations where you might want to fiddle around with a NativeScript next version or something along those lines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tns preview --hmr flow and compare it with tns deploy ios, focusing on how package.json dependencies, custom native libraries, QR-code delivery, and preview-app reuse would fit together. Done means users can build a custom preview app with their native dependencies, reuse it across projects, and launch it over the air without cables.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.