Coder Social home page Coder Social logo

prism-templates's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

prism-templates's Issues

Just a Question

Can someone please point me to (either in the source code here or just a good resource online in general) how Prism adds a ViewModel along with your page template and a line of code in your App class to register it with the ioc container for navigation? That's a nice feature that I'm looking to replicate. Any help would be much appreciated.

I am unable to include UWP

this is what i am using
dotnet new prismforms -id com.dinkkiia.workandplay -n Dinkkiia.Workandplay --include-uwp true -fr netstandard2.0 -di unity -data AzureMobileClient -barcode true

Add Custom App Icon Dialog to QuickStart

Description

When creating a new QuickStart template using the Template Pack a Dialog should be added that will allow the user to choose a local image that will be added to the app for the app icon

Fix file rename bug with project specific .gitignore

Description

The TemplateEngine included in VS Mac contains some bugs in file name generation which includes the .gitignore in the iOS & Android projects not being renamed. The VS Mac Wizard will need to check for this malformed named .gitignore files and rename them.

Ninject Support

Ninject with Prism Forms 6.3 does not work well with this template. This will require Prism Forms 7.0

Create additional Views/ViewModels during project creations

Description

There is no way to do this directly with the dotnet templating engine, however VSMac will allow us to hook into the post project creation to perform additional tasks. A user dialog could be added to the Project creation wizard to allow developers to add additional Views and specify the Page Type, for the Views to then be first created as a Post project creation task, and then update App.RegisterTypes to register the new views for Navigation automatically.

New view files are named itemtemplate.xaml instead of class name

New views are are named "ItemTemplate.xaml" instead of the class name when creating new items using
dotnet new prismitem -n "GeneralPopupPage" -namespace $namespace

All of the code within the view is correct.

This is using the latest version of the templates, as I pulled a new version this morning.

Install via NuGet fails

Installing locally dotnet new -i content/MobileApp-CSharp/ and dotnet new content/XamarinItems/ installs either template, however installing form a packed NuGet fails.

Not sure if @mlorbetske has made the fix to be able to see install errors?

Azure Mobile Client Authentication Providers

The LoginProvider should include an implementation and setup instructions for working with the following Authentication Sources:

  • Azure Active Directory
  • Azure Active Directory B2C
  • Google
  • Facebook
  • Microsoft Account

Method 'Prism.Navigation.INavigationService.GoBackAsync' not found.

Hi,

first of all amazing work! thank you for doing this.

I've restored Prism Forms Mobile App - Quickstart template, updated all packages and successfully run the IOS app.

The app loads up, shows me a todo list of 3 items. I click on the add button it shows a dialog where I enter a test todo, hit the button save.

App goes to

_navigationService.GoBackAsync("todoItem", Model);

but never reaches MainPageViewModel, it breaks with above message inside of IOS Main class

Stack trace is

at jamespetras.ViewModels.TodoItemDetailViewModel+d__10.MoveNext () [0x00022] in /Users/jamespetras/Documents/Projects/PRISM/src/jamespetras/ViewModels/TodoItemDetailViewModel.cs:42
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.3/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.3/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at UIKit.UIKitSynchronizationContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/Foundation/NSAction.cs:163
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5665/f70a1348/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at jamespetras.iOS.Application.Main (System.String[] args) [0x00001] in /Users/jamespetras/Documents/Projects/PRISM/src/jamespetras.iOS/Main.cs:17

Fix UWP Platform Project

Description

As reported in #20 upon building there is a build error:

Error:	Can't load types from xmlns http://schemas.microsoft.com/winfx/2006/xaml/presentation

The UWP project will need to be updated and fixed

Replace PowerShell scripts with compiled MSBuild tasks

currently the Secrets tasks have a hard dependency on PowerShell. This is creating issues with compatibility with MobileCenter, as well as problems on Windows (see issue #11 & #14). To fix this, the Secrets tasks need to be updated to be compiled MSBuild Tasks.

Unable to compile Blank Prism Application for iOS in VS4Mac

The template doesn't work in VS4Mac. I simple create a new solution and select "Blank Prism Application" and select DryIoc. When I try to run the solution, I get a lot of errors like "Predifined type 'System.Void' is not defined or imported" several places in the net standard library. Also multiple like this "Error CS1703: Multiple assemblies with equivalent identity have been imported: '/usr/local/share/dotnet/sdk/NuGetFallbackFolder/netstandard.library/2.0.1/build/netstandard2.0/ref/System.Collections.dll' and '/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.collections/4.3.0/ref/netstandard1.3/System.Collections.dll'. Remove one of the duplicate references. (CS1703)"

VS4Mac is updated to latest in Stable channel and dotnet core 2.1 is installed

Add Maps Option

Description

An option to add either Xamarin.Forms.Maps or Xamarin.Forms.GoogleMaps should be added to the QuickStart Template

Where is the "Prism Developer Toolkit" mentioned in readme?

The EOL notice says the templates are going away in favour for the Prism Developer Toolkit.

When I google that, the first hit I get is this EOL notice. Is the developer toolkit a thing yet? I am trying to get started using Prism but there seems to be no easy way to get started (which is a shame because it looks awesome)

F# Templates

The Project and Item Templates should also be available in F#

Add custom Color Palette

Description

When creating a new application options should be exposed to set the default color palette in the app.

Update MFractor config

The MFractor config will need to be removed and updated to include a NuGet Prism config for MFractor.

Add App Name Parameter

Description

Currently you can set the Project Name like Contoso.Mobile, however it would be better if you could additionally set the App Name that is displayed when you install the App. This should probably be a required attribute.

Add support for different UI Test Frameworks

Description

Currently the Templates only include the possibility of including a Xamarin UI Test project. This may not be the best decision for some developers.

A UI Test Project option should be provided so that developers can choose between different UI Test Frameworks such as:

  • Xamarin UI Test
  • Appium
  • Calabash
  • Espresso

Colon seperated namespace doesn't create properly

Description

My companies house style is to name projects like so: Company.Projectname.ProjectType, This means I am creating a project called "mycompany.myapp.app" When this creates, the namespaces are not correctly implemented:

This should created the namespace mycompany.myapp.app, however in the iOS / droid project, it will create mycompany_myapp.app as the namespace. This means a blank project won't build & I can't seem to rename everything to correct this issue.

Version Info


dotnet --info
.NET Command Line Tools (2.1.4)

Product Information:
 Version:            2.1.4
 Commit SHA-1 hash:  5e8add2190

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.4/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.5
  Build    : 17373eb129b3b05aa18ece963f8795d65ef8ea54

Project Command

I installed prism templates for VS mac, and created a new solution.

Add Item Templates for custom layouts to VSMac

Description

The Template Pack for Visual Studio Mac currently includes item templates for common Pages including PopupPage's. Additional item templates should be added to make it a little quicker when working on custom controls. Templates should be added for Layouts and the ViewCell

Add Module Name Parameter

Description

Add Module Name parameter to the Module Template, this can then be used to set the project name like Contoso.Mobile.ModuleA and set the Module name ModuleA this will help eliminate the current class name that gets generated like Contoso_Mobile_ModuleA

IsActiveChanged null in ViewModel base

Thanks for creating these templates. They are a real time saver and really simplify prism Tabbed navigation.

The ViewModelBase class doesn't contain instantiate the IsActiveChanged eventHandler resulting in an exception when trying to use any page that implements IActiveAware.

If anyone should run into this issue before its fixed, it is easily fixed by adding the following line to the constructor.

IsActiveChanged += (sender, e) => System.Diagnostics.Debug.WriteLine($"{Title} IsActive: {IsActive}");

Thanks.

Add SQLite to DataProviders

Description

The Data Providers currently only includes the anticipation of Offline Sync. Some apps do not require Offline Sync and as such should offer the ability to add SQLite as part of the QuickStart Template.

This should probably be done with both Bundle_Green & Bundle_SQLCipher

Autofac Support

Autofac with Prism Forms 6.3 does not work well with this template. This will require Prism Forms 7.0

Add Unit Test Project

Description

A General Unit Test project should be added that can be used on existing projects, as well as being included in the existing project templates as a test option. This will help to address the various questions and difficulty that developers have had with how to setup unit tests.

StyleCop Support

Description

Support for StyleCop Analyzers should be added to the templates. This should provide a default stylecop.json file while allow users to specify a custom stylecop.json file to use. This will be a Template Pack only feature and will not be supported by the dotnet templates.

Add Module Template with a test application

Description

When developing reusable Modules, it would be helpful to have single template that could be used that would address the following issues:

  1. Include a Prism Module Project
  2. Include a sample (Shell) Application project for testing/development
  3. Include Unit Tests
  4. Include UI Tests
  5. Package the Module into a NuGet for consumption into one or more master applications

Rationale

Larger Development teams can focus building modular apps while empowering each team to be able to properly test and validate their Module.

How to use template

Is there a nuget package or is it VS extension?
How to use these templates?

FodyWeavers not being properly renamed

When creating a new project from the template the correct Weavers file is being excluded via the wildcard, however the rename is not occurring. This problem exists with both "**/RealmFodyWeavers.xml": "FodyWeavers.xml" and specifying like "src/MobileApp/RealmFodyWeavers": "src/MobileApp/FodyWeavers.xml"

@mlorbetske not sure if perhaps you see what the problem would be here?

  "sources": [
    {
      "modifiers": [
...
        {
          "condition": "(UseRealm)",
          "rename": {
            "**/RealmFodyWeavers.xml": "**/FodyWeavers.xml"
          },
          "exclude": [
            "**/NormalFodyWeavers.xml"
          ]
        },
        {
          "condition": "(!UseRealm)",
          "rename": {
            "**/NormalFodyWeavers.xml": "**/FodyWeavers.xml"
          },
          "exclude": [
            "**/RealmFodyWeavers.xml"
          ]
        },
....
      ]
    }
  ],

Android project not building - VS2017

A generated solution will build just fine in VS4Mac but when building the Android project in VS2017 there are several build errors pointing at Android Support Libraries not being referenced properly.

Add Code Generation Configuration for the Template Pack

Description

When creating item templates the Views & ViewModels should be customizable. While some default behavior such as scanning for a ViewModelBase in the project should be done, it would be good to have an override type behavior for importing things like the base class for the ViewModel as well as any namespace imports for the XAML file.

{
  "viewModel" : {
    "class": "ViewModelBase",
    "namespace": "Contoso.Mobile.Mvvm"
  },
  "xaml": {
    "imports": [
      {
        "clr-namespace": "Prism.Behaviors",
        "assembly": "Prism.Forms",
        "namespace": "behaviors"
      }
    ],
    "merge": false
  }
}

using Android.App is missing on top of AndroidInitializer.cs

When a project using the following command is created on Windows.

dotnet new prismforms -id com.company.app -fr netstandard1.6 -localization -mc -ios-secret "xxxx-xxxx-xxxx-xxxxxxxx" -android-secret "xxx-xxxxxx-xxxxxx-xxxxxxx" -data None -au AADB2C -client-id "xxxx-xxxx-xxxxx-xxxxxxx" -di Unity

AndroidInitializer.cs is missing a reference to Android.App and as the result Activity symbol in the following code cannot be resolved.

container.RegisterInstance(new UIParent(Xamarin.Forms.Forms.Context as Activity));

Add File Templates to VSMac Template Pack

Description

When creating new files in VS Mac it would be helpful to have better file templates. Currently VSMac does not support dotnet item templates. This will have to be done using legacy templates.

csproj is not generated properly

I have generated a project using the following code on Windows:

dotnet new prismforms -id com.contoso.awesomeapp -di Unity -fr netstandard1.6 -mc -ios-secret 
     "{my ios secret}" -android-secret "{my android secret}" -data None
     -auth AADB2C -client-id "{my AADB2C application id}"

However, the csproj is not generated properly and it does not contain the item group defining embedded resources like:

<EmbeddedResource Include="Views\MainPage.xaml"> Generator>MSBuild:UpdateDesignTimeXaml</Generator> </EmbeddedResource>

As the result, the xaml.g.cs files are not being generated, when building the project and I get

The name 'InitializeComponent' does not exist in the current context

Secrets.cs file is not generated automatically either.

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.