且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apple的iOS配置门户中添加了导出设备

更新时间:2023-01-04 09:51:55

如果您正在寻找一个不需要额外软件,录音或摆弄正则表达式的选项,这里有一个可以在Chrome中运行的JavaScript代码段(或者我认为,任何其他浏览器)用于获取格式正确的设备列表的JavaScript控制台:

If you're looking for an option that doesn't require additional software, recordings, or fiddling with regular expressions, here's a JavaScript snippet you can run in Chrome's (or I'd assume, any other browser's) JavaScript console to get a properly-formatted device list:

var ids = ["Device ID"];
var names = ["Device Name"];
$("td[aria-describedby=grid-table_name]").each(function(){
    names.push($(this).html());
});
$("td[aria-describedby=grid-table_deviceNumber]").each(function(){
    ids.push($(this).html());
});

var output = "";
for (var index = 0; index < ids.length; index++) {
    //output += names[index] + "\t" + ids[index] + "\n";    //original
    output += ids[index] + "\t" + names[index] + "\n";      //post September 2016
}
console.log(output);

完整导出将记录到控制台,此时您只需将其复制/粘贴到一个空的文本文档,然后可以随时重新导入Apple。

The complete export will be logged to the console, at which point you can simply copy/paste it into an empty text document, which can then be re-imported back to Apple at any time.

这适用于Apple当前的开发者网站布局,截至2015年4月。显然它如果改变了东西可能会破裂。

This works with Apple's current developer site layout, as of April 2015. Obviously it may break if they change stuff.