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.
- Node.js
- NativeScript CLI
- 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';
-
- 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.
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.
Feel free to submit issues or pull requests if you have suggestions or improvements!
This script is provided "as is" without warranty of any kind. Use at your own risk.
Happy coding! 🚀