MVVMCross documentation needs updating for latest release? - xamarin.forms

I'm very new to MVVMCross and I was following the TipCalc tutorial however it seems it was written for an older version MVVMCross. I'm stuck in the TipCalc Android Project section because the MvvmCross package doesnt have a class called MvxAndroidApplication.
using System;
using Android.App;
using Android.Runtime;
using MvvmCross.Platforms.Android.Core; // this namespace doesn't exist
using MvvmCross.Platforms.Android.Views;
using TipCalc.Core;
namespace TipCalc.Droid
{
[Application]
public class MainApplication : MvxAndroidApplication<MvxAndroidSetup<App>, App>
{
public MainApplication(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
}
}

The issue was with the Android version in the Project settings. Details in this link https://github.com/MvvmCross/MvvmCross/pull/3958

Related

Error in uno platform auto generated file and program.cs - only on Mac

I have a simple app based un uno platform. On Windows I can build and run it without any problem. But on VS for Mac the compiler gives error to the auto generated RemoteControl.g.cs file:
Error CS0826: No best type found for implicitly-typed array (CS0826)
(UnoTeszt.Wasm)
Error CS1503: Argument 2: cannot convert from '?[]'
to 'string[]' (CS1503) (UnoTeszt.Wasm)
// <auto-generated>
// ***************************************************************************************
// This file has been generated by the package Uno.UI.RemoteControl - for Xaml Hot Reload.
// Documentation: https://platform.uno/docs/articles/features/working-with-xaml-hot-reload.html
// ***************************************************************************************
// </auto-generated>
// <autogenerated />
#pragma warning disable // Ignore code analysis warnings
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("fe80::1%1", 0)]
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("fe80::109d:3e33:34e7:51fb%4", 0)]
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("10.111.111.61", 0)]
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("fe80::5805:f7ff:feaa:6ec3%8", 0)]
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("fe80::5805:f7ff:feaa:6ec3%9", 0)]
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("fe80::1d3:92b1:ff7d:cf5%10", 0)]
[assembly: global::Uno.UI.RemoteControl.ServerEndpointAttribute("fe80::77d1:f7a1:4393:622b%11", 0)]
[assembly: global::Uno.UI.RemoteControl.ProjectConfigurationAttribute(
#"/Users/kistelekig/Documents/Vitarex/FilmesApp/UnoTeszt/UnoTeszt/UnoTeszt.Wasm/UnoTeszt.Wasm.csproj",
new[]{}
)]
And I have an other problem as well in the Program.cs:
[...]/UnoTeszt/UnoTeszt.Wasm/Program.cs(20,20): Error CS0246: The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?) (CS0246) (UnoTeszt.Wasm)
using System;
using Windows.UI.Xaml;
namespace UnoTeszt.Wasm
{
public class Program
{
private static App _app;
static int Main(string[] args)
{
Windows.UI.Xaml.Application.Start(_ => _app = new App());
return 0;
}
}
}
I have the latest version of VS for Mac and MacOS installed.
This usually happens when there's no XAML files tagged as <Page /> in your project. Make sure to correctly reference your shared project.
I have found the root issue. When I create a project via dotnet new:
dotnet new -i Uno.ProjectTemplates.Dotnet
dotnet new unoapp -o App-CrossPlatform
I have the next shared project
App-CrossPlatform\App-CrossPlatform.Shared\App-CrossPlatform.Shared.shproj
App-CrossPlatform\App-CrossPlatform.Shared\App-CrossPlatform.Shared.projitems
But in other (android, ios) projects there are the next imports:
<Import Project="..\App_CrossPlatform.Shared\App_CrossPlatform.Shared.projitems" Label="Shared" Condition="Exists('..\App_CrossPlatform.Shared\App_CrossPlatform.Shared.projitems')" />
Yes... Symbol - vs _...
I have created an issue:
https://github.com/unoplatform/uno/issues/4217

SignalR, Owin do not work after VS2015 move and package updates

I recently upgraded to VS2015 (did not remove VS2013 or 2010). NuGet did not instal properly. While the project ran it loaded with streaming messages re package updating. I just removed and reinstalled NuGet and updated all packages.
Now I have 2 problems that could be related.
1) 134 errors. Everything to do with SignalR and Owin is failing with messages like:
'type or namespace 'Hub' could not be found'.
Here is the key code. Other Usings were greyed out as unnecessary, and are removed.
using System;
namespace SignalR
{
[Microsoft.SignalR.HubName("SeekerHub")]
public class SeekerHub : Hub
{
private static Decimal number;
public static void SendMessage(string message)
{
//StartTimer();
//var callingClient = Context.ConnectionId;
var hubContext = GlobalHost.ConnectionManager.GetHubContext<SeekerHub>();
if (Decimal.TryParse(message, out number))
{
if (number == 0)
{ }
hubContext.Clients.All.receiveUpdate(message);
}
else
hubContext.Clients.All.receiveNotification(message);
}
}
}
2) 6 warnings that relate to updating. All relate to the same SignalR/Owin area but the message suggests that it is looking in the VS2013/localhost xyz/ file and not in the VS2015 file. Is there a way I can change the pointer when the package looks to update itself?
Thanks, in advance, for any help.

xSocket WebRTC Sample error

Hi i have a problem i have a aplication that i m desenvolving an its the same princepel like facebook like a social engine in mvc 4 i am trying to put video-conference i already tried in a empty asp.net mvc4 empty internet application and it works xSocket.net WebRTC Sample so where is my error
so i followed the steps PM> Install-Package XSockets.Sample.WebRTC
1: Add a new XSockets.Web.Bootstrapper (ctrl+shift+a)
2: Under the "Web" tab go to the "Servers" section and set Use Visual Studio Development Server
using System.Web;
using XSockets.Core.Common.Socket;
[assembly: PreApplicationStartMethod(typeof(basicWebRTC.XSocketsWebBootstrapper1), "Start")]
namespace basicWebRTC
{
public static class XSocketsWebBootstrapper1
{
private static IXSocketServerContainer wss;
public static void Start()
{
wss = XSockets.Plugin.Framework.Composable.GetExport<IXSocketServerContainer>(); // when e start An exception of type 'XSockets.Plugin.Framework.Exceptions.ExportException' occurred in XSockets.Plugin.Framework.dll but was not handled in user code //
wss.StartServers();
}
}
}

Rebuilding deprecated sqlite functionality from MVVMCross to Community.Sqlite

The following code no longer registers correctly with the IOC. I am currently trying to switch to the Community.Plugins.Sqlite library.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using Cirrious.MvvmCross.Community.Plugins.Sqlite;
using FlashCardApp.Core.Entities;
using FlashCardApp.Core.Managers.FlashCardApp.Core.Services;
using FlashCardApp.Core.ViewModels.Dictionary;
namespace FlashCardApp.Core.Managers
{
class EnglishManager : IEnglishManager
{
private readonly ISQLiteConnection _connection;
public EnglishManager(ISQLiteConnectionFactory factory)
{
_connection = factory.Create("Dictionary.sqlite");
// _connection.CreateTable<English>();
}
I get the following stack trace error
mvx:Warning: 2.06 Problem creating viewModel of type DictionaryViewModel - problem MvxException: Failed to resolve parameter for parameter factory of type ISQLiteConnectionFactory when creating FlashCardApp.Core.Managers.EnglishManager at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.GetIoCParameterValues(Type type, ConstructorInfo firstConstructor)
How does one go about registering an ISQLiteConnectionFactory in a constructor. Or is there a new method of using this factory under the community plugin?
Edit: I added the community.sqlite plugin to my app.store project and now the ISQLFactory seems to be registering and creating but I get the following error
A first chance exception of type 'System.EntryPointNotFoundException' occurred in Cirrious.MvvmCross.Community.Plugins.Sqlite.WindowsStore.DLL
'FlashCardApp.Store.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.DLL'
and
Unable to find an entry point named 'sqlite3_win32_set_directory' in DLL 'sqlite3'.
Thanks in advance
JH

Sonar and Flex plugin - Dollars ($) are not accepted in java class names

In reference to this bug from Sonar:
http://jira.codehaus.org/browse/SONAR-1865
and this one (which cross references the one above):
http://jira.codehaus.org/browse/SONAR-1637
I am still seeing this issue.
I am using Sonar server version 2.12.
I am using Hudson, version 2.2.0.
I have installed the Sonar plugin in Hudson, version 1.7.2.
and, most importantly, I have the Flex plugin installed in the Sonar server. Flex plugin version is 0.4.
When I run mvn sonar:sonar -Pflex on a flex project, i get this error in the stack trace:
Caused by: java.lang.IllegalArgumentException: Java inner classes are not supported : EntityEnums$ReportParameterName
at org.sonar.plugins.flex.FlexFile.<init>(FlexFile.java:79)
at org.sonar.plugins.flex.FlexFile.fromIOFile(FlexFile.java:165)
at org.sonar.plugins.flex.FlexSourceImporter.createResource(FlexSourceImporter.java:37)
at org.sonar.api.batch.AbstractSourceImporter.parseDirs(AbstractSourceImporter.java:75)
at org.sonar.api.batch.AbstractSourceImporter.analyse(AbstractSourceImporter.java:69)
at org.sonar.api.batch.AbstractSourceImporter.analyse(AbstractSourceImporter.java:60)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
Here is what my class looks like, that it is complaining about:
This is an Actionscript class, file name: EntityEnums$ReportParameterName.as. It was auto-generated from java to Actionscript using GraniteDS.
package com.digabit.core.db.entity.util {
[Bindable]
public class EntityEnums$ReportParameterName {
public static const tnid:String = "tnid";
public static const uname:String = "uname";
public static const lc:String = "lc";
public static const tnkey:String = "tnkey";
public static const oid:String = "oid";
public function EntityEnums$ReportParameterName()
{
super();
}
}
}
So, according the bug reports, this has been fixed in an earlier version of Sonar that I have; but I'm still seeing it in version 2.12. And why would the error show "java inner classes..." when this is a flex/actionscript class? Is anyone still seeing this bug behavior?
Issue has been created on Sonar Flex Plugin side ( http://jira.codehaus.org/browse/SONARPLUGINS-1623 ) and most probably would be fixed in next release.

Resources