Isn't it better to move this function out of `addInstalledApp`?