I am currently experimenting with Pixate, trying to add to our existing app that is built with Xamarin.Android and uses MvvmCross. Without Pixate, the app works correctly. As soon as I make the init call for Pixate, Mvvmcross will throw null exceptions in MvxSpinner method calls, and the app doesn't seem to bind to the list view or spinner. I am wondering if there is anyone that has a working Xamarin Android application that uses both Mvvmcross and Pixate, it seems to me there's a conflict going on between the two libraries. Just wanted to confirm and see if anyone else experience similar issues. Thanks!
Related
I'm using the 3.1.0-beta version of ZXing.Net.Mobile and ZXing.Net.Mobile.Forms in my Xamarin Forms 5 app.
Everything is working fine on Android but on iOS, it just doesn't seem to scan at all on an actual device connected to my PC via USB. I also packaged the app and uploaded it for TestFlight testing. When I test it as a fully installed app on my iPhone, it actually crashes the app all together.
My research shows this may happen due to permission issues. I do have the following in Info.plist:
<key>NSCameraUsageDescription</key>
<string>MyApp would like to access your camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>MyApp would like to access your microphone</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>MyApp would like to access your photo library</string>
Though it's not working on my iPhone Xs, the same setup is working just fine on both Android emulator and a cheap LG phone.
There's not much code to show here but here's what I have in my XAML file:
<zxing:ZXingScannerView
IsScanning="True"
OnScanResult="OnScanCompleted"/>
I also want to mention that my app uses the MVVM pattern so here's what I've done to wire things: the OnScanCompleted is in XAML page's code behind that looks like this:
private async void OnScanCompleted(ZXing.Result result)
{
await _vm.On_Code_Scanned(result.Text);
}
So, I call a method in my view model from OnScanCompleted which is in code behind.
And the method in view model is fairly simple:
public async Task On_Code_Scanned(string code)
{
// Process code
}
Any idea how to fix this issue?
UPDATE:
I started a fresh new Xamarin Forms app. I then added ZXing.NetMobile and ZXing.Net.Mobile.Forms and nothing else. When I test scanning a QR code on my iPhone Xs, it still fails. So, it looks like this particular libary just doesn't work on iOS at all
I had the same issue.
The only thing I did was that I've changed the Xamarin.IOS to the latest version (16.0.0.75).
By using Visual Studio => go to Help/Check for Updates
It solved the problem.
i had similar issue, it was working for more than a year then all of sudden all my users complaint its not working anymore, after ios update. the apps just crash whenever it tried to call the barcode scanning camera using zxing.
the solution was easy in my case, just recompile it using latest xamarin.ios version. just need to make sure the version is up to date
I also faced this issue and found the solution.
Instead of using metadataoutput.AvailableMetadataObjectTypes, you need to set all code types in an array of AVMetadataObjectType, for ex:
AVMetadataObjectType.EAN8Code | AVMetadataObjectType.EAN13Code |
AVMetadataObjectType.Code39Code | AVMetadataObjectType.Code128Code |......
I'm wondering if there is a way to see UI changes in an iOS application without having to restart the device or simulator. I know in react native since they use Javascript you're able to make a change to the background colour of a view and the background would reflect that change without having to restart the simulator. So I'm thinking since react native just converts javascript into native app code this might be possible in Native Development? Yes no maybe?
Doing normal native iOS development in the typical way -- no.
But, if you reproduce what ReactNative is doing (defining a data format for UI, loading it, and then wiring it up dynamically), then you can re-create it.
You might want to look into SwiftUI, which gives you a way to preview in Xcode without running the entire app.
Without that, if you use modules for all your UI code, you could incorporate a playground and see live changes as you code as well.
i have a question about embeddinator-4000. I will provide you with a bit of background :
We are currently trying to embedd some of our xamarin apps into a native objective-c app container. For this, i have created a poc in which i instantiate and call a Xamarin navigation controller into the native app. The navigation is managed by the xamarin subapp, and it seems to work fine. The problem is that we use MvvmCross inside our Xamarin apps for navigation, bindings etc...
My question is : are we able to instantiate Mvvmcross in the nativ app container in order to use Mvvmcross in my subapps ?
We have created a project with Unity 2017.3 and Vuforia 6.0.114 and need to integrate it into a native iOS App with already existing AppDelegate and existing ViewContollers. We still want to launch our own AppDelegate and starting ViewController but on some point later the Unity+Vuforia-Controller shall be entered.
We are familiar with the process of integrating a Unity App into a native iOS App itself and we made everything work fine as long as there is no Vuforia involved.
The problem is that Vuforia itself subclasses Unity's Controller (in VuforiaNativeRendererController.mm) by using the IMPL_APP_CONTROLLER_SUBCLASS(VuforiaNativeRendererController) mechanism.
This is actually the same way we subclass our own iOS native App, thus we have a conflict. We can either start our part and take control of Unity or let Vuforia do it.
The question now is: Is it possible to somehow further subclass Vuforia or something similar? And if so, how could this be achieved?
We recently hit that exact same road bump. Using this method to integrate the Unity app into our existing native iOS project, we managed to bypass the renderer issue. Just make sure you turn off Auto Graphics API in Unity's player settings and use OpenGLES2 instead of Metal
I know this question is old, but pops-up in search and there is a solution.
Here's guide on Using Vuforia Engine with Unity as a Library (UaaL)
I am attempting to use the $cordovaSqlite plugin.
I use the $window.sqlitePlugin version to open the database because it has the same API as WebSql in Chrome so I can debug there.
When I deploy to Android it works without issue, but on iOS $window.sqlitePlugin comes back as undefined.
This is NOT accessed at the start of my app, so I do not think it device ready issue. I am actually going several menus in before trying to access it.
Any ideas why this would be undefined and why I can't use this plugin on iOS?