How make UIView visible in UX


i’m trying to implement QR/EAN barcode scanner and i will use for this existing module
I downloaded actual version of MTBBarcodeScanner library and i have it integrated in this module. Now is it builded correctly after few modifications.
But what i don’t understand is, how can i make this UIView, in which will be camera, visible with UX ?

This is part of UNO implementation.

using Uno;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
using Uno.Compiler.ExportTargetInterop;

[Require("Source.Include", "MTBBarcodeScanner.h")]
[ForeignInclude(Language.ObjC, "MTBBasicExampleViewController.h")]
public class BarcodeScanner : NativeModule {

	public BarcodeScanner(){
		AddMember(new NativeFunction("scanner", 
	object Scanner(Context c, object[] args){

		return null;


	static extern(iOS) void Scanner()
		UIView *previewView = [UIApplication sharedApplication].keyWindow;

		NSLog(@"This is it: %@", @"This is my string text!");
		MTBBarcodeScanner *scanner = [[MTBBarcodeScanner alloc] initWithPreviewView:previewView];
		[MTBBarcodeScanner requestCameraPermissionWithSuccess:^(BOOL success) {
			if (success) {
				NSError *error;
				[self.scanner startScanningWithResultBlock:^(NSArray *codes) {
					AVMetadataMachineReadableCodeObject *code = [codes firstObject];
					NSLog(@"Found code: %@", code.stringValue);
					[self.scanner stopScanning];
				} error:&error];
			} else {
				NSLog(@"The user denied access to the camera");
				// The user denied access to the camera

	static extern(!iOS) void Scanner(){
		debug_log("Barcode Scanner is not supported on this platform");



Have a look here:

Hi Anders,

sry but i don’t think, that this my question has something to do with native controls

You are asking how to make an UIView (native iOS view) visible, so if that’s not a question about native controls then I’m not understanding the question correctly. Please be more clear/specific.

I have solved it with:

UIViewController *uivc = [UIApplication sharedApplication].keyWindow.rootViewController;

and then in UX i must this have:


then it works me.


The github project is a good place to look if you want to integrate native android and/or ios views. I guess the way you have solved it works, but that wont take part in fuse layout and hittesting.