Skip to content

Instantly share code, notes, and snippets.

@Sephiroth87
Last active November 15, 2016 11:51
Show Gist options
  • Save Sephiroth87/cbb388f1d94c3a7f6e509321d45f98f2 to your computer and use it in GitHub Desktop.
Save Sephiroth87/cbb388f1d94c3a7f6e509321d45f98f2 to your computer and use it in GitHub Desktop.
Quick script to copy missing DeviceSupport files from beta Xcode to keep using iOS beta devices with regular Xcode
#!/usr/bin/swift
import Foundation
do {
let mainPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/"
let betaPath = "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/"
try FileManager.default.contentsOfDirectory(atPath: betaPath).forEach {
if !FileManager.default.fileExists(atPath: mainPath + $0) {
print(betaPath + $0)
try FileManager.default.copyItem(atPath: betaPath + $0, toPath: mainPath + $0)
}
}
} catch {
print(error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment