Fix web clips installation not working for iOS

feature/appm-store/pbac
Saad Sahibjan 5 years ago
parent a2ceef5e84
commit d2f8b6e160

@ -973,10 +973,14 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
.getUuid();
app.setType(mobileAppType);
app.setLocation(plistDownloadEndpoint);
app.setIconImage(application.getApplicationReleases().get(0).getIconPath());
Properties properties = new Properties();
properties.put(MDMAppConstants.IOSConstants.IS_PREVENT_BACKUP, true);
properties.put(MDMAppConstants.IOSConstants.IS_REMOVE_APP, true);
properties.put(MDMAppConstants.IOSConstants.I_TUNES_ID, application.getPackageName());
properties.put(MDMAppConstants.IOSConstants.LABEL, application.getName());
properties.put(MDMAppConstants.IOSConstants.WEB_CLIP_URL,
application.getApplicationReleases().get(0).getInstallerPath());
app.setProperties(properties);
return MDMIOSOperationUtil.createInstallAppOperation(app);
} else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) {

@ -33,6 +33,7 @@ public class MDMAppConstants {
public static final String I_TUNES_ID = "iTunesId";
public static final String LABEL = "label";
public static final String PLIST = "plist";
public static final String WEB_CLIP_URL = "webClipURL";
public static final String OPCODE_INSTALL_ENTERPRISE_APPLICATION = "INSTALL_ENTERPRISE_APPLICATION";
public static final String OPCODE_INSTALL_STORE_APPLICATION = "INSTALL_STORE_APPLICATION";
public static final String OPCODE_INSTALL_WEB_APPLICATION = "WEB_CLIP";

@ -73,14 +73,14 @@ public class MDMIOSOperationUtil {
operation.setType(Operation.Type.COMMAND);
operation.setPayLoad(appStoreApplication.toJSON());
break;
case WEBAPP:
case WEB_CLIP:
WebClip webClip = new WebClip();
webClip.setIcon(application.getIconImage());
webClip.setIsRemovable(application.getProperties().
getProperty(MDMAppConstants.IOSConstants.IS_REMOVE_APP));
webClip.setLabel(application.getProperties().
getProperty(MDMAppConstants.IOSConstants.LABEL));
webClip.setURL(application.getLocation());
webClip.setURL(application.getProperties().getProperty(MDMAppConstants.IOSConstants.WEB_CLIP_URL));
operation.setCode(MDMAppConstants.IOSConstants.OPCODE_INSTALL_WEB_APPLICATION);
operation.setType(Operation.Type.PROFILE);

Loading…
Cancel
Save