Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
// | |
// 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 |
addmedia | |
addphoto | |
addvideo | |
appinfo | |
boot | |
bootstatus | |
clone | |
create | |
darwinup | |
delete |
#!/bin/zsh | |
# The right time | |
xcrun simctl status_bar booted override --time 09:41 | |
# WiFi & Cellular network | |
xcrun simctl status_bar booted override --dataNetwork wifi | |
xcrun simctl status_bar booted override --wifiBars 3 | |
xcrun simctl status_bar booted override --cellularBars 4 | |
# 100% battery level | |
xcrun simctl status_bar booted override --batteryLevel 100 |
At WWDC 2019 Apple released some videos directly online, with no corresponding live session. This is a list of those videos with links to the video pages.
Some sessions were presented during WWDC but then split into multiple videos when posted online. This list includes the online versions, since they don't appear in the WWDC schedule. For example WWDC included session 711, "Introducing Combine and Advances in Foundation". This was split into two online videos-- 722, "Introducing Combine", and 723, "Advances in Foundation". Both 722 and 723 are included here.
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
// | |
// LoggingPrint.swift | |
// | |
import Foundation | |
/** | |
Prints the filename, function name, line number and textual representation of `object` and a newline character into | |
the standard output if the build setting for "Active Complilation Conditions" (SWIFT_ACTIVE_COMPILATION_CONDITIONS) defines `DEBUG`. |
@implementation NSURLRequest (printCurlRequest) | |
-(NSString *)curlRequest | |
{ | |
__block NSString *curlstr = [NSString stringWithFormat:@"curl -k -X %@ --dump-header -",self.HTTPMethod]; | |
[[self allHTTPHeaderFields] enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { | |
curlstr = [curlstr stringByAppendingFormat:@" -H \"%@: %@\"",key, obj]; | |
}]; | |