문제

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!

도움이 되었습니까?

해결책

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])
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top