Merge branch 'master' into 'master'

Fix web clips installation not working for iOS

See merge request entgra/carbon-device-mgt!380
feature/appm-store/pbac
Dharmakeerthi Lasantha 5 years ago
commit 701ebb0db7

@ -973,10 +973,14 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
.getUuid(); .getUuid();
app.setType(mobileAppType); app.setType(mobileAppType);
app.setLocation(plistDownloadEndpoint); app.setLocation(plistDownloadEndpoint);
app.setIconImage(application.getApplicationReleases().get(0).getIconPath());
Properties properties = new Properties(); Properties properties = new Properties();
properties.put(MDMAppConstants.IOSConstants.IS_PREVENT_BACKUP, true); properties.put(MDMAppConstants.IOSConstants.IS_PREVENT_BACKUP, true);
properties.put(MDMAppConstants.IOSConstants.IS_REMOVE_APP, true); properties.put(MDMAppConstants.IOSConstants.IS_REMOVE_APP, true);
properties.put(MDMAppConstants.IOSConstants.I_TUNES_ID, application.getPackageName()); 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); app.setProperties(properties);
return MDMIOSOperationUtil.createInstallAppOperation(app); return MDMIOSOperationUtil.createInstallAppOperation(app);
} else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) { } 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 I_TUNES_ID = "iTunesId";
public static final String LABEL = "label"; public static final String LABEL = "label";
public static final String PLIST = "plist"; 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_ENTERPRISE_APPLICATION = "INSTALL_ENTERPRISE_APPLICATION";
public static final String OPCODE_INSTALL_STORE_APPLICATION = "INSTALL_STORE_APPLICATION"; public static final String OPCODE_INSTALL_STORE_APPLICATION = "INSTALL_STORE_APPLICATION";
public static final String OPCODE_INSTALL_WEB_APPLICATION = "WEB_CLIP"; public static final String OPCODE_INSTALL_WEB_APPLICATION = "WEB_CLIP";

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

Loading…
Cancel
Save