Irf*_*ISH 14 iphone iphone-developer-program
我的苹果开发者即将在5天后到期.续订后,我希望将我的设备数量恢复到100,但同时我想将所有当前添加的设备导出为备份供将来使用,这些是87台设备.
在新的苹果开发者部分,我没有看到任何导出所有设备的选项,我不想复制粘贴所有87个设备:(
注意:我想以Apple要求的格式导出多个设备插入的设备.
aro*_*oth 31
如果您正在寻找一个不需要额外软件,录音或摆弄正则表达式的选项,这里有一个JavaScript代码片段,您可以在Chrome(或我认为,任何其他浏览器的)JavaScript控制台中运行以获得正确的答案格式化的设备列表:
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);
Run Code Online (Sandbox Code Playgroud)
完整导出将记录到控制台,此时您只需将其复制/粘贴到空文本文档中,然后可以随时将其重新导入Apple.
这与Apple目前的开发者网站布局一致,截止到2015年4月.显然,如果他们改变了东西,它可能会破裂.
Bur*_*kcu 15
截至 2021 年 3 月,我创建的这个片段(上面T.Nhan的回答和 Apple 上传格式指南的混合)开箱即用,只需将输出保存在 .txt 文件中并上传:
var data = document.querySelectorAll(".infinite-scroll-component .row");
var deviceListString = "Device ID\tDevice Name\tDevice Platform\n"
for (var i = 1; i < data.length; i++) {
deviceListString += (data[i].childNodes[1].innerText + "\t" + data[i].childNodes[0].innerText + "\t" + (data[i].childNodes[2].innerText == "iPhone" || data[i].childNodes[2].innerText == "iPad" || data[i].childNodes[2].innerText == "Apple Watch" ? "ios" : "mac") + "\n");
}
console.log(deviceListString);Run Code Online (Sandbox Code Playgroud)
打开设备列表 safari,chrome或firefox&firebug.打开Web检查器(safari中的opt-cmd-i),进入仪器选项卡(ctrl + 3).按"开始录制"按钮并刷新页面.
在出现的列表的最底部找到"listDevices.action"并选择它.在Web检查器的右列中,复制并粘贴完整URL并下载带有设备列表的JSON文件.然后,用一个简单的正则表达式(即/ \"name \":\"([^ \"] +)\",\n\s*\"deviceNumber \":\"([^ \"] +)\ "/)您可以获取设备的名称和编号.
Apple接受上传的格式是
Device ID Device Name
A123456789012345678901234567890123456789 NAME1
B123456789012345678901234567890123456789 NAME2
Run Code Online (Sandbox Code Playgroud)
更新:
啊!Apple现在在"iOS设备"页面上提供了完整的deviceNumber,因此它使整个过程更容易.复制粘贴列表,例如,Sublime文本,并按正确顺序放置设备的名称和编号:
find:/^(.*)+([^ \n] +)\n/
replace:\ 2\t\1 \n
自最新回复以来,网页结构似乎已进行了一些编辑。我的新代码片段还将输出格式化为 CSV,因此您可以保存输出并使用 Numbers/Excel 打开它并共享。
var data = document.querySelectorAll(".infinite-scroll-component .row");
var csvOutput = "Name, Identifier, Type\n"
for (var i = 1; i < data.length; i++) {
let name = data[i].childNodes[0].childNodes[0].textContent;
let identifier = data[i].childNodes[1].childNodes[0].textContent;
let type = data[i].childNodes[2].childNodes[0].textContent;
let device = [name, identifier, type].join(", ") + "\n";
csvOutput += device;
}
console.log(csvOutput);Run Code Online (Sandbox Code Playgroud)
以上都不适合我,很可能是因为 Apple 更改了格式。但真正有效的是以下内容:
小智 5
You can use a command tool call Spaceship, it exposes both the Apple Developer Center and the iTunes Connect API
Here is how I did to migrate all my devices from my Apple Developer account to a second one.
spaceship1 = Spaceship::Launcher.new("account1@email.com", "password")
spaceship2 = Spaceship::Launcher.new("account2@email.com", "password")
#Get all devices from the Apple Developer account 1.
devices = spaceship1.device.all
#Loop through all devices from account 1 and then add/create them in account2.
devices.each do |device| spaceship2.device.create!(name: device.name, udid: device.udid) end
Run Code Online (Sandbox Code Playgroud)
注意:要在您的终端中快速使用飞船发射irb并执行,需要使用“飞船”。
| 归档时间: |
|
| 查看次数: |
7354 次 |
| 最近记录: |