Skip to content

Commit 768363f

Browse files
committed
Updates for {N} 2.0
1 parent abb8e93 commit 768363f

File tree

6 files changed

+12
-44
lines changed

6 files changed

+12
-44
lines changed

images/chapter1/ios/2.png

13.6 KB
Loading

index.html

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1>Building Apps with NativeScript and Angular 2</h1>
3030
<h2 id="building-apps-with-nativescript-and-angular-2">Building Apps with NativeScript and Angular 2</h2>
3131
<p>Welcome to the NativeScript &amp; Angular 2 getting started guide 📚. In this hands-on tutorial, you’ll build a cross-platform iOS and Android app from scratch.</p>
3232
<blockquote>
33-
<p><strong>IMPORTANT</strong>: NativeScript’s Angular integration is in beta. Refer to <a href="#chapter8.0">this guide’s appendix</a> for a list of known issues that may affect you while going through this tutorial.</p>
33+
<p><strong>IMPORTANT</strong>: NativeScript’s Angular integration is in beta. If you run into any issues completing this guide, please log those issues on our <a href="https://github.com/NativeScript/nativescript-angular/issues">nativescript-angular GitHub repo</a>.</p>
3434
</blockquote>
3535
<h3 id="what-is-nativescript-what-is-angular-2-">What is NativeScript? What is Angular 2?</h3>
3636
<div class="intro-box">
@@ -88,7 +88,7 @@ <h4 class="exercise-start">
8888

8989
<p><strong>Step 1: Install Node.js</strong></p>
9090
<p>The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.</p>
91-
<p>You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing <code>node --version</code>. If you get an error, head to the <a href="https://nodejs.org/">https://nodejs.org/</a> and download and install the latest “LTS” distribution for your development machine.</p>
91+
<p>You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing <code>node --version</code>. If you get an error, head to the <a href="https://nodejs.org/">https://nodejs.org/</a> and download and install the latest “LTS” (long-term support) distribution for your development machine.</p>
9292
<blockquote>
9393
<p><strong>TIP</strong>: The NativeScript CLI supports a wide variety of Node.js versions, so if you already have Node.js installed you should be good to go. If, by chance, you’re running an unsupported version, the <code>tns doctor</code> command we’ll run momentarily will flag the problem so you can upgrade.</p>
9494
</blockquote>
@@ -211,14 +211,9 @@ <h4 class="exercise-start">
211211
</h4>
212212

213213
<p>If your previous <code>tns run ios</code> or <code>tns run android</code> task is still running, type <code>Ctrl+C</code> in your terminal to kill it.</p>
214-
<!--
215-
If you’re on a Mac, start an iOS livesync watcher by executing the following command:
216-
217-
```
218-
tns livesync ios --emulator --watch
219-
```
220-
-->
221-
<p>If you have your app running on an Android emulator, start an Android livesync watcher by executing the following command:</p>
214+
<p>If you’re on a Mac, start an iOS livesync watcher by executing the following command:</p>
215+
<pre><code>tns livesync ios --emulator --watch
216+
</code></pre><p>If you have your app running on an Android emulator, start an Android livesync watcher by executing the following command:</p>
222217
<pre><code>tns livesync android --emulator --watch
223218
</code></pre><p>If you instead have your app running on a USB-connected Android device or Genymotion virtual device, run the same command without the <code>--emulator</code> flag:</p>
224219
<pre><code>tns livesync android --watch
@@ -236,8 +231,8 @@ <h4 class="exercise-start">
236231
export class AppComponent {}
237232
</code></pre>
238233
<p>Save <code>app/app.component.ts</code> and you should see the app relaunch and the updated text displayed.</p>
239-
<p><img src="images/chapter1/android/2.png" alt="Updated Android text"></p>
240-
<p>If you’re on a Mac building for iOS, the workflow is currently a bit different, as the <code>tns livesync ios</code> command is not yet supported. (See the <a href="#chapter8.0">known issues</a> for details.) To see the updated text on iOS, type <code>Ctrl+C</code> to kill your previous <code>tns run ios</code> command, and then re-execute <code>tns run ios --emulator</code> to launch the app with your changes.</p>
234+
<p><img src="images/chapter1/ios/2.png" alt="Updated iOS text">
235+
<img src="images/chapter1/android/2.png" alt="Updated Android text"></p>
241236
<div class="exercise-end"></div>
242237

243238
<p>Regardless of whether you’re running on iOS or Android, or whether you’re using <code>tns livesync</code> or <code>tns run</code>, the NativeScript CLI shows the output of <code>console.log()</code> statements as your app executes, as well as stack traces when things go wrong. So if your app crashes at any time during this guide, look to the terminal for a detailed report of the problem.</p>
@@ -249,7 +244,7 @@ <h4 class="exercise-start">
249244
E/TNS.Native( 2063): File: &quot;/data/data/org.nativescript.groceries/files/app/./views/login/login.js, line: 13, column: 4
250245
</code></pre><blockquote>
251246
<p><strong>TIP</strong>: When you&#39;re trying to debug a problem, try adding <code>console.log()</code> statements in your JavaScript code—exactly as you would in a browser-based application.</p>
252-
<p><strong>WARNING</strong>: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (<code>Info.plist</code>, <code>AndroidManifest.xml</code>, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use <code>Ctrl+C</code> to stop livesync, and rerun the application using the <code>tns run android</code> command. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.</p>
247+
<p><strong>WARNING</strong>: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (<code>Info.plist</code>, <code>AndroidManifest.xml</code>, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use <code>Ctrl+C</code> to stop livesync, and rerun the application using the <code>tns run ios</code> or <code>tns run android</code> commands. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.</p>
253248
</blockquote>
254249
<p>Now that you&#39;ve created an app, configured your environment, and set up your app to run on iOS and Android, you&#39;re ready to start digging into the files that make up a NativeScript app.</p>
255250

@@ -1982,17 +1977,6 @@ <h3 id="let-us-know-what-you-think">Let us know what you think</h3>
19821977
<p>Finally, we’d love if you could take a minute to tell us what you thought about the this guide. Your feedback helps us make this tutorial better.</p>
19831978
<iframe src="https://docs.google.com/forms/d/1r0q8YJ7yzXcDClfu29FTFITvU1_x-2MdGjZBMPrSXCw/viewform?embedded=true" width="760" height="1300" style="max-width: 100%;" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
19841979

1985-
</div>
1986-
<div class="chapter">
1987-
<h2 id="appendix">Appendix</h2>
1988-
<h3 id="known-issues">Known issues</h3>
1989-
<p>As NativeScript’s Angular integration is still in beta, there are a few outstanding issues you may hit while completing this guide. Here are the major ones:</p>
1990-
<ul>
1991-
<li><strong>1</strong>) You may get a “Service exited due to signal: Killed: 9” error when deploying an app to an iOS simulator. If you hit this issue, <a href="https://github.com/NativeScript/nativescript-angular/issues/101">refer to the GitHub issue</a> for details on the problem and workarounds.</li>
1992-
<li><strong>2</strong>) The <code>tns livesync</code> command currently does not work on iOS apps. Because of this, for now, you must run <code>tns run ios --emulator</code> after each change you make to your app in order to see the changes rendered. <a href="https://github.com/NativeScript/nativescript-angular/issues/167">Follow this problem’s GitHub issue</a> for updates.</li>
1993-
</ul>
1994-
<p>You can refer to the <a href="https://github.com/NativeScript/nativescript-angular/issues">nativescript-angular</a> repo on GitHub for a <a href="https://github.com/NativeScript/nativescript-angular/issues">full list of issues</a>, and to <a href="https://github.com/NativeScript/nativescript-angular/issues/new">report any problems you have</a>.</p>
1995-
19961980
</div>
19971981
</div>
19981982
</div>

src/chapters/chapter0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Welcome to the NativeScript & Angular 2 getting started guide 📚. In this hands-on tutorial, you’ll build a cross-platform iOS and Android app from scratch.
44

5-
> **IMPORTANT**: NativeScript’s Angular integration is in beta. Refer to [this guide’s appendix](#chapter8.0) for a list of known issues that may affect you while going through this tutorial.
5+
> **IMPORTANT**: NativeScript’s Angular integration is in beta. If you run into any issues completing this guide, please log those issues on our [nativescript-angular GitHub repo](https://github.com/NativeScript/nativescript-angular/issues).
66
77
### What is NativeScript? What is Angular 2?
88

src/chapters/chapter1.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The NativeScript CLI has a few system requirements you must have in place before
1414

1515
The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.
1616

17-
You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing `node --version`. If you get an error, head to the https://nodejs.org/ and download and install the latest “LTS” distribution for your development machine.
17+
You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing `node --version`. If you get an error, head to the https://nodejs.org/ and download and install the latest “LTS” (long-term support) distribution for your development machine.
1818

1919
> **TIP**: The NativeScript CLI supports a wide variety of Node.js versions, so if you already have Node.js installed you should be good to go. If, by chance, you’re running an unsupported version, the `tns doctor` command we’ll run momentarily will flag the problem so you can upgrade.
2020
@@ -204,13 +204,11 @@ At this point, you have the NativeScript CLI downloaded and installed, as well a
204204
205205
If your previous `tns run ios` or `tns run android` task is still running, type `Ctrl+C` in your terminal to kill it.
206206
207-
<!--
208207
If you’re on a Mac, start an iOS livesync watcher by executing the following command:
209208
210209
```
211210
tns livesync ios --emulator --watch
212211
```
213-
-->
214212
215213
If you have your app running on an Android emulator, start an Android livesync watcher by executing the following command:
216214
@@ -242,10 +240,9 @@ export class AppComponent {}
242240

243241
Save `app/app.component.ts` and you should see the app relaunch and the updated text displayed.
244242

243+
![Updated iOS text](images/chapter1/ios/2.png)
245244
![Updated Android text](images/chapter1/android/2.png)
246245

247-
If you’re on a Mac building for iOS, the workflow is currently a bit different, as the `tns livesync ios` command is not yet supported. (See the [known issues](#chapter8.0) for details.) To see the updated text on iOS, type `Ctrl+C` to kill your previous `tns run ios` command, and then re-execute `tns run ios --emulator` to launch the app with your changes.
248-
249246
<div class="exercise-end"></div>
250247

251248
Regardless of whether you’re running on iOS or Android, or whether you’re using `tns livesync` or `tns run`, the NativeScript CLI shows the output of `console.log()` statements as your app executes, as well as stack traces when things go wrong. So if your app crashes at any time during this guide, look to the terminal for a detailed report of the problem.
@@ -266,6 +263,6 @@ E/TNS.Native( 2063): File: "/data/data/org.nativescript.groceries/files/app/./vi
266263

267264
> **TIP**: When you're trying to debug a problem, try adding `console.log()` statements in your JavaScript code—exactly as you would in a browser-based application.
268265
269-
> **WARNING**: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (`Info.plist`, `AndroidManifest.xml`, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use `Ctrl+C` to stop livesync, and rerun the application using the `tns run android` command. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.
266+
> **WARNING**: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (`Info.plist`, `AndroidManifest.xml`, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use `Ctrl+C` to stop livesync, and rerun the application using the `tns run ios` or `tns run android` commands. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.
270267
271268
Now that you've created an app, configured your environment, and set up your app to run on iOS and Android, you're ready to start digging into the files that make up a NativeScript app.

src/chapters/chapter8.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/index.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ <h1>Building Apps with NativeScript and Angular 2</h1>
5151
<div class="chapter">
5252
@@include(markdown("chapters/chapter7.md"))
5353
</div>
54-
<div class="chapter">
55-
@@include(markdown("chapters/chapter8.md"))
56-
</div>
5754
</div>
5855
</div>
5956
</div>

0 commit comments

Comments
 (0)