Project: titanium
Issue TIMOB-18214: iOS8: Titanium.Media.showCamera unexpected behaviour on AdHoc distribution
h6.Issue Description Invoking Ti.Media.showCamera works perfect if we do a command line build of our app on device. If we take the provided sample app and then publish AdHoc then it fails. h6.Steps to reproduce 1. Launch sample app (Run As > Device) 2. Hit Camera Button to Take a photograph 3. Hit Use Photo and monitor logs 4. Image Dimensions are correctly returned (running App on device iPhone5s): {quote} [INFO] : Image Captured, Dims 2448,3264 Aspect Ratio: 0.75 [INFO] : Image Captured, Dims 2448,3264 Aspect Ratio: 0.75 {quote} 5. Repeat all steps under Ad Hoc mode. 6. Logs are slightly different now: {quote} [ERROR] : assertion failed: 12A366: libxpc.dylib + 71820 [4BC9CA3D-4DEE-314C-ADBF-53BDCEEFE45C]: 0x7d [ERROR] : 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. [ERROR] : Image Captured, Dims: undefined,undefined Aspect Ratio: NaN [ERROR] : Image Captured, Dims: undefined,undefined Aspect Ratio: NaN {quote} h6.Test Case {code} (function() {	Titanium.Media.showCamera({	success : function(event) {	var capturedImage = event.media;	Ti.API.info('Image Captured, Dims: ' + event.media.width + ',' + event.media.height + " Aspect Ratio: " + event.media.width / event.media.height);	Ti.API.info('Image Captured, Dims: ' + capturedImage.width + ',' + capturedImage.height + " Aspect Ratio: " + capturedImage.width / capturedImage.height);	},	cancel : function() {	},	error : function(error) {	},	saveToPhotoGallery : false,	allowEditing : false,	mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],	showControls : true,	autohide : false	}); })(); {code} h6.Device Output (Ad Hoc Distribution) iPhone 4 iOS7.1 {quote} Dec 16 09:46:46 lAlO wifid[15] : Dec 16 09:46:51 lAlO Super.Simple[208] : [INFO] Image Captured, Dims: 1936,2592 Aspect Ratio: 0.7469135802469136 Dec 16 09:46:51 lAlO Super.Simple[208] : [INFO] Image Captured, Dims: 1936,2592 Aspect Ratio: 0.7469135802469136 {quote} iPhone 5s iOS 8.1 {quote} Dec 16 10:36:41 iPhone Super.Simple[253] : [INFO] Image Captured, Dims: undefined,undefined Aspect Ratio: NaN Dec 16 10:36:41 iPhone Super.Simple[253] : [INFO] Image Captured, Dims: undefined,undefined Aspect Ratio: NaN {quote}
Story points: 13