From 4e20295a8d0ccf9511dee5bfc885849d0f318346 Mon Sep 17 00:00:00 2001 From: tperfitt Date: Tue, 8 Sep 2020 14:21:41 -0500 Subject: [PATCH] fix for issue #549: Blueprints InstallApplication array always install last application (#704) Co-authored-by: tperfitt --- platform/blueprint/worker.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/blueprint/worker.go b/platform/blueprint/worker.go index 05d0fb45..9b144d5e 100644 --- a/platform/blueprint/worker.go +++ b/platform/blueprint/worker.go @@ -189,7 +189,8 @@ func (w *Worker) applyToDevice(ctx context.Context, bp Blueprint, udid string) e }) } - for _, appURL := range bp.ApplicationURLs { + for i := range bp.ApplicationURLs { + appURL := &bp.ApplicationURLs[i] level.Debug(w.logger).Log( "msg", "creating mdm command request from blueprint", "request_type", "InstallApplication", @@ -203,7 +204,7 @@ func (w *Worker) applyToDevice(ctx context.Context, bp Blueprint, udid string) e Command: &mdm.Command{ RequestType: "InstallApplication", InstallApplication: &mdm.InstallApplication{ - ManifestURL: &appURL, + ManifestURL: appURL, ManagementFlags: intPtr(1), }, },