diff --git a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.form b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.form
index 67e6d182e..c0910fec6 100755
--- a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.form
+++ b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.form
@@ -100,7 +100,7 @@
-
+
diff --git a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java
index cf8774323..e6ae51750 100755
--- a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java
+++ b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java
@@ -71,6 +71,7 @@ public class RoboVmIOSRunConfigurationSettingsEditor extends SettingsEditor targetDeviceUDID;
+ private JPanel errorsPanel;
private JTextPane errors;
// copy of data that is time consuming to fetch (fetched only once when dialog is created)
@@ -88,9 +89,9 @@ public class RoboVmIOSRunConfigurationSettingsEditor extends SettingsEditor provisioningProfileErrors = new ArrayList<>();
- private ArrayList signingIdentityErrors = new ArrayList<>();
- private ArrayList deviceIdentityErrors = new ArrayList<>();
+ private final ArrayList provisioningProfileErrors = new ArrayList<>();
+ private final ArrayList signingIdentityErrors = new ArrayList<>();
+ private final ArrayList deviceIdentityErrors = new ArrayList<>();
private IDevice.EventListener ideviceListener;
@NotNull
@@ -466,6 +467,7 @@ private void updatePairedWatch(boolean moduleChanged, Boolean valueToSet) {
private void updateErrors() {
if (provisioningProfileErrors.isEmpty() && signingIdentityErrors.isEmpty() && deviceIdentityErrors.isEmpty()) {
errors.setText("");
+ errorsPanel.setVisible(false);
return;
};
@@ -495,7 +497,7 @@ private void updateErrors() {
buffer.append("\n");
}
errors.setText(buffer.toString());
-
+ errorsPanel.setVisible(true);
}
private void checkSelectedProvisioningProfile () {
@@ -629,17 +631,23 @@ private boolean isProvisioningProfileValid (ProvisioningProfile profile, Config
provisioningProfileErrors.clear();
}
- String appIdPrefix = profile.getAppIdPrefix();
- String appId = profile.getAppId();
- String appIdNoPrefix = appId.split(appIdPrefix + ".")[1];
+ String bundleId = bundleLabel.getText();
+ String candidateAppId = profile.getAppIdPrefix() + "." + bundleId;
+ String profileAppId = profile.getAppId();
- boolean currentlyCompatible = true;
+ // check the id
+ boolean currentlyCompatible = profileAppId.equalsIgnoreCase(candidateAppId);
+ if (!currentlyCompatible){
+ // check for wildcard
+ if (profileAppId.endsWith(".*")) {
+ currentlyCompatible = candidateAppId.startsWith(profileAppId.substring(0, profileAppId.length() - 1));
+ }
+ }
- //Check the id
- if (!bundleLabel.getText().equalsIgnoreCase(appIdNoPrefix)) {
- currentlyCompatible = false;
+ if (!currentlyCompatible) {
if (createErrorStrings) {
- provisioningProfileErrors.add("Bundle ID from profile=[" + appIdNoPrefix + "] does not match module Bundle ID [" + bundleLabel.getText() + "]");
+ String profileAppIdNoPrefix = profileAppId.substring(profile.getAppIdPrefix() .length() + 1);
+ provisioningProfileErrors.add("Bundle ID from profile=[" + profileAppIdNoPrefix + "] does not match module Bundle ID [" + bundleId + "]");
}
}