jacobweber opened a new issue #566: Opening camera causes status bar to disappear URL: https://github.com/apache/cordova-plugin-camera/issues/566 # Bug Report ## Problem ### What is expected to happen? On an app that uses a visible status-bar, open and close the camera. Status bar should reappear. ### What does actually happen? Status bar disappears after camera closed. ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> - run app from zip (or re-create using instructions below) - notice white status bar area - click content to open camera - click Cancel to close camera - notice status bar area has disappeared [CordovaTest.zip](https://github.com/apache/cordova-plugin-camera/files/4288935/CordovaTest.zip) ### Command or Code <!-- What command or code is needed to reproduce the problem? --> ``` # create project $ cordova create CordovaTest com.sample.cordovatest CordovaTest $ cd CordovaTest $ cordova platform add [email protected] # add status bar $ cordova plugin add [email protected] # add to config.xml: <platform name="ios"> <preference name="StatusBarOverlaysWebView" value="false" /> </platform> # create splash screen $ mkdir -p res/screen/ios $ /usr/local/bin/convert -size "2732x2732" "xc:#AA0000" "res/screen/ios/Default@2x~universal~anyany.png" # add to config.xml: <splash src="res/screen/ios/Default@2x~universal~anyany.png" /> # add camera plugin $ cordova plugin add [email protected] # add to config.xml: <config-file platform="ios" target="*-Info.plist" parent="NSCameraUsageDescription"> <string>test</string> </config-file> <config-file platform="ios" target="*-Info.plist" parent="NSPhotoLibraryUsageDescription"> <string>test</string> </config-file> # add wkwebview $ cordova plugin add https://github.com/mwchambers/cordova-plugin-wkwebview-engine#master # add to config.xml: <preference name="WKWebViewOnly" value="true" /> # in www/index.html, wrap div around body, to deal with https://github.com/apache/cordova-plugin-wkwebview-engine/issues/108: <div id="content" style="width: 100vw; height: 100vh;"> <div class="app"> ... </div> # add to www/js/index.js in onDeviceReady: document.getElementById('content').addEventListener('click', function() { if (window.navigator.camera) { window.navigator.camera.getPicture( imageURI => {}, message => {}, { sourceType: window.Camera.PictureSourceType.CAMERA, destinationType: window.Camera.DestinationType.FILE_URI, allowEdit: false } ); } }); # add build.json with your development team $ cordova run ios --buildConfig build.json ``` ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Running on iOS 13.3.1, iPhone XR ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> cordova: 9.0.0 ([email protected]) Xcode 11.3.1 Building on Mac OS 10.14.6. ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [X] I searched for existing GitHub issues - [X] I updated all Cordova tooling to most recent version - [X] I included all the necessary information above
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
