Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: Release 6.3.0, Release 7.1.1
-
Fix Version/s: Release 7.5.0
-
Component/s: iOS
-
Labels:
-
Environment:
SDK 6.3.0.GA & 7.1.1.GA
Description
When opening requesting permissions to open the camera on an iPhone X if the forceSplashAsSnapshot is set to true the splash screen will display instead of the camera and the application has to be killed.
Steps to reproduce:
1. Create a sample application
2. Update the index.js with the attached
3. Update the alloy.js with the attached
4. Update the tiapp.xml with the NSCameraUsageDescription key in the attached tiapp.xml
5. Run the application and click on "Hello World"
6. Accept permissions
7. Notice camera loads, but then default splash screen is displayed over the camera.
Example:
|
var win = Ti.UI.createWindow({ |
backgroundColor: '#fff' |
});
|
|
function doClick(e) { |
var _cameraSettings = { |
saveToPhotoGallery : false, |
showControls : true, |
allowEditing : false, |
mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]
|
};
|
|
if (Ti.Media.hasCameraPermissions()) { |
//we have permissions, open the camera |
Ti.Media.showCamera(_cameraSettings);
|
} else { |
//must request camera access |
Ti.Media.requestCameraPermissions(function(_evt) { |
if (_evt.success) { |
//permissions were granted, open camera |
Ti.Media.showCamera(_cameraSettings);
|
} else { |
alert('We need camera permissions'); |
}
|
});
|
}
|
}
|
|
|
var btn = Ti.UI.createButton({ |
title: 'Trigger' |
});
|
|
btn.addEventListener('click', doClick); |
|
win.add(btn);
|
|
win.open();
|
tiapp.xml:
...
|
<key>NSCameraUsageDescription</key> |
<string>To allow you to take photos of documents for uploading</string> |
...
|