Since monterey update does not allow us to use Xcode previous than 13, let's show how to "install previous SDKs"
Swift toolchains, from https://swift.org/download/
Previous Xcode.xip, from the https://developer.apple.com
Since monterey update does not allow us to use Xcode previous than 13, let's show how to "install previous SDKs"
Swift toolchains, from https://swift.org/download/
Previous Xcode.xip, from the https://developer.apple.com
| #!/bin/bash | |
| # This script downlaods and builds the iOS and Mac openSSL libraries with Bitcode enabled | |
| # Credits: | |
| # https://github.com/st3fan/ios-openssl | |
| # https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
| # Peter Steinberger, PSPDFKit GmbH, @steipete. | |
| set -e |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Bucket | |
| type = "2" | |
| version = "2.0"> | |
| <Breakpoints> | |
| <!-- All Exceptions --> | |
| <BreakpointProxy | |
| BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
| <BreakpointContent |
| // lmutracker.mm -- Provides lux measurement using MacBook Ambient Light Sensor | |
| // | |
| // clang -o lmutracker lmutracker.mm -framework IOKit -framework CoreFoundation | |
| // | |
| // Adaptation of code originally posted at https://bugzilla.mozilla.org/show_bug.cgi?id=793728 | |
| // by Reuben Morais. Modified by Ken Keiter <ken@kenkeiter.com> to output a single *lux* value | |
| // and exit, rather than repeating measurements on the sensor's arbitrary scale. | |
| #include <mach/mach.h> | |
| #include <math.h> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.xcode_ramdisk.agent</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>xcode_ramdisk.sh</string> | |
| <string>start</string> |
| Now and then I need to manually symbolicate an Xcode crash report. Xcode can often do this, but not always. Here are steps that are specifically for a Watch Extension, but can be easily applied to just about anything. | |
| You need the Watch Extension's dSYM from the archive created when you submitted the app. The general form: | |
| $ symbolicatecrash report.crash app.dSYM | |
| or more specifically, for a WatchKit Extension: | |
| $ export DEVELOPER_DIR=`xcode-select --print-path` | |
| $ /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash ~/Desktop/CrashLog1.crash ~/Desktop/yourApp.xcarchive/dSYMs/yourApp\ WatchKit\ Extension.appex.dSYM > ~/Desktop/CrashLog1Symbolicated.crash | |
| #import path | |
| export PATH=${PATH}:/usr/local/bin | |
| #import what we have in bash_profile | |
| source ~/.bash_profile | |
| #check for oclint | |
| hash oclint &> /dev/null | |
| if [ $? -eq 1 ]; then | |
| echo >&2 "oclint not found, analyzing stopped" | |
| exit 1 | |
| fi |
| #!/usr/bin/env ruby -w | |
| class String | |
| def starts_with?(prefix) | |
| prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix | |
| end | |
| end | |
| HEADER_REGEX = /^#import\s+["<](.*)[">]/ |
| // | |
| // DynamicMethodTest.m | |
| // OCMockito | |
| // | |
| // Created by Richard Bergoin on 20/03/14. | |
| // Copyright (c) 2014 Jonathan M. Reid. All rights reserved. | |
| // | |
| #define MOCKITO_SHORTHAND | |
| #import "OCMockito.h" |
| // http://www.olark.com/spw/2011/08/you-can-list-a-directory-with-8-million-files-but-not-with-ls/ | |
| #define _GNU_SOURCE | |
| #include <dirent.h> /* Defines DT_* constants */ | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <sys/stat.h> | |
| #include <sys/syscall.h> |