Update to Xamarin touch 8.2 and use mvvmcross - ios

We are using xamarin and mvvmcross with great plesure normmally.
However I updated our project to the newest Xamarin.Ios 8.2, changed the reference from monotouch to Xamarin.Ios updated all our nuget packages (only mvvmcross packages) and then sh.. hit the fan.
1000 errors :P I got ridth of them all, however everytime I am using a component from mvvmcross it want me to reference 'module monotouch should be referenced.
Any suggestion for what I am needing to get my project to build again.
Regards

Xamarin's advice on the unified API is http://blog.xamarin.com/is-the-ios-unified-api-for-me/
Unfortunately, existing Xamarin.iOS components need to be re-built against the Unified API, so while we (and the community) are working to update the component code, you will not be able to include these in your app. A workaround for open-source projects is to download and compile the code yourself as part of your Unified API project.
#lothrop is doing a superb job leading the Unified API development for MvvmCross
You can see the progress, build it and contribute to it on https://github.com/MvvmCross/MvvmCross/pull/813 (and see a discussion on https://github.com/MvvmCross/MvvmCross/issues/801)
Currently I believe the progress is pretty good - it's working - but we have some VisualStudio Xamarin blockers which are preventing this being pushed to release.
Getting more dev effort on this - more input to https://github.com/MvvmCross/MvvmCross/pull/813 and https://github.com/MvvmCross/MvvmCross/issues/801 - would certainly be appreciated. e.g. the community can help by building and using #lothrop's code - does it work for them?

Related

Android Support Design library component not added properly to Xamarin Android Project

I've started learning Xamarin for Android in visual studio, few days back. I'm a noob to this.
I need to build a navigation drawer, for which I need Android support v7 component and Android Support Design Component.
I added both of these from Component store.
But the design component shows 'Incomplete' in brackets in components list, also I'm unable to use it's widgets in project.
It looks like it isn't actually added to my project.
Below are the screenshots for this component.
1) Incomplete status
2) Package reference error, when double clicked on Support design component
Looking forward to response. Thanks in advance.
I got this resolved.
What I did is, I removed the component for Android Support Design, and searched for the same in nuGet packages.
Downloaded it from there, and it is now correctly referenced by my project.
Thanks anyways.

WinObjC: How to know what cocoa frameworks are supported / handled?

Trying to bridge my iOS application to W10 app using WinObjC which looks nice (but still a preview)
My iOS app is using CommonCryptor for encryption purpose. When I try to build my freshly imported app in Visual Studio I got an error related to kCCKeySizeAES128 which is missing (coming from CommonCrypto).
How can I assume that this native framework is supported by WinObjC, and if it is supported how can I tell that everything is working (link is done right in visual studio) / where do I look?
I work on the iOS bridge project at Microsoft. While we've implemented many of the iOS frameworks commonly used by apps, we haven't done them all; many frameworks have only been stubbed out so that projects will compile and run. We're adding support for missing pieces with every release, however, so you should update frequently.
Generally, you can see what's supported and not supported by the bridge in the Visual Studio debug console. When missing or stubbed APIs are called, you'll get a message with details. We're also working on tools that will make browsing the API surface area easier.
If you find missing APIs, you should definitely file an issue on Github, as it's the best way to get in touch with our team and directly affects our development roadmap.
Thanks for checking out the project!

MTOUCHTASK: Error MT2002 updating to unified API Xamarin Forms

Updating to the unified API is proving to be a total nightmare!
I have used the shared project template to create a new Xamarin forms application and followed the documentation twice and yet both times get the error below
MTOUCHTASK: error MT2002: Failed to resolve "System.Void UIKit.UICollectionView::set_DataSource(UIKit.IUICollectionViewDataSource)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"
This is really getting frustrating now! Can anyone help please? I have tried linking all assemblies in the linker options but that makes no difference
I am using version 1.3.1.6294-pre1 of Xamarin forms
Alternatively, how can I get updated versions of the project templates that work with the unified API?
Please note that I am getting these problems using the project template only, i.e. there is none of my own code in this yet
Paul
I was getting the same issue (still am). I changed the linker settings to "Don't link" and that temporarily solved the problem. It seems that there are currently bugs in the linker for unified libraries.
#Paul, came across your post searching for a solution to the same problem. The only thing I can help with is to point you to this post on the Xamarin forums that states that you must enable Alpha channel updates to get the new templates in Xamarin Studio and VS 2013. The new templates are also available in VS 2015 on the stable channel. Will monitor this thread for the solution to the other problem!
When I turned off Linking, my release iPhone config finally built.

How can I get started with Xamarin from Visual Studio 2013?

I want to port a Compact Framework/Windows CE app to Xamarin to create Android and IOS (and possibly Windows Phone) "versions." I reckon I need Windows 8 for Windows Phone (8) but for now I thought I could get started with Android and IOS in moving this prehistoric app into the 21st century.
According to this article, I first need "Project linker" and can NuGet it, but searching for it via Tools > Extensions and Updates in VS 2013 returns no search results.
That article says you need VS 2012 or better; the direct link to "Project Linker," though, says it supports VS 2010.
Where do I go from here?
UPDATE
I went here, and am in the processing of downloading.
UPDATE 2
Here, it says, "Modern Integrated Development Environment (IDE) – Xamarin uses Xamarin Studio on Mac OS X, and also Xamarin Studio or Visual Studio 2010 on Windows."
Yet in VS 2013, I do have project types now for Android and IOS*, so I reckon that's just a typo (hasn't been updated)?
although I don't have a Mac, so that is not possible for me right now; also, since I'm still on Windows 7 at work, Windows 8 Phone apps are not yet a possibility, either. So at present, Xamarin within Visual Studio is simply a replacement for Eclipse/Java in the creation of Android apps.
UPDATE 3
I've been waiting for something better than PhoneGap, and I think maybe I've found it. If MS were to buy this company and bake Xamarin into Visual Studio -- voila!/yowza/wow! The cats in Cupertino will have to reach for the Pepto-Bismol!
That's a bit outdated and there's a much better approach available today.
You can use Portable Class Libraries (PCL) to share code across project spanning iOS, Android, Windows (Phones) and even OSX.
See this article (and where it leads) for more details.
I certainly agree with #poupou that PCL's are the way to go (if possible). I would recommend James Montemagno's app on github. He just created this for channel9 using VS 2013. I just created a cross-platform app based off of this and it worked out well. I would only use the file-linking for the platform specific implementations with compiler directives. This can be seen in his ServiceRegistrar class in said app.
This SO answer actually explains how to get the 2012 Project Linker to work with 2013 if you still want to go that route and gives a link to the extension.
Also, you may want to check out MvvmCross. It is open-source, has a large user-base and following, and really helps with maximum code re-use. Best part, it uses PCLs and all of it's features (plugins) are available via nuget.
I would recommend reading the article #poupou posted, watching James' channel9 videos on his github page, and (if you want to check out mvvmcross) watch #slodge's N+1 videos on mvvmcross.

Can't install MVVMCross on PCL project

After I create a PCL project in VS2012 with the following configuration:
I try to add MVVMCross through Nuget installation, but the process rolls-back with this error:
I'm trying to install Hot Tuna Starter Pack for that matter.
I have installed Xamarin trial version a week ago.
Is this a Xamarin error supporting PCLs?
Your screenshots show that you have a VSMonoTouch PCL hack in place - it's likely that will be causing issues - especially with net10 shown in the nuget log there. Try removing your VSMonoTouch XML files and then creating new projects for test.
Here is a setup that currently works for me - http://slodge.blogspot.ca/2013/04/my-current-pcl-setup-in-visual-studio.html
Note: It's likely that this post won't remain in-date for very long - Xamarin are releasing their PCL implementations at the moment.

Resources