Skip to content

Commit e232240

Browse files
committed
[TestFlight] 支持自定义storefrontId
1 parent c4b66cf commit e232240

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

script/boxjs.json

+8
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@
545545
"tf_loop_count",
546546
"tf_session_info",
547547
"tf_joined_app_id",
548+
"tf_storefront_id",
548549
"tf_invalid_app_id",
549550
"tf_check_account_id",
550551
"tf_join_concurrency",
@@ -645,6 +646,13 @@
645646
"placeholder": "",
646647
"autoGrow": true,
647648
"desc": "选择一个账号专门用于检测TF是否可以加入,以保护主号"
649+
},
650+
{
651+
"id": "tf_storefront_id",
652+
"name": "自定义storefrontId",
653+
"val": "143441-19,29",
654+
"type": "input",
655+
"desc": "自定义storefrontId,以解决国区账号TestFlight下载App受限问题"
648656
}
649657
],
650658
"icons": [

script/testflight/testflight.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const tfSessionInfoKey = "tf_session_info";
66
const tfCheckSessionTimeKey = "tf_check_session_time";
77
const tfCheckSessionTimeDiffKey = "tf_check_session_time_diff";
88
const tfAppUseAccountIdKey = "tf_app_use_account_id";
9+
const tfStorefrontId = "tf_storefront_id";
910
const getSessionRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/(\w{8}-\w{4}-\w{4}-\w{4}-\w{12})\/apps$/;
1011
const getFullAppIdRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/ru\/([a-zA-Z0-9]{8})$/;
1112
const modifyTFRequest = /^https:\/\/testflight\.apple\.com\/v\d\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/apps\/\d+/
@@ -79,7 +80,7 @@ function modifyRequest() {
7980
}
8081
}
8182
if (/\/install$/.test($.request.url) && Object.keys(body).length > 0) {
82-
body.storefrontId = "143441-19,29";
83+
body.storefrontId = $.data.read(tfStorefrontId, "143441-19,29");
8384
}
8485
return [url, headers, JSON.stringify(body)];
8586
}

0 commit comments

Comments
 (0)