From 58b2c630ab5481753f08ac565971a268dcc17971 Mon Sep 17 00:00:00 2001 From: Yegor Jbanov Date: Thu, 3 Mar 2016 15:58:34 -0800 Subject: [PATCH] [ios] generate flx on first ios launch --- packages/flutter_tools/lib/src/ios/simulators.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart index 832320126a..fae2bda441 100644 --- a/packages/flutter_tools/lib/src/ios/simulators.dart +++ b/packages/flutter_tools/lib/src/ios/simulators.dart @@ -370,11 +370,15 @@ class IOSSimulator extends Device { } Future _setupUpdatedApplicationBundle(ApplicationPackage app, Toolchain toolchain) async { - if (_applicationIsInstalledAndRunning(app)) { - return _sideloadUpdatedAssetsForInstalledApplicationBundle(app, toolchain); - } else { + bool sideloadResult = await _sideloadUpdatedAssetsForInstalledApplicationBundle(app, toolchain); + + if (!sideloadResult) + return false; + + if (!_applicationIsInstalledAndRunning(app)) return _buildAndInstallApplicationBundle(app); - } + + return true; } Future _buildAndInstallApplicationBundle(ApplicationPackage app) async {