CameraRoll - First time use bug

fuse 1.6

OS: MacOS Sierra

iOS: 11.2

Steps

  1. Install Fuse Preview App (fresh install each time)
  2. Scan QR code (Allow Camera)
  3. (camera roll image gallery pops up)
  4. Tap photo
  5. ERROR is fired with following message “Picture could not be selected for an unknown reason”
  6. This should only be fired upon the response of the permission check
  7. Permission dialog pops up
  8. Tap Allow
  9. No result is returned (because the response was fired before the permission check - step 5)
  10. If close app and start again from step 3, the result of the image is returned (i.e. it works).

Our main concern is the first time experience yielding no result. This bug is for CameraRoll.publishImage() too

Second concern: shouldn’t the permission check popup before displaying the image gallery? e.g. its like a person walking into a restricted area, then being asked if they have permission to be there, instead of being asked first before being allowed into the restricted area.

Code

<App>
	<JavaScript>
    	var Observable = require("FuseJS/Observable");
    	var cameraRoll = require("FuseJS/CameraRoll");
        var camera = require("FuseJS/Camera");

    	var image = Observable();
    	cameraRoll.getImage()
            .then(function(imageIn){

                image.value = imageIn;
                console.log('ADDING IMAGE')

            })
            .catch(function(error){

                console.log('ERROR');
                console.log(error);

        	});

        module.exports = {
        	image: image
        };
    </JavaScript>

    <StackPanel>

    	<Image File="{image.path}" />

    </StackPanel>
</App>



…also tested on iOS 10.3.3 with same result.

Hey Andrewq,

I have already created issue ticket here.

Ok, thanks Arturs!