Skip to content

Commit 79525a8

Browse files
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.
1 parent 5c8d509 commit 79525a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/services/livesync/ios-livesync-service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
3232
const tempZip = temp.path({ prefix: "sync", suffix: ".zip" });
3333
this.$logger.trace("Creating zip file: " + tempZip);
3434

35-
await this.$fs.zipFiles(tempZip, this.$fs.enumerateFilesInDirectorySync(projectFilesPath), (res) => {
35+
const filesToTransfer = this.$fs.enumerateFilesInDirectorySync(projectFilesPath);
36+
37+
await this.$fs.zipFiles(tempZip, filesToTransfer, (res) => {
3638
return path.join(APP_FOLDER_NAME, path.relative(projectFilesPath, res));
3739
});
3840

@@ -43,6 +45,8 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
4345
deviceProjectRootPath: await deviceAppData.getDeviceProjectRootPath()
4446
}]);
4547

48+
await deviceAppData.device.applicationManager.setTransferredAppFiles(filesToTransfer);
49+
4650
return {
4751
deviceAppData,
4852
isFullSync: true,

0 commit comments

Comments
 (0)