iOS Security Prompt and Camera Behind

Hi All,

I have managed to get through the saga of getting an iOS app built and onto the an iPAD through xcode, but seem to have an issue with the Camera plugin. When i click the button to take a picture or upload the picture the code eblow is used. The iOS security prompt seems to pop up behind the app; if i press home and then switch back to the app it displays over the top. Once allowed the same happens with the actual camera; it load behind the app and only by pressing home and switching back does it them pring the preview/captcher screen infront of the app.

I did a search on here and google and couldn’t find the answer but apologies if I have missed something.

Thanks in advance!

takePicture(idx, itemId, type) {
        let newImage = new ItemImage();
        newImage.itemId = itemId;
        newImage.imageId = this.items[idx].images.length;
        let srcType =;
        if (type == 'lib') {
            srcType =;
        if (type == 'cam') {
            srcType =;
            quality: 100,
            sourceType: srcType,
            saveToPhotoAlbum: false,
            correctOrientation: true
        }).then((imageData) => {
            // imageData is a base64 encoded string
            if ('android') && type === 'lib') {
                    .then(filePath => {
                        let correctPath = filePath.substr(0, filePath.lastIndexOf('/') + 1);
                        let currentName = imageData.substring(imageData.lastIndexOf('/') + 1, imageData.lastIndexOf('?'));
                        this.copyFileToLocalDir(correctPath, currentName, this.createFileName());
            } else {
                var currentName = imageData.substr(imageData.lastIndexOf('/') + 1);
                var correctPath = imageData.substr(0, imageData.lastIndexOf('/') + 1);
                this.copyFileToLocalDir(correctPath, currentName, this.createFileName());
            if (type == 'lib') {
                newImage.imageData = this.lastImage;
            } else {
                newImage.imageData = "data:image/jpeg;base64," + imageData;
        }, (err) => {

Anyone? If anyone has successfully got camera working without this issue and have their code on github or similar happy to do the ‘leg work’ to work out the difference in implementation. Thanks

Has no one else had this issue? Any examples of working apps I could look at?