Skip to content

Commit

Permalink
fix: rework signing options
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Aug 12, 2021
1 parent d0872a6 commit 623d630
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 54 deletions.
36 changes: 22 additions & 14 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,22 @@ import (
)

var formNames = assets.FormNames{
FormFile: "file",
FormFileId: "file_id",
FormProfileId: "profile_id",
FormBuilderId: "builder_id",
FormAppDebug: "all_devices",
FormAllDevices: "app_debug",
FormFileShare: "file_share",
FormToken: "align_app_id",
FormId: "id",
FormIdOriginal: "id_original",
FormIdProv: "id_prov",
FormIdCustom: "id_custom",
FormIdCustomText: "id_custom_text",
FormBundleId: "bundle_id",
FormFile: "file",
FormFileId: "file_id",
FormProfileId: "profile_id",
FormBuilderId: "builder_id",
FormAppDebug: "app_debug",
FormAllDevices: "all_devices",
FormFileShare: "file_share",
FormToken: "token",
FormId: "id",
FormIdOriginal: "id_original",
FormIdProv: "id_prov",
FormIdCustom: "id_custom",
FormIdCustomText: "id_custom_text",
FormIdEncode: "id_encode",
FormIdForceOriginal: "id_force_original",
FormBundleId: "bundle_id",
}

func main() {
Expand Down Expand Up @@ -415,6 +417,12 @@ func uploadUnsignedApp(c echo.Context) error {
if c.FormValue(formNames.FormFileShare) != "" {
signArgs += " -s"
}
if c.FormValue(formNames.FormIdEncode) != "" {
signArgs += " -e"
}
if c.FormValue(formNames.FormIdForceOriginal) != "" {
signArgs += " -o"
}
idType := c.FormValue(formNames.FormId)
userBundleId := c.FormValue(formNames.FormIdCustomText)
if idType == formNames.FormIdProv {
Expand Down
77 changes: 51 additions & 26 deletions src/assets/index.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,8 @@
checked
/>
<label style="display: inline" class="form-check-label" for="formIdOriginal">
Use the app's original bundle ID
Use app's original bundle ID
</label>
<a
style="color: blue"
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="For developer accounts, the original ID will be encoded into
a different but constant ID."
>?</a
>
</div>
<div class="form-check">
<input
Expand All @@ -129,8 +120,8 @@
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Fixes entitlements on explicit provisioning profiles.
For each profile, only one app signed this way can be installed at a time."
title="Fixes entitlements with explicit provisioning profiles.
For each profile, only one app signed this way can be installed at a time."
>?</a
>
</div>
Expand All @@ -143,15 +134,6 @@
value="{{.FormIdCustom}}"
/>
<label style="display: inline" class="form-check-label" for="formIdCustom"> Use custom: </label>
<a
style="color: blue"
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="For developer accounts, the custom ID will be encoded into
a different but constant ID."
>?</a
>
<input
type="text"
class="form-control"
Expand All @@ -166,6 +148,46 @@
</div>
<div class="mb-0">
<label class="form-label">Signing options</label>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="formIdEncode"
name="{{.FormIdEncode}}"
disabled
/>
<label style="display: inline" class="form-check-label" for="formIdEncode">
Encode original IDs to unique IDs
</label>
<a
style="color: blue"
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="If you do not own the original bundle, group, or iCloud IDs, signing will fail.
Use this option to fix that."
>?</a
>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="formIdForceOriginal"
name="{{.FormIdForceOriginal}}"
/>
<label style="display: inline" class="form-check-label" for="formIdForceOriginal">
Force original bundle ID
</label>
<a
style="color: blue"
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Breaks all entitlements. Fixes push notifications on distribution certificate."
>?</a
>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="formAppDebug" name="{{.FormAppDebug}}" />
<label style="display: inline" class="form-check-label" for="formAppDebug">
Expand All @@ -176,9 +198,7 @@
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Enables the get-task-allow entitlement.
Required by some emulators and jailbreaks.
Your provisioning profile must support this entitlement."
title="Only works with development certificate. Required by some emulators and jailbreaks."
>?</a
>
</div>
Expand All @@ -199,14 +219,14 @@
<div class="form-check">
<input class="form-check-input" type="checkbox" id="formFileShare" name="{{.FormFileShare}}" />
<label style="display: inline" class="form-check-label" for="formFileShare">
Force enable file sharing through iTunes
Force enable file sharing
</label>
<a
style="color: blue"
href="#"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Allows you to access the app's data via iTunes and other file managers."
title="Allows you to access the app's data via the Files app, iTunes, and other file managers."
>?</a
>
</div>
Expand Down Expand Up @@ -321,6 +341,7 @@
const formIdProv = document.getElementById("formIdProv");
const formIdCustom = document.getElementById("formIdCustom");
const formIdCustomText = document.getElementById("formIdCustomText");
const formIdEncode = document.getElementById("formIdEncode");
const dropdownResign = document.getElementsByClassName("dropdownResign");
const inputSearchFilter = document.getElementById("inputSearchFilter");
const btnSearchClear = document.getElementById("btnSearchClear");
Expand Down Expand Up @@ -376,8 +397,12 @@
formIdOriginal.checked = true;
}
formIdProv.disabled = true;
formIdEncode.checked = true;
formIdEncode.disabled = false;
} else {
formIdProv.disabled = false;
formIdEncode.checked = false;
formIdEncode.disabled = true;
}
});
document.querySelectorAll('input[name="{{.FormId}}"]').forEach(function (a) {
Expand Down
30 changes: 16 additions & 14 deletions src/assets/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,22 @@ type Builder struct {
}

type FormNames struct {
FormFile string
FormFileId string
FormProfileId string
FormBuilderId string
FormAppDebug string
FormAllDevices string
FormFileShare string
FormToken string
FormId string
FormIdOriginal string
FormIdProv string
FormIdCustom string
FormIdCustomText string
FormBundleId string
FormFile string
FormFileId string
FormProfileId string
FormBuilderId string
FormAppDebug string
FormAllDevices string
FormFileShare string
FormToken string
FormId string
FormIdOriginal string
FormIdProv string
FormIdCustom string
FormIdCustomText string
FormIdEncode string
FormIdForceOriginal string
FormBundleId string
}

type IndexData struct {
Expand Down

0 comments on commit 623d630

Please sign in to comment.