Skip to content

Commit a2aa35b

Browse files
committed
Xamarin docs updated
1 parent a55eb89 commit a2aa35b

File tree

1 file changed

+30
-38
lines changed

1 file changed

+30
-38
lines changed

doc/Development-Guide-Xamarin.html

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
font-weight: 300;
1818
}
1919
</style>
20-
2120
<h3>Introduction</h3>
2221
<p>Xamarin is a cross-platform UI toolkit that allows developers to efficiently
2322
create native cross platform user interface layouts.<br>
@@ -66,8 +65,8 @@ <h4>Android</h4>
6665
<img class="img-thumbnail" alt="Xamarin Android Options" src="images/options-android-vs-sml.png" />
6766
<h4>Mac System Requirements</h4>
6867
<p>You can use Visual Studio for Mac to develop Xamarin.Forms apps on OS X El Capitan
69-
(10.11) or newer. To develop iOS apps, it is <span lang="EN-US">recommended</span><span lang="EN-US" style="font-size: 10.5pt; line-height: 107%; font-family: open_sans,serif; color: #4E4E4E; letter-spacing: .75pt">
70-
</span>having at least the iOS 10 SDK and Xcode latest installed.</p>
68+
(10.11) or newer. To develop iOS apps, it is recommended Having at least the iOS
69+
10 SDK and Xcode latest installed.</p>
7170
<h4>Windows System Requirements</h4>
7271
<p>Xamarin.Forms apps for iOS and Android can be built on any Windows installation
7372
that supports Xamarin development. A networked Mac is required for iOS development.
@@ -81,21 +80,18 @@ <h4>Solution Structure (Layers)</h4>
8180
<li><strong>.All</strong> All the projects included.</li>
8281
</ul>
8382
<p>For Xamarin development, you can open <b>.Mobile.sln</b>.</p>
84-
8583
<div class="image-container">
86-
<img class="img-thumbnail" alt="ASP.NET Zero Xamarin Architecture" src="images/xamarin-architecture.png" />
87-
<p>Xamarin Architecture</p>
84+
<img class="img-thumbnail" alt="ASP.NET Zero Xamarin Architecture" src="images/xamarin-architecture.png" />
85+
<p>Xamarin Architecture</p>
8886
</div>
89-
9087
<div class="image-container">
9188
<img class="img-thumbnail" alt="ASP.NET Zero Mobile Solution" src="images/mobile-solution-overview.png" />
9289
<p>Mobile Solution</p>
9390
</div>
94-
9591
<p>There are 6 projects in the mobile solution:</p>
9692
<ul>
97-
<li><strong>Core.Shared</strong> project basic <span lang="EN-US">primitive</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 107%; font-family: 'Times New Roman',serif">
98-
</span>types as consts, enums used in all layers of the solution.</li>
93+
<li><strong>Core.Shared</strong> project basic primitive types as consts, enums
94+
used in all layers of the solution.</li>
9995
<li><strong>Application.Shared</strong> project contains data transfer objects
10096
(DTOs) and interfaces of application services shared with application layer
10197
of the backend.</li>
@@ -106,6 +102,7 @@ <h4>Solution Structure (Layers)</h4>
106102
<li><strong>Mobile.iOS</strong> project contains IOS specific classes.</li>
107103
<li><strong>Mobile.Droid</strong> project contains Android specific classes.</li>
108104
</ul>
105+
<h3>Debugging</h3>
109106
<h4>Host</h4>
110107
<p>To start debugging Xamarin app you need to configure host settings. You can use
111108
either <b>Web.Mvc</b> or <b>Web.Host </b>to feed the Xamarin app.<br>
@@ -137,7 +134,7 @@ <h4>Host</h4>
137134
Do not start Web.Mvc or Web.Host project via Visual Studio. Default settings
138135
of Visual Studio does not allow connections except localhost.</div>
139136
</div>
140-
<p><font color="#339933"><i class="fa fa-info-circle"></i>We have successfully started
137+
<p><font color="#339933"><i class="fa fa-info-circle"></i> We have successfully started
141138
host. Now we can configure Xamarin app to connect this host.</font></p>
142139
<h4>Debugging Xamarin App</h4>
143140
<p>To start debugging you need to change the IP address in <b>DebugServerIpAddresses</b>
@@ -164,8 +161,7 @@ <h4>Debugging Android</h4>
164161
<p>To start debugging Android app, you have to install Xamarin.Android. It&#39;s
165162
highly recommended you to read the
166163
<a href="https://developer.xamarin.com/guides/android/getting_started/installation/">
167-
Xamarin Android Setup and Deployment document</a> for <span lang="EN-US">necessary</span><span lang="EN-US" style="font-size: 10.5pt; line-height: 107%; font-family: open_sans,serif; color: #4E4E4E; letter-spacing: .75pt">
168-
</span>setups.<br>
164+
Xamarin Android Setup and Deployment document</a> for necessary setups.<br>
169165
</p>
170166
</div>
171167
<p>After successful setup, set <strong>Mobile.Droid</strong> as startup project.
@@ -193,28 +189,27 @@ <h4>Debugging IOS</h4>
193189
<br>
194190
<br>
195191
<div class="bs-callout bs-callout-warning">
196-
<p><i class="fa fa-warning"></i> <a href="https://www.xamarin.com/live/">Xamarin
192+
<p><i class="fa fa-warning"></i><a href="https://www.xamarin.com/live/">Xamarin
197193
Live Player</a> currently does not support some of the key features. Thus Asp.Net
198194
Zero Xamarin application cannot be debugged on Xamarin Live Player. Further
199195
information read
200196
<a href="https://developer.xamarin.com/guides/cross-platform/live/limitations/">
201197
Xamarin Live Player limitations.</a></p>
202198
</div>
203199
<div class="bs-callout bs-callout-info">
204-
<p><i class="fa fa-info-circle"></i> <a href="https://www.livexaml.com/">LiveXAML</a>
205-
is a Xaml previewer runs while you are debugging your application inside
206-
an emulator. Whenever you save any XAML file, it automatically updates the running
200+
<p><i class="fa fa-info-circle"></i><a href="https://www.livexaml.com/">LiveXAML</a>
201+
is a Xaml previewer runs while you are debugging your application inside an
202+
emulator. Whenever you save any XAML file, it automatically updates the running
207203
application. If you want to purchase LiveXAML, Asp.Net Zero customers get %30
208204
discount. </p>
209205
</div>
210206
<h3>Xamarin.Forms</h3>
211207
<p>A key component of building cross-platform applications is being able to share
212208
code across various platform-specific projects. Asp.Net Zero Xamarin is using Xamarin.Forms
213-
to maximize code sharing between two end platforms (IOS &amp; Android). It is
214-
<span lang="EN-US">expected</span><span lang="EN-US" style="font-size: 10.5pt; line-height: 107%; font-family: open_sans,serif; color: #4E4E4E; letter-spacing: .75pt">
215-
</span>to write shared codes in Mobile.Shared project so that it will be used in
216-
both IOS and Android. If you need platform specific development then try to use
217-
class abstractions in shared project and implement/extend in end platforms. </p>
209+
to maximize code sharing between two end platforms (IOS &amp; Android). It is expected
210+
to write shared codes in Mobile.Shared project so that it will be used in both IOS
211+
and Android. If you need platform specific development then try to use class abstractions
212+
in shared project and implement/extend in end platforms. </p>
218213
<h4>Mobile.Droid</h4>
219214
<p>Xamarin Android project has a very basic structure. Asp.Net Zero adds or modifies
220215
these files in the default project; </p>
@@ -330,12 +325,11 @@ <h6>MVVM</h6>
330325
for a view is automatically set when <b>AutoWireViewModel</b> flag set to
331326
true. There&#39;s a naming convention between ViewModels and Views. A xaml filename
332327
must end with View postfix and the binding context of the xaml filename
333-
must end with ViewModel postfix. <span lang="EN-US">For example </span>&nbsp;if
334-
xaml filename is <i>ProductView.xaml </i>the corresponding view model filename
335-
must be <i>ProductViewModel.cs.</i></p>
336-
<p>There&#39;s an <span lang="EN-US">empty </span>sample view called <i>_SampleView.xaml</i>
337-
and binding context as <i>_SampleViewModel.cs</i>. You can copy paste these
338-
empty templates to add a new blank page.</p>
328+
must end with ViewModel postfix. For example if xaml filename is <i>ProductView.xaml</i>
329+
the corresponding view model filename must be <i>ProductViewModel.cs.</i></p>
330+
<p>There&#39;s an empty sample view called <i>_SampleView.xaml</i> and binding
331+
context as <i>_SampleViewModel.cs</i>. You can copy paste these empty templates
332+
to add a new blank page.</p>
339333
<pre>&lt;ContentPage
340334
...
341335
<span style="background-color: #FFFF00">base:ViewManager.AutoWireViewModel=&quot;true&quot;</span>
@@ -416,16 +410,14 @@ <h6>Navigation Service</h6>
416410
</ul>
417411
<h6>Exception Handling</h6>
418412
<p>All exceptions are globally handled in<i> ExceptionHandler LogException()</i>
419-
method. <span class="pl-c">Subscription to app wide unhandled exceptions
420-
is done in <i>MainActivity</i> class for Android and in <i>AppDelegate</i>
421-
class for IOS. However be aware that when an unhandled exception occurs,
422-
typically Android will be destroying the process. So there&#39;s not a lot can
423-
be done on the Android side, but your Xamarin code should still be able
424-
to work. So you can log the error message with a third party tool like
425-
<a href="https://hockeyapp.net/">HockeyApp Crash Reporting</a>. Beside it&#39;s
426-
</span><span lang="EN-US">advised </span><span class="pl-c">to put a breakpoint
427-
in <i>LogException() </i></span>method. This is useful to see the exception
428-
before app crashes.</p>
413+
method. Subscription to app wide unhandled exceptions is done in <i>MainActivity</i>
414+
class for Android and in <i>AppDelegate</i> class for IOS. However be aware
415+
that when an unhandled exception occurs, typically Android will be destroying
416+
the process. So there&#39;s not a lot can be done on the Android side, but your
417+
Xamarin code should still be able to work. So you can log the error message
418+
with a third party tool like <a href="https://hockeyapp.net/">HockeyApp
419+
Crash Reporting</a>. Beside it&#39;s advised to put a breakpoint in <i>LogException()</i>
420+
method. This is useful to see the exception before app crashes. </p>
429421
<h5>Pages</h5>
430422
<h6>InitialView</h6>
431423
<p>InitialView is a transition page that checks whether user has any granted

0 commit comments

Comments
 (0)