@@ -62,8 +62,7 @@ <h4>Android</h4>
62
62
< h4 > Mac System Requirements</ h4 >
63
63
< p > You can use Visual Studio for Mac to develop Xamarin.Forms apps on OS X El Capitan
64
64
(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 ">
65
- </ span > having at least the iOS
66
- 10 SDK and Xcode latest installed.</ p >
65
+ </ span > having at least the iOS 10 SDK and Xcode latest installed.</ p >
67
66
< h4 > Windows System Requirements</ h4 >
68
67
< p > Xamarin.Forms apps for iOS and Android can be built on any Windows installation
69
68
that supports Xamarin development. A networked Mac is required for iOS development.
@@ -85,10 +84,8 @@ <h4>Solution Structure (Layers)</h4>
85
84
< img class ="img-thumbnail " alt ="ASP.NET Zero Mobile Solution " src ="images/mobile-solution-overview.png " /> < p > </ p >
86
85
< p > There are 6 projects in the mobile solution:</ p >
87
86
< ul >
88
- < li > < strong > Core.Shared</ strong > project basic < span lang ="EN-US ">
89
- primitive</ span > < span lang ="EN-US " style ="font-size: 12.0pt; line-height: 107%; font-family: 'Times New Roman',serif ">
90
- </ span > types as consts,
91
- enums used in all layers of the solution.</ li >
87
+ < 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 ">
88
+ </ span > types as consts, enums used in all layers of the solution.</ li >
92
89
< li > < strong > Application.Shared</ strong > project contains data transfer
93
90
objects (DTOs) and interfaces of application services shared with application
94
91
layer of the backend.</ li >
@@ -163,8 +160,7 @@ <h4>Debugging Android</h4>
163
160
< p > To start debugging Android app, you have to install Xamarin.Android. It's
164
161
highly recommended you to read the
165
162
< a href ="https://developer.xamarin.com/guides/android/getting_started/installation/ ">
166
- Xamarin Android Setup and Deployment document</ a > for < span lang ="EN-US ">
167
- necessary</ span > < span lang ="EN-US " style ="font-size: 10.5pt; line-height: 107%; font-family: open_sans,serif; color: #4E4E4E; letter-spacing: .75pt ">
163
+ 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
164
</ span > setups.< br >
169
165
</ p >
170
166
</ div >
@@ -183,8 +179,8 @@ <h4>Debugging IOS</h4>
183
179
< p > There are a number of configuration options available to debug IOS app. It's
184
180
highly recommended you to read the
185
181
< a href ="https://developer.xamarin.com/guides/ios/getting_started/installation/windows/introduction_to_xamarin_ios_for_visual_studio/ ">
186
- Xamarin IOS Getting started document</ a > to build an iOS application and
187
- debug using a networked Mac to host Apple’s compiler and simulator.< br >
182
+ Xamarin IOS Getting started document</ a > to build an iOS application and debug
183
+ using a networked Mac to host Apple’s compiler and simulator.< br >
188
184
</ p >
189
185
</ div >
190
186
< p > After you successfully configure and connect to a Mac, choose an iPhone simulator
@@ -212,11 +208,11 @@ <h4>Debugging IOS</h4>
212
208
< h3 > Xamarin.Forms</ h3 >
213
209
< p > A key component of building cross-platform applications is being able to share
214
210
code across various platform-specific projects. Asp.Net Zero Xamarin is using Xamarin.Forms
215
- to maximize code sharing between two end platforms (IOS & Android). It is
211
+ to maximize code sharing between two end platforms (IOS & Android). It is
216
212
< 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 ">
217
- </ span > to write shared codes in Mobile.Shared project so that it will be used in both IOS
218
- and Android. If you need platform specific development then try to use class abstractions
219
- in shared project and implement/extend in end platforms. </ p >
213
+ </ span > to write shared codes in Mobile.Shared project so that it will be used in
214
+ both IOS and Android. If you need platform specific development then try to use
215
+ class abstractions in shared project and implement/extend in end platforms. </ p >
220
216
< h4 > Mobile.Droid</ h4 >
221
217
< p > Xamarin Android project has a very basic structure. Asp.Net Zero adds or modifies
222
218
these files in the default project; </ p >
@@ -332,11 +328,12 @@ <h6>MVVM</h6>
332
328
for a view is automatically set when < b > AutoWireViewModel</ b > flag set to
333
329
true. There's a naming convention between ViewModels and Views. A xaml filename
334
330
must end with View postfix and the binding context of the xaml filename
335
- must end with ViewModel postfix. < span lang ="EN-US "> For example </ span > if xaml filename is < i > ProductView.xaml
336
- </ i > the corresponding view model filename must be < i > ProductViewModel.cs.</ i > </ p >
337
- < p > There's an < span lang ="EN-US "> empty </ span > sample view called < i > _SampleView.xaml</ i > and binding
338
- context as < i > _SampleViewModel.cs</ i > . You can copy paste these empty templates
339
- to add a new blank page.</ p >
331
+ must end with ViewModel postfix. < span lang ="EN-US "> For example </ span > if
332
+ xaml filename is < i > ProductView.xaml </ i > the corresponding view model filename
333
+ must be < i > ProductViewModel.cs.</ i > </ p >
334
+ < p > There's an < span lang ="EN-US "> empty </ span > sample view called < i > _SampleView.xaml</ i >
335
+ and binding context as < i > _SampleViewModel.cs</ i > . You can copy paste these
336
+ empty templates to add a new blank page.</ p >
340
337
< pre > <ContentPage
341
338
...
342
339
< span style ="background-color: #FFFF00 "> base:ViewManager.AutoWireViewModel="true"</ span >
@@ -423,9 +420,10 @@ <h6>Exception Handling</h6>
423
420
typically Android will be destroying the process. So there's not a lot can
424
421
be done on the Android side, but your Xamarin code should still be able
425
422
to work. So you can log the error message with a third party tool like
426
- < a href ="https://hockeyapp.net/ "> HockeyApp Crash Reporting</ a > . Beside it's
427
- </ span > < span lang ="EN-US "> advised </ span > < span class ="pl-c "> to put a breakpoint in < i > LogException() </ i > </ span > method. This
428
- is useful to see the exception before app crashes.</ p >
423
+ < a href ="https://hockeyapp.net/ "> HockeyApp Crash Reporting</ a > . Beside it's
424
+ </ span > < span lang ="EN-US "> advised </ span > < span class ="pl-c "> to put a breakpoint
425
+ in < i > LogException() </ i > </ span > method. This is useful to see the exception
426
+ before app crashes.</ p >
429
427
< h5 > Pages</ h5 >
430
428
< h6 > InitialView</ h6 >
431
429
< p > InitialView is a transition page that checks whether user has any granted
@@ -434,15 +432,18 @@ <h6>InitialView</h6>
434
432
it is automatically being navigated to the first authorized menu item. InitialView
435
433
is being created in MainView.xaml. </ p >
436
434
< h6 > Login</ h6 >
435
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-login.png " />
437
436
< p > When user enters credentials AccessTokenManager authenticates user stores
438
437
access token in memory. For authentication needed Api calls, this token
439
438
is being added to the request as bearer token. There's a timer in AccessTokenManager
440
- class that renews token before it expires. If an error occurs while communication with host, client tries to reconnect within an exponentiation increasing
441
- time. After successful login user credentials are stored in device for
442
- auto login (password is stored as encrypted). User information is being set
443
- in < i > ApplicationContext </ i > so if current logon account information is
444
- needed it can be retrieved with injecting < i > IApplicationContext</ i > .</ p >
439
+ class that renews token before it expires. If an error occurs while communication
440
+ with host, client tries to reconnect within an exponentiation increasing
441
+ time. After successful login user credentials are stored in device for auto
442
+ login (password is stored as encrypted). User information is being set in
443
+ < i > ApplicationContext </ i > so if current logon account information is needed
444
+ it can be retrieved with injecting < i > IApplicationContext</ i > .</ p >
445
445
< h6 > MainView</ h6 >
446
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-menu.png " />
446
447
< p > MainView is responsible for navigation service. Xamarin.Forms provides
447
448
a number of different page navigation experiences, in this project
448
449
< a href ="https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/master-detail-page/ ">
@@ -465,6 +466,7 @@ <h6>MainView</h6>
465
466
if only user has granted required permission. The menu items are being created
466
467
in < i > MainViewModel </ i > class with < i > BuildMenuItems()</ i > method.</ p >
467
468
< h6 > TenantsView</ h6 >
469
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-tenants.png " />
468
470
< p > This page is shown if only user is a tenant owner. Page lists all tenants
469
471
with a list view. There is HideableToolbarItem to create a new tenant. This
470
472
toolbar item is extended control of a toolbar item that can be hidden if
@@ -474,6 +476,7 @@ <h6>TenantsView</h6>
474
476
template. When user taps any item it navigates to the TenantDetailsView
475
477
with the selected tenant object.</ p >
476
478
< h6 > TenantDetailsView</ h6 >
479
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-tenant-details.png " />
477
480
< p > This page shows information about the selected tenant. Selected tenant
478
481
model is being retrieved with navigationData object in < i > InitializeAsync(object
479
482
navigationData). </ i > There are action buttons on the bottom of the page
@@ -491,6 +494,7 @@ <h6>TenantDetailsView</h6>
491
494
Xamarin MessasingCenter.</ a > Lastly < i > TenantDetailsView</ i > is being popped
492
495
with < i > GoBackAsync()</ i > method of < i > NavigationService</ i > .</ p >
493
496
< h6 > UsersView</ h6 >
497
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-users.png " />
494
498
< p > This page lists users of the tenant or tenant owner. It is only shown
495
499
if the user has permission to this page. Same as tenants view, there's a
496
500
search bar and a new user creation toolbar item. List view is used to list
@@ -499,11 +503,13 @@ <h6>UsersView</h6>
499
503
library. When a user is tapped, it's navigated to UserDetailsView with the
500
504
selected user. </ p >
501
505
< h6 > UserDetailsView</ h6 >
506
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-user-details.png " />
502
507
< p > This page shows information about the selected user. If the logon user
503
508
has no permission to edit then action buttons will be hidden and all inputs
504
509
will be readonly. This is done in xaml with the following code;</ p >
505
510
< pre > IsEnabled="{extensions:HasPermission Text={x:Static permission:PermissionKey.UserEdit}}"</ pre >
506
511
< h6 > ProfilePictureView</ h6 >
512
+ < img class ="img-thumbnail " alt ="Shared Project Structure " src ="images/xamarin-profile-picture.png " />
507
513
< p > This is for viewing user profile picture in full screen mode. When user
508
514
taps the thumb profile image on top of the navigation menu, this view is
509
515
shown.</ p >
0 commit comments