Code Monkey home page Code Monkey logo

privacyscreenplugin's Introduction

NOTE: This plugin is NOT being actively maintained. I no longer work on Cordova/PhoneGap plugins and it is essentially abandonware. Please feel free to fork it and update it if you need to.

PrivacyScreenPlugin

Both iOS (as of iOS 7) and Android have app switchers that display a screenshot of your app.

This is a lovely feature for most apps, but if your app displays sensitive information this is a possible privacy risk.

This plugin flags your app so that it doesn't show your users' sensitive data in the task switcher. It sets the FLAG_SECURE flag in Android (which also prevents manual screenshots from being taken) and hides the window in iOS.

On iOS this plugin will try to show your splashscreen in the app switcher. It will search for splashscreens prefixed by Default or the value of the key UILaunchImageFile in your .plist file. If it fails to find a splashscreen for a specific device or orientation (portrait or landscape), a black screen is shown instead.

Installation

For Cordova 3.x.x:

  1. To add this plugin just type: cordova plugin add cordova-plugin-privacyscreen or phonegap local plugin add cordova-plugin-privacyscreen
  2. To remove this plugin type: cordova plugin remove cordova-plugin-privacyscreen or phonegap local plugin remove cordova-plugin-privacyscreen

Usage:

This plugin exposes no interface, it simply sets your app to be private. You don't need to do anything except install the plugin.

Test this plugin on a real device because the iOS simulator (7.1 at least) does a poor job hiding your app.

License

The MIT License

Copyright (c) 2016 Tommy-Carlos Williams (http://github.com/devgeeks)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

privacyscreenplugin's People

Contributors

devgeeks avatar eddyverbruggen avatar yyfearth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

privacyscreenplugin's Issues

Doesn't work with cordova-plugin-crop

Hello, I just created an application where the user is not allowed to take screenshot and it runs well, but when i go to cropping image page use (cordova-plugin-crop) it didn't work.

Cordova CLI version and cordova platform version

cordova --version                                    11.0.0
cordova platform version android                     9.1.0

Thanks in advance.

====== EDIT ======

I think this issue is not related with this plugin, I suggest the solution is from cordova-plugin-crop not in this plugin. I will close this issue

Not working correctly with inAppBrowser

great plugin. in testing i did run into an issue. i used the apache "inAppBrowser" and just used google.com as the url. I then simply hit the home button. in the console i get the message "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." testing the rest of the app in all the other functions it worked great. I am using cordova 3.6.3 on a iPad Air 2 running ios 8.1. Not that it should matter, but i am also using JqueryMobile 1.4.3. Any idea on how to fix this i did not see any settings that i had to change.

thanks for any input...

Feature Request: Toggling Option

Can hooks be added for this setting to the toggled in the app? Android's flags prevent screenshots from being taken by the user and it would be nice to allow an option for users to disable this function.

Weird issue with keyboard on iOS

Hello @devgeeks thanks for such a great plugin. We have a confirmed issue where we have an app with privacy screen plugin installed our input fields are acting up. When users tap in an input field - field receives focus but keyboard does not open. The only way to get a keyboard up is to double tap on the input field.

This is happening on multiple ios versions - 9.3 and 9.2.1

If I remove the plugin inputs in the app behave normally - user taps on an input and keyboard appears. If i add the plugin back in the issue is back.
Plugin versions that seem to cause the issue 0.1.3 and 0.1.2

not working in android P

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version

Sample Code that illustrates the problem

Logs taken while reproducing problem

iphone 5 and iphone 6 ios device show blank screen in landscape mode for privacy screen

When ios application runs on landscape mode on iphone 5, 5s, 6, 6s device, when privacy screen is displayed, it shows an blank screen.

However, notice in the same testing, the splash screen just shows the portrait splash image. Although the portrait image is shown in landscape mode, it is still better than showning a blank screen to user.

When comparing the getImageName method in CDVSplashScreen.m has the below code:

if (device.iPhone5)
{ // does not support landscape
imageName = [imageName stringByAppendingString:@"-568h"];
}
else if (device.iPhone6)
{ // does not support landscape
imageName = [imageName stringByAppendingString:@"-667h"];
}

while in PrivacyScreenPlugin.m it has an extra check in the same code

if (device.iPhone5) { // does not support landscape
imageName = isLandscape ? nil :[imageName stringByAppendingString:@"-568h"];
} else if (device.iPhone6) { // does not support landscape
imageName = isLandscape ? nil : [imageName stringByAppendingString:@"-667h"];
}

A simple fix would be just remove the isLandScape?: condition check as CDVSplashScreen.m does.

Thanks
Jonathan

Compile warning caused by PrivacyScreenPlugin.h header-file specified as source-file

Expected Behaviour

Should be compiled without warning.

Actual Behaviour

Xcode compile the project with warning: no rule to process file '/IOS_PROJECT/Plugins/cordova-plugin-privacyscreen/PrivacyScreenPlugin.h' of type sourcecode.c.h for architecture xxx

Reproduce Scenario

When compile the project using this plugin with Xcode.

Steps to Reproduce

Open the cordova ios project with this plugin.
Click Run or Build or Archive.
Go to the Buildtime Issues, it shows the warning as above.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Build on macOS with Xcode 8.2

Cordova CLI version and cordova platform version

cordova 6.4.0
cordova-ios 4.3.1

Plugin version

cordova plugin version 0.3.1

PR #39 is created for this issue.

this plugin is not working on iphone 5..Any reason for that..Please help..

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version

Sample Code that illustrates the problem

Logs taken while reproducing problem

InAppBrowser is closing with cordova-ios 6

Expected Behaviour

Building an App with cordova-ios 6, and InappBrowser, the inAppBrowser still open after background foreground change.

Actual Behaviour

Building an App with cordova-ios 6, and InappBrowser, the inAppBrowser is closed after background foreground change.

Reproduce Scenario (including but not limited to)

With a fresh ionic 3, 4 or 5 app, just add an InappBrowser to open a page, and plugin privacyscreen, switch the app in background and then in foreground, the inAppBrowser is closed

With cordova-ios 5.1.1 it works, on cordova-ios > 6 there is the bug

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

cordova-ios 6 on all iOS devices (no problems with android)

Cordova CLI version and cordova platform version

cordova --version                                    10.0.0

Plugin version

0.4.0

[iOs] open control menu portrait, close, rotate, open control menu landscape: blackscreen and stays like that

I have the following test which makes my app unusable. If the user use their control menu in portrait-mode or landscape-mode. Closes it. Then rotates to the other mode and opens it again it will result in a black screen. I will look tomorrow with a native developer maybe he can help me pinpoint it further. When i don't use this plugin it doesn't happen.
Tested with Cordova 5.4.x and 6.0.x using PrivacyScreen version 3.0.0

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5 
ios-sim version: 5.0.6 
OS: Mac OS X El Capitan
Node Version: v5.9.0
Xcode version: Xcode 7.3 Build version 7D152p 

Problem with Cordova + Crosswalk plugin

Expected Behaviour

black screen

Actual Behaviour

no black screen

Reproduce Scenario (including but not limited to)

latest Cordova + latest Crosswalk plugin + something more plugins

Steps to Reproduce

without Crosswalk -> OK -> work good
with Crosswalk -> BAD -> no black screen

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

android 4.4

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Samsung S3 Neo

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
6.4.0
cordova platform version android                     # e.g. 4.1.1
Installed platforms:
  android 6.0.0

Plugin version

cordova plugin version
  • com.shazron.cordova.plugin.keychainutil 2.0.0 "KeyChain Plugin for Cordova iOS"
  • com.verso.cordova.clipboard 0.1.0 "Clipboard"
  • cordova-plugin-android-permissions 0.10.0 "Permissions"
  • cordova-plugin-compat 1.1.0 "Compat"
  • cordova-plugin-contacts 2.2.0 "Contacts"
  • cordova-plugin-customurlscheme 4.2.0 "Custom URL scheme"
  • cordova-plugin-device 1.1.3 "Device"
  • cordova-plugin-file 4.3.0 "File"
  • cordova-plugin-file-transfer 1.6.0 "File Transfer"
  • cordova-plugin-network-information 1.3.0 "Network Information"
  • cordova-plugin-privacyscreen 0.3.1 "PrivacyScreenPlugin"
  • cordova-plugin-statusbar 2.2.0 "StatusBar"
  • cordova-plugin-whitelist 1.3.0 "Whitelist"
  • cordova-plugin-wkwebview-engine 1.1.0 "Cordova WKWebView Engine"
  • cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
  • nl.x-services.plugins.touchid 2.0.0 "Touch ID"

Sample Code that illustrates the problem

todo...

Logs taken while reproducing problem

todo...

Disable PrivacyScreen for TouchID popup

I am developing app on ionic, I used PrivacyScreen Plugin to view splash screen on multitasking. But the splash screen also shown in TouchID popup, I want to disable this splash screen for particular screen or TouchID popup.

Any Idea ?

PrivacyScreenPlugin (pluginName: privacyscreenplugin) does not exist. - IOS

Hello,
we're using your plugin on our project. Recentely we updated the latest (master / 0.10) version, and we got an error on XCode, and application stop working.

These is the stack trace from Xcode debugger:

2014-11-05 18:55:46.089 Jumy[968:60b] [CDVTimer][file] 18.669963ms
2014-11-05 18:55:46.207 Jumy[968:60b] [CDVTimer][splashscreen] 115.970016ms
2014-11-05 18:55:46.208 Jumy[968:60b] CDVPlugin class PrivacyScreenPlugin (pluginName: privacyscreenplugin) does not exist.
2014-11-05 18:55:46.210 Jumy[968:60b] [CDVTimer][privacyscreenplugin] 1.707971ms
2014-11-05 18:55:46.211 Jumy[968:60b] [CDVTimer][TotalPluginStartup] 140.785038ms
2014-11-05 18:55:46.262 Jumy[968:60b] active
2014-11-05 18:55:47.122 Jumy[968:60b] Resetting plugins due to page load.
2014-11-05 18:55:47.592 Jumy[968:60b] Finished load of: file:///var/mobile/Applications/337F9DFE-B342-40D0-AC9F-7CDB0EE2DA34/Test.app/www/index.html

Using an old version, like 0.0.5 it work.

May you help us?
Thank you!

Denis

[IOS][Android] add JS interface and options

for a better control, I think you should add

  • option to enable the plugin
  • option to disable
  • event or some return value to detect that user makes a screenshot and prevented -> so we can give the user some feedback
  • some kind of callback function (success, error) for enable and disable options.

Still can screen capture on ios

Hi there,
I used this plug in for my app and test it both on android and ios. Android works perfectly great , no screenshot can be taken but for ios it still can screen capture.My IOS version : 8.4.1
Is there anyway to fix this?or any suggestion?

Black Screen

It would be nice if there would be an image displayed instead of a black screen. Or much nicer than everything would be an iOS-Style Blur (like in PayPal App). But I´m using Phonegap Build and therefore can`t change the Plugin source...

Nice to have - CHANGELOG

Dear @devgeeks,

it will be great, If we can see all changes (small or big) in CHANGELOG file. Especially if there are breaking changes.

thank you very much!

SplashScreen in Android

I used this plugin in my app, and it works, it blanks page view when it is in background (task manager is open).
I'd like to show a splashscreen in the page area, instead a white page. Is it possible for Android?

Thank you very much!

Request to allow manual screenshots on Android

Hello,

We have a requirement to block the multitasking thumbnail but on Android, this also prevents manual screenshots. This hinders regular use as well as popular screen sharing capabilities

Is it possible to allow Android to take manual screenshots but block the multitasking thumbnails?

Not working in Lollipop

Expected Behaviour

It should show black screen when recording screen with Media Projection API.

Actual Behaviour

The secured content visible when recording screen with Media Projection API.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Download a Screen Recorder app and start recording. You can see it is clearly capturing the screen.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 5.0

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version

Sample Code that illustrates the problem

Logs taken while reproducing problem

iOS App crashed if user use Password Manager on password input field

Expected Behaviour

User can use iOS Password manager

Actual Behaviour

2022-05-24 17:56:54.645677+0200 myApp[2722:131797] API error: <_UIKBCompatInputView: 0x100718ce0; frame = (0 0; 0 0); layer = <CALayer: 0x281cefea0>> returned 0 width, assuming UIViewNoIntrinsicMetric
2022-05-24 17:56:54.646196+0200 myApp[2722:131797] API error: <_UIKBCompatInputView: 0x100718ce0; frame = (0 0; 0 0); layer = <CALayer: 0x281cefea0>> returned 0 width, assuming UIViewNoIntrinsicMetric
2022-05-24 17:56:55.971465+0200 myApp[2722:131797] Keyboard cannot present view controllers (attempted to present <UIKeyboardHiddenViewController_Autofill: 0x100635030>)
2022-05-24 17:57:00.664796+0200 myApp[2722:131797] *** Assertion failure in -[_UIEventDeferringManager _remotePredicateWindowForEnvironment:], _UIEventDeferringManager.m:2740
2022-05-24 17:57:00.673475+0200 myApp[2722:131797] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[0x2837b9b20] [keyboardFocus] -[_UIEventDeferringManager _remotePredicateWindowForEnvironment:]: No window found for remote predicate of environment'
*** First throw call stack:
    (0x180ee070c 0x19861bf04 0x182681b00 0x18337b494 0x18397c7e8 0x1832e0194 0x18333d014 0x18397e9ec 0x18347988c 0x1842b561c 0x1004adfc4 0x1004b14cc 0x191f752ac 0x191f747c0 0x191f78960 0x180f00eec 0x180f1101c 0x180e53214 0x180e588e8 0x180e6bc30 0x1a1680988 0x183666c50 0x1834003d0 0x100170b24 0x1005643d0)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[0x2837b9b20] [keyboardFocus] -[_UIEventDeferringManager _remotePredicateWindowForEnvironment:]: No window found for remote predicate of environment'
terminating with uncaught exception of type NSException
(lldb)

Reproduce Scenario

  1. create new cordova app with cordova@10
  2. add ios platform with cordova-ios@6
  3. add privacy plugin
  4. add in html one password input field
  5. deploy app on mobile device with iOS 14.5.1
  6. click on input field
  7. choose password manager
  8. click on plus button or close the window
  9. app crashed

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

iOS 14.5.1

Deformed splash screen on iPhone X

Expected Behaviour

Looks smoothly on iOS X or just show a black window.

Actual Behaviour

The splash screen showed on the task list looks deformed, the same when the app comes back to the foreground.

Steps to Reproduce

1.a. Using ionic when you use an emulator with iPhone X
1.b In real devices with iPhone X
2. Open the app and put in the background. Open the task list.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

  • iPhone X iOS 11.2

Cordova CLI version and cordova platform version

cordova --version                                          8.0.0
cordova platform version iOS                       4.5.4

Plugin version

cordova plugin version       0.3.1

Screenshot

screen shot 2018-05-09 at 1 20 14 pm

Loading wrong imageName

The plugin tries to load images with names like "Default-667h", etc. If I provide the name of the image in "UILaunchImageFile" it still adds suffixes like "LaunchImage-800-667h".

I added <splash ..> in config.xml, but it modifies versions of "LaunchImage" in "Images.xcssets". But, the plugin does not uses "LaunchImage" it tries to load "LaunchImage-800-667h" which is obviously missing.

I have no idea how to make it work - how to provide custom image that will be used to capture the screen.

iPhone5 (iOS 10) isn't protected from screenshot

I thought PrivacyScreenPlugin applied iOS7 means iOS version(something like 10.2.1).
I tested this on iPhone 5s (10.2.1) but this wasn't work properly, and just normal screenshot works well. (but android works fine)

Is there anything I miseed? or old iPhone 5 or 6 isn't applied for this module?

What I want is just black screen or any protection from the screenshot on my app.

Thanks.

Expected Behaviour

Screenshot isn't applied or black screen saved
something like android does

Actual Behaviour

Screenshot works normally on iPhone 5s (os version 10.2.1) devices

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0

6.4.0

cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Plugin is not working on latest iOS platform

Great plugin. Thank you very much.
This plugin is working perfectly in all Android devices (as much as I have checked on), but same is not true for iPhone device.

Expected Behaviour

  • Disabled/blurred screenshots in Android/iOS

Actual Behaviour

  • Able to take screenshots on iPhone (iOS 11.1.2 and iOS 11.2.2) { }

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  • Any way of taking screenshots.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

  • iOS 11.1.2 and iOS 11.2.2

What device vendor (e.g. Samsung, HTC, Sony...)

  • Apple

Cordova CLI version and cordova platform version

cordova --version  :- 8.0.0
cordova platform version ios :- ~4.5.4 (also checked on 4.4.0)

Plugin version

cordova plugin version :- 0.3.1

List of other plugins which are included in my project -

cordova-plugin-app-launcher 0.4.0 "Launcher"
cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-iroot 0.4.0 "iRoot"
cordova-plugin-privacyscreen 0.3.1 "PrivacyScreenPlugin"
cordova-plugin-splashscreen 5.0.1 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Sample Code that illustrates the problem

  • I am uing this plugin in Ionic project.
  • Follow 5 min official guide to start new app.
  • Add this plugin to project using this plugin's guide
  • Add iOS platform to project using - ionic cordova platform add ios
  • Build iOS project files for Xcode - ionic cordova build ios
  • Now using Xcode, you can emulate app in iOS emulator.

Please let me know if I could be of any assistant.

With this plugin, using TouchID to open Password Manager, afterward the keyboard cannot be displayed.

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version

Sample Code that illustrates the problem

Logs taken while reproducing problem

[Android] Set filterTouchesWhenObscured on view to mitigate tapjacking

Not sure if this is within the scope of this plugin but another security concern in Android is 'Tapjacking'. An easy fix for this is to set the filterTouchesWhenObscured property on the view object. This could be done in the plugins initialise method, like so:

  @Override
  public void initialize(CordovaInterface cordova, CordovaWebView webView) {
    webView.getView().setFilterTouchesWhenObscured(true);
    super.initialize(cordova, webView);
    Activity activity = this.cordova.getActivity();
    activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
  }

I could create a separate plugin for this, but I think it fits pretty well in here and adding it to this plugin would be slightly more convenient. Happy to create a pull request if you think this make sense.

Let me know what you think!

Location of the "screenshots" taken

Is there a specific location where the "screenshots" are (temporary) stored? Or are the screenshots in-memory and discarded as soon as the app is closed from the switcher? Regardless of my questions; excellent plugin!

Splash not found: always black screen. Cordova 6, ios

Hi there,

I just tested this with cordova 6.0.0 and the screen is always black.

To reproduce, install cordova 6.0.0 (the latest version), then:

cordova create Test
cd Test
cordova platform add ios
cordova plugin add cordova-plugin-privacyscreen
cordova emulate ios --target=iPhone-6-Plus

Cordova creates the HelloCordova app, which has (inside of the Xcode Project Resources) an Image.xcassets catalog including AppIcon and LaunchImage.
The image names in the LaunchImage catalog are standard: Default.png, Default-736h.png etc.

So I was expecting, leaving as is, that the privacy screen plugin would find the default*.png files and use one of them for the privacy screen, instead of the black screen, but it seems it can't find the images.

I tried to edit the HelloCordova-info.plist file and add the following:

    <key>UILaunchImageFile</key>
    <string>LaunchImage</string>

I've put LaunchImage, as that's the name of the image set. I tried to put Default.png, I tried Default. I tried add an image called Splash.png directly in the Resources folder of the Xcode project and tried to use Splash.png, or Splash.

When I press 2 times the "Home" button (I actually do that in the simulator by pressing Cmd+Shit+H 2 times), or when I resume the app after putting it in background, I always get the black screen instead of the splash image I was expecting.

I tried also to modify the plugin .m file and in the GetImageName to return "LaunchImage" or "Splash" but when I minimize the app and check it, it always has a black screen and not the splash screen.

It would be nice if you test this and maybe tell what I'm doing wrong or find a fix, thank you.

Use StoryBoard instead of splashscreen

Expected Behaviour

The Splash screen needs to be shown

Actual Behaviour

Black screen is shown

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Use storybaord instead of Splashscreen

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

iphone X

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.