fix for issue #549: Blueprints InstallApplication array always install last application (#704)

Co-authored-by: tperfitt <tperfitt@twocanoes.com>
This commit is contained in:
tperfitt
2020-09-08 14:21:41 -05:00
committed by GitHub
parent c6db60ce61
commit 4e20295a8d

View File

@@ -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),
},
},