terreng opened a new pull request #808: (iOS) Dark mode splashscreen storyboard 
images
URL: https://github.com/apache/cordova-ios/pull/808
 
 
   This is my first pr so please don't burn me at the stake. 
   
   <!--
   Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist is intended as a quick reference, for complete details please 
see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   
   iOS
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   I wanted to include a dark mode variant of my app's splash screen, but found 
that Cordova did not yet support this feature. It turns out that it only took a 
few lines of code, so I figured I'd share it here.
   
   I found this related issue: 
https://github.com/apache/cordova-plugin-splashscreen/issues/246. It turns out 
that no changes to the splashscreen plugin are necessary to make it happen.
   
   ### Description
   <!-- Describe your changes in detail -->
   
   This enables dark mode storyboard images by allowing you to specify splash 
images based on appearance (dark or light). It checks for ~dark or ~light 
suffixes in splash images. If neither is found, they're used as the default. It 
then adds the variants to Contents.json, and the rest is handled by iOS. 
Example config.xml:
   
   `<splash src="res/screen/ios/Default@3x~iphone~comany.png" />`
   `<splash src="res/screen/ios/Default@3x~iphone~comany~dark.png" />`
   
   This pr only adds support for iOS.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   It works on my iPhone. I haven't run any tests, but chances are I probably 
didn't break anything.. right?
   
   ### Checklist
   
   - [ ] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to 
one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the 
text above (and used the correct [keyword to close issues using 
keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   
   Documentation would need to change over at 
https://github.com/apache/cordova-plugin-splashscreen/blob/master/README.md.
   
   Thank you.

----------------------------------------------------------------
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]

Reply via email to