Skip to content

Instantly share code, notes, and snippets.

@dayhaysoos
Created March 25, 2017 17:05
Show Gist options
  • Save dayhaysoos/d5a80106cb8970d17749b2024343866e to your computer and use it in GitHub Desktop.
Save dayhaysoos/d5a80106cb8970d17749b2024343866e to your computer and use it in GitHub Desktop.

Edge Cases for Pull Request #12649 on React Native

facebook/react-native#12649 (comment)

-Run eject without icon key

Default behavior. Android uses Android logo for the icon and iOS produces the place holder icon as expected.

-Run eject with icon object, default property with a path name to standard icon

iOS and Android platforms get same exact image for app icon as expected

-Run eject with icon object, default property with standard icon and iOS property with an iOS specific icon

iOS platform gets ios specific icon, android gets standard as expected. Default property gets overwritten

-Run eject with icon object, default property with standard icon and Android property with an Android specific icon

Android platform gets Android specific icon, iOS gets standard as expected. Default property gets overwritten

-Run eject with incorrect path names

Works fine for iOS (it shows an sharp error, however, Android had an issue where it would still erase the default android icons.

Currently it only checks if there is a string for androidAppIcon and if that string exists, it erases those default icons and continues to run the sharp script as if everything is okay. I rewrote this to check if the string is there AND make sure the file is there as well. This will only work if the image files are at the root level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment