tdermendjiev / ns-embed-livesync

Livesync for NS embedders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NativeScript Simulator LiveSync for Embedders

This repository provides a simple script for NativeScript embedders to "livesync" their NativeScript apps to their iOS simulators. It's designed to be invoked after the ns prepare ios command.

Prerequisites

  • Node.js
  • NativeScript CLI

Setup

  1. Clone this repository:
git clone https://github.com/tdermendjiev/ns-embed-livesync
  1. Navigate to the directory:
cd ns-embed-livesync
  1. Install the required npm packages:
npm install
  1. Modify the placeholders in the index.js script:

    • projectFilesPath: The path to your NativeScript project's iOS platform files. For example:

      const projectFilesPath = "/path/to/your/project/platforms/ios/yourprojectname/app";
    • appId: The bundle identifier of your app. For example:

      const appId = 'com.mycompany.MyCoolApp';

Usage

  1. Prepare your NativeScript app for iOS:
ns prepare ios
  1. Run the script:
node index.js

This will sync your app's content to all running iOS simulators.

Troubleshooting

If you encounter any issues, ensure:

  • Your iOS simulators are running.
  • You've correctly set the projectFilesPath and appId in the index.js script.
  • You've installed all required npm packages.

Contributing

Feel free to submit issues or pull requests if you have suggestions or improvements!

License

This script is provided "as is" without warranty of any kind. Use at your own risk.


Happy coding! 🚀

About

Livesync for NS embedders


Languages

Language:JavaScript 100.0%