From d92c89048ab686b990124fce813f56a9c98891f5 Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Fri, 28 Oct 2016 01:59:34 +0530 Subject: [PATCH] EMM-1783:Fix for enterprise and public ios app installation & uninstallation --- .../mdmmgt/util/IOSApplicationOperationUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/extensions/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java b/components/extensions/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java index 3167ed8d3..5b2dec4eb 100644 --- a/components/extensions/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java +++ b/components/extensions/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java @@ -68,8 +68,8 @@ public class IOSApplicationOperationUtil { appStoreApplication.setPreventBackupOfAppData((Boolean) application.getProperties(). get(MDMAppConstants.IOSConstants.IS_PREVENT_BACKUP)); appStoreApplication.setBundleId(application.getId()); - appStoreApplication.setiTunesStoreID((Integer) application.getProperties(). - get(MDMAppConstants.IOSConstants.I_TUNES_ID)); + appStoreApplication.setiTunesStoreID(Integer.parseInt((String)application.getProperties(). + get(MDMAppConstants.IOSConstants.I_TUNES_ID))); operation.setCode(MDMAppConstants.IOSConstants.OPCODE_INSTALL_STORE_APPLICATION); operation.setType(Operation.Type.COMMAND); operation.setPayLoad(appStoreApplication.toJSON()); @@ -106,7 +106,7 @@ public class IOSApplicationOperationUtil { operation.setCode(MDMAppConstants.IOSConstants.OPCODE_REMOVE_APPLICATION); operation.setType(Operation.Type.PROFILE); RemoveApplication removeApplication = new RemoveApplication(); - removeApplication.setBundleId(application.getIdentifier()); + removeApplication.setBundleId(application.getPackageName()); operation.setPayLoad(removeApplication.toJSON()); return operation; }