添加启动画面图像显示流星应用程序中的错误

Adding splash screen image shows error in meteor app

我正在尝试将启动画面添加到我的 meteor 应用程序中。在 mobile-config.js 文件中添加

App.launchScreens({
    //iOS
    'iphone_2x': '/images/splash/splash-375x667@2x.png'    
});

当我运行meteor run ios-device时,显示如下错误:

Error while running for mobile platforms: ENOENT, stat '/images/splash/splash-375x667@2x.png'

您的文件路径不应以斜杠开头。对于位于 yourApp/images/splash/splash-375x667@2x.png 的初始图像:

App.launchScreens({
    //iOS
    'iphone_2x': 'images/splash/splash-375x667@2x.png'    
});

参见 MDG github 中的 the official localmarket example's config 以供参考。