Skip to content

Instantly share code, notes, and snippets.

View jonohayon's full-sized avatar
🦊
שועל קוד

Jonathan Ohayon jonohayon

🦊
שועל קוד
  • Tel Aviv, Israel
View GitHub Profile
@michaelmcguire
michaelmcguire / gist:25ae4d84d9bb139495cf
Created June 29, 2015 19:23
Getting device list in Swift using libimobiledevice
import Foundation
var i: CInt = 0
var device_list: UnsafeMutablePointer<UnsafeMutablePointer<Int8>> = nil
idevice_get_device_list(&device_list, &i)
print("number of devices: \(i)")
let array = Array(UnsafeBufferPointer(start: device_list, count: Int(i)))