I am going through the example available for mvvmcross and I came across setup base class for the iOS.
-mvxiossetup
-mvxtouchsetup
Can someone explain what are the main differences and when you should use one more than another.
Thanks
Seb
Since MvvmCross 4.0-beta8 the namespaces have been updated and cleaned. Touch was the previous name of iOS before Xamarin unified that to iOS.
So after MvvmCross 4.0-beta8 you always need to use MvxIosSetup.
You can read more about this in the blog post: http://mvvmcross.com/blog/mvvmcross-40-beta8
Related
I'm currently implementing MapBox in a Xamarin.Android application, I'm looking at the examples from MapBox Github, this one in specific https://github.com/mapbox/mapbox-android-demo/blob/master/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/mas/OptimizationActivity.java, which I'm translating to C#, but now I'm facing a problem. In this example they use a class called "MapboxOptimizedTrips" which comes from lib 'com.mapbox.services.api.optimizedtrips.v1.MapboxOptimizedTrips'. In Xamarin I have imported all libraries that Xamarin made for MapBox, which is these 3:
MapBoxSDK.Android
MapBoxSDK.AndroidServices
MapBoxSDK.JavaServices
None of these includes the Optimized Trips API related classes. Has anyone faced this issue before?
Screenshot of code
I thought you read and followed this document from Mapbox?
Mapbox Navigation library is kept changing and adding new features
There are two DirectionsRoute class from Mapbox libraries
both DirectionsRoute returned by Mapbox Optimization packages doesn't fit with what NavigationRoute does.
I think you have to go with the way you mentioned, call to API directly. Or wait for Mapbox to evolve their library.
Cheers.
I am needing to use the widevine api in an ios app written in xamarin. From what I understand I need to make a wrapper for the library and such, but I have no idea where to start. Can anyone either explain in more detail what to do, or point me somewhere that explains it well?
Thanks, I am quite new to Xamarin, and rusty on C#
You definitely want to follow Jason's comment. In short, you need the .a (fat library) and the header files and then create a Xamarin.iOS binding project that exposes the native interface to C#. Access to the source code is not necessary.
I am trying to add tesseract to my iOS-App. Im doing the App with Xamarin.iOS.
I tried creating a .dll with btouch and used for that the ported version of tesseract on github(https://github.com/gali8/Tesseract-OCR-iOS). I created the bindings of tesseractOCR.h with Objective-Sharpie and created a
.dll with the TesseractOCR.a file.
Everything worked fine but when trying to build my app with the .dll referenced it gives me the attached Errors.
https://www.dropbox.com/s/w9cvzozgw4gffdx/Screen%20Shot%202014-03-31%20at%2012.46.24.png
How can I fix them?
Thanks in advance
Alex
This seems a good question and I came here looking for Xamarin bindings for Tesseract library, but there was none on this page. After searching, I found that there are a couple of bindings already for Xamarin:
Classic
1. https://github.com/sraiteri/Xamarin-Tesseract-OCR-iOS
Unified
2. https://github.com/jherby2k/Xamarin-Tesseract-OCR-iOS-Unified
Xamarin Forms
3. https://github.com/halkar/Tesseract.Xamarin
Also, there seems to be an active and modern porting to swift, and can be found here:
https://github.com/WhitneyLand/SwiftOpenCV
This discussion on Xamarin forum seems also very useful for anybody interested in this question:
https://forums.xamarin.com/discussion/3673/help-adding-tesseract-as-a-ios-binding-project
Disclaimer: I have not tried any of them yet, just finished my research, now gonna start my experimentation :)
This is because Tesseract uses c++ and the binding needs to know this.
I would suggest creating a binding project as per the tutorial at Xamarin. Then this Xamarin forum post gives great information on how to add c++ to the LinkWith attribute.
I'm developing an App with Xamarin.Android (aka MonoDroid), using the great MvvmCross Framework. The application uses Fragments, and need an ActionBar.
I've noticed that the MvxFragmentActivity inherits from MvxEventSourceFragmentActivity, and this last inherits from FragmentActivity, which has no ActionBar support. To support ActionBar, i need a class that inherits from ActionBarActivity, wich is included in the Support Library, and inherits from FragmentActivity.
So, my question is: Is there any MvvmCross class that Inherits from ActionBarActivity?
If not,
Can I just create a MvxEventSourceActionBarActivity and a MvxActionBarActivity that inherits from the first one, with just the same code of the MvxEventSourceFragmentActivity and MvxFragmentActivity just changing the inherits?
The basic answer is "No. There's no existing class. But I f you want to add binding to any Activity, then you can do so using 2 layers of inheritance - adding first an eventsource and then an Mvx layer"
There is a bit more detail about this in a few questions - eg ActionBarSherlock with latest MVVMCross
For the latest android support library, there is one issue to be aware of currently - when building binaries you currently either have to choose the mono library which gives you compatibility with play services or you have to choose the new Xamarin component which gives you the latest support lib - see MvvmCross - trying to use Fragments AND latest support lib results in linking problems and https://bugzilla.xamarin.com/show_bug.cgi?id=15205
Up till this morning I was using the latest non beta Xamarin.Android (4.6.8). This had support for setting System.Net.WebRequest.CachePolicy which is used in a 3rd party library I reference in a project. I don't have the source code for this library and so cannot remove the line or replace it with HttpClient and the library is fundamental to the project.
Hopefully Xamarin will reinstate support for this property but if they don't, I'd like to know how to mock/dummy/extend/replace the property to make the code compile. No functionality is required behind this property.
Can this be done? Is this approach even correct?
Thanks in advance
I'd recommend you take this problem direct to support#xamarin.com
It sounds like a breaking change in a brand new commercial software update - so I suspect it's something that the commercial support can help with more easily than the community.