matheustavaresdev edited a comment on issue #148: iOS 13 dark mode default text colour is white URL: https://github.com/apache/cordova-plugin-statusbar/issues/148#issuecomment-594383943 Workaround to fix this: 1) Instal the `plist` package via `npm install --save-dev plist` 2) Add this to your `config.xml` file under `<platform name="ios">` tag, so it will be: `<platform name="ios"> <hook src="hooks/ios_fix_dark_mode.js" type="after_prepare" /> </platform>` 3) On your root folder, create a folder calles `hooks` and inside it, create a file called `ios_fix_dark_mode.js`. 4) Inside that file, paste this code below, replacing `[Your App Name]` to your own app's name. You can also, go into `platforms/ios/` and see which name it is to double check. ```var fs = require('fs'); var path = require('path'); var plist = require('plist'); // npm install --save-dev plist let plistDir = path.join( __dirname, '../platforms/ios/[Your App Name]/[Your App Name]-Info.plist' ); editPlistFile(); function editPlistFile() { var xml = fs.readFileSync(plistDir, 'utf8'); var newPlistData = plist.parse(xml); // console.log(newPlistData); // uncomment to see the old plist file's content newPlistData.UIUserInterfaceStyle = 'Light'; newPlistData.UIViewControllerBasedStatusBarAppearance = true; // console.log(newPlistData); // uncomment to see the new plist file's content xml = plist.build(newPlistData); fs.writeFileSync(plistDir, xml, { encoding: 'utf8' }); } ``` 5) Every time you use one of those commands below, this code will run, making sure that the correct plist is used. ```cordova prepare cordova platform add cordova build cordova run all variants with ionic in the beginning ```
---------------------------------------------------------------- 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]
