EddyVerbruggen / cordova-plugin-actionsheet

:clipboard: ActionSheet plugin for Cordova iOS and Android apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actionsheet + Camera

camdagr8 opened this issue · comments

This plugin seems to break the cordova camera plugin in Cordova v. 3.6.3 - ios8.
I get the following errors when calling the camera after making a selection in the action sheet:

Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates. Nov 9 01:52:02 Cams-iPhone Mid-Pacific[8993] <Error>: CGAffineTransformInvert: singular matrix.

I'm trying to do something similar to how Instagram allows you to select a photo from your library or take a new one if that helps explain how the issue is happening.

Perhaps a silly question, but have you tried the camera without the actionsheet plugin installed?

I have actually seen this behavior with Cordova 3.6.3 on iOS8 myself without actionsheet. IIRC it popped up after selecting the camera from a confirm dialog.

Could you try adding a setTimeout before opening the camera so the view settles (hides the actionsheet) before it animates the camera UI?

Please let me know what you find!
Eddy

Yes I have. I get the:
Snapshotting a view that has not been rendered results in an empty snapshot.

error per the norm for 3.6.3 but it still functions the way it should. I'm able to get the picture data etc. But with the actionsheet plugin, it doesn't get that far.

Upon further investigation, it works if you change the:
Camera.EncodingType
from JPEG to PNG.

Interesting! That's good for me to know as well. As it's not ActionSheet related (Google the error) I'm closing it here. Thanks!