Skip to content

Commit 0a93345

Browse files
committed
Support for provision profile
1 parent fc49567 commit 0a93345

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/main/java/io/github/fvarrui/javapackager/model/MacConfig.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class MacConfig implements Serializable {
3333
private String appId;
3434
private String developerId = "-";
3535
private File entitlements;
36+
private File provisionProfile;
3637
private boolean codesignApp = true;
3738
private InfoPlist infoPlist = new InfoPlist();
3839
private boolean hardenedCodesign = true;
@@ -190,6 +191,14 @@ public void setDeveloperId(String developerId) {
190191
this.developerId = developerId;
191192
}
192193

194+
public File getProvisionProfile() {
195+
return provisionProfile;
196+
}
197+
198+
public void setProvisionProfile(File provisionProfile) {
199+
this.provisionProfile = provisionProfile;
200+
}
201+
193202
public File getEntitlements() {
194203
return entitlements;
195204
}

src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ public File doCreateApp() throws Exception {
138138
XMLUtils.prettify(infoPlistFile);
139139
Logger.info("Info.plist file created in " + infoPlistFile.getAbsolutePath());
140140

141+
// copy provisionprofile
142+
if(macConfig.getProvisionProfile() != null) {
143+
// file name must be 'embedded.provisionprofile'
144+
FileUtils.copyFileToFile(macConfig.getProvisionProfile(), new File(contentsFolder, "embedded.provisionprofile"));
145+
}
146+
141147
// codesigns app folder
142148
if (!Platform.mac.isCurrentPlatform()) {
143149
Logger.warn("Generated app could not be signed due to current platform is " + Platform.getCurrentPlatform());

0 commit comments

Comments
 (0)