Giter VIP home page Giter VIP logo

unoapplicationtemplate's Introduction

Uno Platform Application Template

License Version Downloads

This is a mobile app project template using Uno Platform and the latest .NET practices.

Preview

From left to right: WinUI, iOS, and Android. Platform-Comparison-Preview

Note that scaling was adjusted to better fit this preview and therefore this image isn't representative of the actual device sizes.

Diagnostic Tools

Diagnostics-Overlay-Preview

Requirements

Visual Studio 2022 with .Net 7 are required.

This template largely relies on Uno Platform, if you want to make sure you got everything installed correctly on your machine, we encourage you to use uno-check, the documentation is available here

๐Ÿ’ก It's also possible to use this template for a pure WinUI application, without any mobile aspect. All you would have to do is remove the .Mobile csproj from the generated solution.

Getting Started

We use dotnet project templates to easily create new projects. It simplifies the project renaming and supports conditional inclusions.

Generate a new project

  1. Install the template using this command.

    dotnet new install NV.Templates.Mobile

  2. To run the template and create a new project, run the following command in the folder that will contain the new project.

    dotnet new nv-mobile -n MyProjectName

    โš  The use of periods (.) in the project name is not supported and may result in compilation issues later on.

    ๐Ÿ’ก If all your projects are regrouped in a folder like C:\Repos, you want to be in that folder. The command would generate all the project files under C:\Repos\MyProjectName.

    The following options are available when running the command.

    • To get help: dotnet new nv-mobile -h

Next Steps

  1. Open the README.md and complete the documentation TODOs.

  2. Open the solution file from the generated folder using Visual Studio.

    It's located at MyProjectName/src/MyProjectName.sln.

  3. In Visual Studio, go to the VIEW menu and open the Task List to get hints on next steps.

    This template comes with several pointers on what you're most likely to change next.

Architecture and Recipes

This repository provides documentation on different topics under the doc folder.

Architecture

The software architecture of the application is documented in the Architecture document.

Summary of Recipes

Topic Recipe/Implementation
UI Framework WinUI
Uno Platform
MVVM Chinook.DynamicMvvm
Dependency Injection Microsoft.Extensions.Hosting
Microsoft.Extensions.DependencyInjection
Configuration Microsoft.Extensions.Configuration
Runtime Environments Microsoft.Extensions.Configuration
Design System Uno.Material
Material Design
HTTP Refit
Microsoft.Extensions.Http
Async Data Loading Chinook.DataLoader
Logging Serilog
Microsoft.Extensions.Logging
Testing xUnit
Serialization System.Text.Json
Localization Microsoft.Extensions.Localization
Navigation Chinook.Navigation
Chinook.BackButtonManager
Validation FluentValidation
App Reviews ReviewService

Debugging or Testing the Template

Here's how to install the template directly from the code, in the case that you want to modify it and would like to test your changes.

Installing the template

  1. Uninstall the template from nuget.org (if applicable).

    • dotnet new uninstall NV.Templates.Mobile
  2. Clone this repository on your machine.

  3. Open a command prompt at the root of the cloned repository.

  4. Run the following command.

    • dotnet new install ./

Read this for more information on custom templates.

Uninstalling the template

  1. Open a command prompt at the root of the cloned repository.

  2. Run the following command.

    • dotnet new uninstall ./

Changelog

Please consult the CHANGELOG for more information about the version history.

License

This project is licensed under the Apache 2.0 license. See the LICENSE for details.

Contributing

Please read CONTRIBUTING for details on the process for contributing to this project.

Be mindful of our Code of Conduct.

unoapplicationtemplate's People

Contributors

andreasflores18 avatar arianeleonard avatar arieldelossantos avatar baptiste-nv avatar benventive avatar carlh98 avatar fperreaultnv avatar gabrielchouinardletourneau avatar guidemarcus avatar iguins avatar jeanplevesque avatar jeremiethibeault avatar juliecantin avatar lamonfly avatar lee31416 avatar lproulx86 avatar marc-antoine-soucy avatar matfillion avatar maximedion-work avatar mergify[bot] avatar nguyeenvy avatar proberge-dev avatar ryanwin98 avatar sasakrsmanovic avatar soap-141 avatar takla21 avatar vincentcastagna avatar yguerin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unoapplicationtemplate's Issues

[Specific to branch feature/SupportAndroid13] Android 13 does not display Splashscreens

Expected Behavior

Upon opening the application, the splashscreens should display correctly.

Actual Behavior

Upon opening the application, the splashscreens are not displayed correctly.

Steps to Reproduce the Problem

  1. Build the application and deploy it on an Android device or emulator.
  2. Open the app.
  3. Look at the welcome and log in pages.

Specifications

  • Version: Android 13
  • Platform: Android devices
  • Subsystem:

Image

MicrosoftTeams-image

Link of branch

https://github.com/nventive/UnoApplicationTemplate/tree/dev/vyng/Support-Android-13

[ALL] New application template - Splashscreen does not dismiss

Expected Behavior

  • Splashscreen should be dismissed

Actual Behavior

  • Splashscreen is not dismissed

Steps to Reproduce the Problem

  1. create a new project with dotnet new nv-mobile -n projectName
  2. Build
  3. Run on UWP/iOS/Android
  4. Notice the splashscreen is not dismissed but still gives input to underlying elements
  5. Confirmed this bug by removing the splashscreen element from the shell once app booted.

The issue is caused by the fact we do not have the dismiss in the CoreStartup.cs

#if __MOBILE__ || WINDOWS_UWP
			var dispatcher = services.GetRequiredService<CoreDispatcher>();

			_ = dispatcher.RunAsync(CoreDispatcherPriority.Normal, DismissSplashScreen);

			void DismissSplashScreen() // Runs on UI thread
			{
				Shell.Instance.ExtendedSplashScreen.Dismiss();
			}
#endif

Specifications

VS 2019
Uno app template latest

[Android] The watermark displayed for Secondary phone number is cut off

Expected Behavior

The watermark should not be cut

Actual Behavior

The watermark displayed for Secondary phone number is cut off

thumbnail_Screenshot_20211112-115113_ApplicationTemplate

Steps to Reproduce the Problem

  1. Launch app
  2. On the Welcome page select Create account
  3. Scroll down to Secondary phone number
  4. Notice the Watermark displayed
  5. Enter any value and tap another field
  6. Notice the Watermark displayed

Specifications

[Android] Returning from one of the Settings options, one of the Settings button has a selected state

Expected Behavior

An unselected button should not display a selected state

Actual Behavior

Returning from one of the Settings options, one of the Settings button has a selected state

thumbnail_Screenshot_20211112-121120_ApplicationTemplate

NOTE

Related issue
#111

Steps to Reproduce the Problem

  1. Launch app
  2. From the Welcome page select Continue
  3. From the bottom navigation bar select Settings
  4. Tap any option from the setting page (ex. Login)
  5. On the Login screen tap Android back button
  6. The Settings page should be displayed
  7. Notice the options displayed
  8. One of the options (Ex. terms and conditions) has s selected state

Specifications

[Android] Invalid values are displayed as valid values for Postal code

Expected Behavior

Only valid values should be displayed as valid

Actual Behavior

Invalid values are displayed as valid values

thumbnail_Screenshot_20211112-120024_ApplicationTemplate

Steps to Reproduce the Problem

  1. Launch app
  2. On the Welcome page select Create account
  3. Scroll down to Postal Code
  4. Enter 6 numbers
  5. Notice an error message is displayed
  6. Entered 7 numbers
  7. Notice the values are validated

Specifications

[Android] The cursor has alternative heights

Expected Behavior

The cursor heights should not alternate

Actual Behavior

The cursor has alternative heights

20211112_115537.mp4

Steps to Reproduce the Problem

  1. Launch app
  2. On the Welcome page select Create account
  3. Tap Create account button
  4. An error state is displayed
  5. Enter any values
  6. Notice the cursor

Specifications

[Android] The field title overlaps with the field error state

Expected Behavior

The fields and error state should not overlaps

Actual Behavior

The field title overlaps with the field error state

thumbnail_Screenshot_20211112-114827_ApplicationTemplate_2

Steps to Reproduce the Problem

  1. Launch app
  2. On the Welcome page select Create account
  3. Tap Create account button
  4. An error state is displayed
  5. Notice some fields overlaps with the error state

Specifications

Question: Does the template support all of the app heads ?

Apologies if this is not the right place for questions - I've checked the Discord server and no one seems to ask questions about the template there.

Does the UnoApplicationTemplate support all of the AppHeads that are available with 4.9 ?

[ios] App freeze when navigating with Uno 3.0+

Expected Behavior

App does not freeze

Actual Behavior

App freeze when navigating to a page with AppBarButton containing a Path

Steps to Reproduce the Problem

  1. Use branch dev/cama/update
  2. Navigate to the settings page
  3. Notice that the app becomes unresponsive

Specifications

  • Version:
  • Platform:
  • Subsystem:

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

View the update logs.

ApplicationTemplate.Tests project does not build

Expected Behavior

ApplicationTemplate.Tests project should build?

Actual Behavior

ApplicationTemplate.Tests project does not build

Steps to Reproduce the Problem

  1. Clone this repo
  2. Open the sln in VS
  3. Build the ApplicationTemplate.Tests project

Specifications

  • Version: a150861
  • Platform: Tests
  • Subsystem:

Error

1>C:\Users\felix.perreault\.nuget\packages\uno.sourcegenerationtasks\2.0.13\build\netstandard1.0\Uno.SourceGenerationTasks.targets(127,2): error : Error reading response
1>MSBUILD : error : Generation failed: System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableList`1<!!0> System.Collections.Immutable.ImmutableList.ToImmutableList(Builder<!!0>)'.
1>MSBUILD : error : 
1>MSBUILD : error : Server stack trace: 
1>MSBUILD : error :    at Microsoft.Build.Evaluation.LazyItemEvaluator`4.UpdateOperation.UpdateItem(ItemData item)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.LazyItemEvaluator`4.LazyItemList.ProcessNonWildCardItemUpdates(Dictionary`2 itemsWithNoWildcards, Builder items)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.LazyItemEvaluator`4.LazyItemList.ComputeItems(LazyItemList lazyItemList, ImmutableHashSet`1 globsToIgnore)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.LazyItemEvaluator`4.LazyItemList.GetItemData(ImmutableHashSet`1 globsToIgnore)
1>MSBUILD : error :    at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
1>MSBUILD : error :    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
1>MSBUILD : error :    at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
1>MSBUILD : error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
1>MSBUILD : error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext)
1>MSBUILD : error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
1>MSBUILD : error :    at Uno.SourceGeneration.Host.ProjectLoader.LoadProjectDetails(BuildEnvironment environment, Dictionary`2 globalProperties) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\ProjectLoader.cs:line 142
1>MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.Generate() in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 85
1>MSBUILD : error :    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
1>MSBUILD : error :    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
1>MSBUILD : error : 
1>MSBUILD : error : Exception rethrown at [0]: 
1>MSBUILD : error :    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
1>MSBUILD : error :    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
1>MSBUILD : error :    at Uno.SourceGeneratorTasks.RemoteSourceGeneratorEngine.Generate(RemotableLogger2 logger, BuildEnvironment environment)
1>MSBUILD : error :    at Uno.SourceGeneration.Host.Server.GenerationServerHost.GenerateForCollection(EnvironmentPool collection, BuildEnvironment environment) in D:\a\1\s\src\Uno.SourceGeneration.Host\Server\GenerationServerHost.netframework.cs:line 61
1>MSBUILD : error :    at Uno.SourceGeneration.Host.Server.GenerationServerHost.RunGeneration(RunRequest request, CancellationToken cancellationToken) in D:\a\1\s\src\Uno.SourceGeneration.Host\Server\GenerationServerHost.cs:line 73
1>C:\Users\felix.perreault\.nuget\packages\uno.sourcegenerationtasks\2.0.13\build\netstandard1.0\Uno.SourceGenerationTasks.targets(127,2): error : Generation failed, error code Rejected
1>Done building project "ApplicationTemplate.Tests.csproj" -- FAILED.

[Android] The error state is not dismissed when a valid selection is made

Expected Behavior

The error state should be dismissed when a valid selection is made

Actual Behavior

The error state is not dismissed when a valid selection is made

thumbnail_Screenshot_20211112-114935_ApplicationTemplate

Steps to Reproduce the Problem

  1. Launch app
  2. On the Welcome page select Create account
  3. Tap Create account button
  4. An error state is displayed
  5. On the last sections (Favorite Donuts) select 3 options
  6. Notice the error state is not dismissed

Specifications

dotnet new nvmobile -n Applicita.CapsuleCRMTagManager produces code which does'nt build

Expected Behavior

dotnet new nvmobile -n Applicita.CapsuleCRMTagManager produces code which should compile without any changes.

Actual Behavior

dotnet new nvmobile -n Applicita.CapsuleCRMTasgManager produces code which won't compile, some files are missing namespaces; for example IConfiguration.Extentions.cs

Steps to Reproduce the Problem

  1. Git Clone the Latest Build from Repo / Main
  2. Install using dotnet new install ./
  3. Check the install was completed using dotnet new list
  4. dotnet new nvmobile -n Applicita.CapsuleCRMTagManager to create new project
  5. Open generated solution in Visual Studio 2022
  6. Build All

Specifications

  • Version: Visual Studio 17.6.2
  • Platform: Windows 11
  • Subsystem:

PS. Not sure how to check for Uno version - uno-check is up to date and I ran this

Access tokens may be refreshed concurrently

Expected Behavior

If an access token is expired, the auth system of the app template should block all the api calls until the access token is properly refreshed, and then proceed with unblocking the calls.

Actual Behavior

If an access token is expired, the auth system of the app template tries to refresh the accesstoken concurrently.

Steps to Reproduce the Problem

  1. Have an app for which the home page will fetch data from many endpoints/make multiple concurrent api calls, and be authenticated on this app.
  2. Close the app and wait for your access token to be expired
  3. Launch the app and notice all the api calls are trying to refresh the access token at the same time

Specifications

  • Version: a150861
  • Platform: *
  • Subsystem:

[Android] A selected status appears for an unselected tab

Expected Behavior

Only the selected tab should displayed a selected state.

Actual Behavior

A selected status appears for an unselected tab

thumbnail_Screenshot_20211112-120644_ApplicationTemplate

NOTE

Related issue #109

Steps to Reproduce the Problem

  1. Launch app
  2. On the Welcome page select Continue
  3. Tap the bottom navigation tabs
  4. Notice selected tabs

Specifications

chore: WASM head doesn't build in the current state

Expected Behavior

WASM head should build and the pipeline should be updated accordingly

Actual Behavior

WASM head doesn't build

Steps to Reproduce the Problem

  1. Open the solution
  2. Set the WASM project as the startup project
  3. Build

Specifications

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.