Question

The forge.launchimage module requires that image assets live under the src/ directory of my app.

Unfortunately this results in the final build of my iOS app containing two copies of each of the image assets.

One copy in the package root renamed as Default--.png as well as the original image under src/.

With iOS requiring multiple resolutions of each asset the duplication starts to add up quickly.

Thank you!

Était-ce utile?

La solution

Yep - even more painful with the new iOS 7 sizes!

If you don't re-use the launchimage files elsewhere in your app, you could use a postbuild hook to clean up those assets before we create the app. Something like this:

import glob
import shutil
import sys

def main(platform):
    if platform == "ios":
        for launch_dir in glob.glob("ios/*/assets/src/launch"):
            shutil.rmtree(launch_dir)

if __name__ == "__main__":
    main(sys.argv[1])
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top