alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <mach-o/dyld.h> | |
| #include <mach-o/nlist.h> | |
| #include <mach-o/dyld_images.h> | |
| #include <mach/mach_vm.h> | |
| /* Dyld is the OSX Dynamic Linker | |
| * /usr/include//mach-o/loader.h |
| # 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) |
Xcode loads xcspec files (ascii plists) that specify everything (tools, buildphases, compilers, rules, etc) based on a set of conditions.
To evaluate these conditions you have to load these files and simulate the build process and construct your own "environment"
The target's build settings will help to resolve most of the environment variables by taking the basics from the
particular platform you are using for the target (resolved from the SDKROOT value xcrun --show-sdk-platform-path --sdk)
when you load the spec of the compiler there is a key on it called "Options" which is an array of dictionaries that have
| Add this to the Info.plist: | |
| <key>NSAppTransportSecurity</key> | |
| <dict> | |
| <key>NSAllowsArbitraryLoads</key> | |
| <true/> | |
| </dict> |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
| struct Regex { | |
| let pattern: String | |
| let options: NSRegularExpressionOptions! | |
| private var matcher: NSRegularExpression { | |
| return NSRegularExpression(pattern: self.pattern, options: self.options, error: nil) | |
| } | |
| init(pattern: String, options: NSRegularExpressionOptions = nil) { | |
| self.pattern = pattern |
| import Darwin | |
| extension Int { | |
| static func random() -> Int { | |
| return Int(arc4random()) | |
| } | |
| static func random(range: Range<Int>) -> Int { | |
| return Int(arc4random_uniform(UInt32(range.endIndex - range.startIndex))) + range.startIndex | |
| } |
| > $PROJECT_DIR/merge.swift; find $PROJECT_DIR/ -iname *.swift -not -name merge.swift -exec cat {} >> $PROJECT_DIR/merge.swift \; |