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
# Add this to a "Run Script" build phase in your app's main target, as the last step. | |
# It will use the pluginkit command-line tool to force the plugin system on macOS to add your extensions to its database, making them available. | |
# I made this specifically for widgets, but it should work for pretty much any extension type (appex bundle). | |
find $CODESIGNING_FOLDER_PATH -name '*.appex' -exec pluginkit -a {} \; |
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
extension Array { | |
func inserted(_ element: Element, at index: Int) -> Array<Element> { | |
return updated({$0.insert(element, at: index)}) | |
} | |
func appended(_ element: Element) -> Array<Element> { | |
return updated({$0.append(element)}) | |
} | |
func appended(contentsOf elements: Array<Element>) -> Array<Element> { |
// https://github.com/Zhuinden/fragmentviewbindingdelegate-kt | |
import android.view.View | |
import androidx.fragment.app.Fragment | |
import androidx.lifecycle.DefaultLifecycleObserver | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.LifecycleOwner | |
import androidx.lifecycle.Observer | |
import androidx.viewbinding.ViewBinding | |
import kotlin.properties.ReadOnlyProperty |
import Foundation | |
struct AnyError: Error { | |
let error: Error | |
init(_ error: Error) { | |
self.error = error | |
} | |
} |
const fs = require('fs') | |
const path = require('path') | |
const fse = require('fs-extra') | |
const code = fs.readFileSync('app.code.json', 'utf-8') | |
const obj = JSON.parse(code) | |
Object.entries(obj).forEach(([loc, contents]) => { | |
const absPath = path.resolve('.', 'output', loc) |
#!/bin/bash | |
# --------------------------------------------------------------------------------------------------------- | |
# place as many old macOS SDKs into the directory with this script e.g. if you have | |
# | |
# my-macpro:SDKs natb$ ls -ahl | |
# total 4254792 | |
# drwxr-xr-x 17 natb admin 578B Nov 21 2017 . | |
# drwxrwxr-x 24 root admin 884B Aug 29 06:46 .. | |
# drwxr-xr-x 5 natb admin 170B Oct 17 2017 MacOSX10.10.sdk |
package com.yoavst.psychometric | |
import org.apache.commons.lang3.StringEscapeUtils | |
import java.io.File | |
import java.nio.CharBuffer | |
import javax.crypto.spec.SecretKeySpec | |
import javax.crypto.Cipher | |
/** | |
* Based on https://www.npmjs.com/package/ti_recover |
//: Playground - noun: a place where people can play | |
import UIKit | |
//initialization | |
//value types get defautlt initializers , structs and enums | |
//1- failable and throwing initializers | |
//What happens if we can't initialize an object? This is a common occurrence if initialization depends on external data. Swift gives us two ways to deal with this - failable and throwing initializers. |
SDK_VERSION=$1 | |
SDK_NAME="MacOSX${SDK_VERSION}.sdk" | |
TAR_FILE_NAME="${SDK_NAME}.tar.xz" | |
DOWNLOAD_URL="https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/${TAR_FILE_NAME}" | |
TAR_FILE_DEST="/tmp/${TAR_FILE_NAME}" | |
SDK_MIN_VERSION_FILE="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist" | |
SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/" | |
echo Downloading $SDK_NAME | |
curl -L $DOWNLOAD_URL -o $TAR_FILE_DEST --progress-bar |