This file contains hidden or 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
// This playground shows you a few different ways to get device info via IOKit. | |
// If you want to explore IOKit and look for interesting data I would download | |
// the Additional Developer Tools from Apple and use the IORegistryExplorer app. | |
// It makes it super easy to poke around in the IOKit planes. | |
import IOKit | |
import Foundation | |
// For convient access we can make a computed getter for the PlatformExpert. | |
// Traditionally this has been where you go to find all sorts of data about the |
This file contains hidden or 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
// Get crazy and hook MobileGestalt in a Swift Playground! | |
// | |
// If you are a LONG time Mac developer you know that the Gestalt system | |
// used to be a way to get info about your Mac. These days it's a private | |
// thing that Apple locks away and you shouldn't really touch. Most of the info | |
// that you need can probaby be found in IOKit, but some values, like | |
// the provisioningUDID are not avaliable any other way. | |
// | |
// That said, it's a fun exersize to see how to do some various things in Swift. | |
// Things like loading a dylib or calling private C functions. |
This file contains hidden or 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
// | |
// OCXML.swift | |
// Created by Marco Arment on 9/23/24. | |
// | |
// Released into the public domain. Do whatever you'd like with this. | |
// No guarantees that it'll do anything, or do it correctly. Good luck! | |
// | |
import Foundation |
OlderNewer