From 79525a85448c01e03afb294cdbd2bba7e7f4d8c6 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Fri, 5 Jul 2019 11:06:07 +0300 Subject: [PATCH] fix: iOS device logs are not using source maps initially When you run your app on iOS device for the first time, we execute full sync operation with a zip file. This does not gets in our logic for setting source maps of the transferred files and CLI does not use its logic to parse device logs and show the exact lines from original files. Fix this by setting the source maps in this case. --- lib/services/livesync/ios-livesync-service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/services/livesync/ios-livesync-service.ts b/lib/services/livesync/ios-livesync-service.ts index fddd52e561..92162beeb2 100644 --- a/lib/services/livesync/ios-livesync-service.ts +++ b/lib/services/livesync/ios-livesync-service.ts @@ -32,7 +32,9 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I const tempZip = temp.path({ prefix: "sync", suffix: ".zip" }); this.$logger.trace("Creating zip file: " + tempZip); - await this.$fs.zipFiles(tempZip, this.$fs.enumerateFilesInDirectorySync(projectFilesPath), (res) => { + const filesToTransfer = this.$fs.enumerateFilesInDirectorySync(projectFilesPath); + + await this.$fs.zipFiles(tempZip, filesToTransfer, (res) => { return path.join(APP_FOLDER_NAME, path.relative(projectFilesPath, res)); }); @@ -43,6 +45,8 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I deviceProjectRootPath: await deviceAppData.getDeviceProjectRootPath() }]); + await deviceAppData.device.applicationManager.setTransferredAppFiles(filesToTransfer); + return { deviceAppData, isFullSync: true,