Last active
November 15, 2016 11:51
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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