Export devices added in Apple's iOS Provision portal

后端 未结 10 1386
予麋鹿
予麋鹿 2020-12-25 14:41

My apple developer is about to expire in 5 days. And after renewal I want to restore my devices count to 100 but meanwhile I want to export all currently added devices as ba

相关标签:
10条回答
  • 2020-12-25 15:16

    Nowaday, Apple doesn't have JQuery anymore. We can use this query to get

    var data = document.querySelectorAll(".infinite-scroll-component .row");
    for(var i = 0 ; i < dencho.length; i++){
      var name =  data[i].childNodes[0];
      var id =  data[i].childNodes[1]
      console.log(name.innerText + "\t" +  id.innerText  + "\n");
    }

    0 讨论(0)
  • 2020-12-25 15:19

    My solution to this was to create new provisioning profile here and add all devices to it. Then download it and open with vim (or any other editor). The file will contain some binary style and plist (xml) with all your devices, which can be parsed I guess, but I just c&p device list. Smth like:

    <key>ProvisionedDevices</key>
       <array>
           <string>device1 udid</string>
           ....
           <string>deviceN udid</string>
       </array>
    

    Delete your provisioning profile if you don't need it after.

    0 讨论(0)
  • 2020-12-25 15:20

    As of September 2019 this snippet that I have created (mixture of T.Nhan's answer above and Apple guidelines of upload format) works out of the box by just saving output in a .txt file and upload:

    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);

    0 讨论(0)
  • 2020-12-25 15:24

    Open list of devices safari, chrome or firefox&firebug. Open web inspector (opt-cmd-i in safari), go to instrument tab (ctrl+3). Press "Start Recording" button and refresh page.

    In the very bottom of the appeared list find "listDevices.action" and select it. In the right column of a web inspector copy & paste full URL and download JSON file with a list of devices. Then, with a simple regexp (i.e. /\"name\": \"([^\"]+)\",\n\s*\"deviceNumber\": \"([^\"]+)\"/ ) you can get devices' name and number.

    Format that Apple accepts for upload is

    Device ID   Device Name
    A123456789012345678901234567890123456789    NAME1
    B123456789012345678901234567890123456789    NAME2
    

    Update:
    Ah! Apple now provides a full deviceNumber on "iOS devices" page, so it makes whole process easier. Copy-paste the list in, for example, Sublime text and put devices' name and number in a proper order:

    find: /^(.*) +([^\n]+)\n/
    replace: \2\t\1\n

    0 讨论(0)
提交回复
热议问题