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
- Clone this repository:
git clone https://github.com/tdermendjiev/ns-embed-livesync
- Navigate to the directory:
cd ns-embed-livesync
- Install the required npm packages:
npm install
-
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
- Prepare your NativeScript app for iOS:
ns prepare ios
- 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
andappId
in theindex.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! 🚀