Skip to content

Instantly share code, notes, and snippets.

View MapaX's full-sized avatar

MapaX MapaX

View GitHub Profile
@MapaX
MapaX / Package.swift
Created May 4, 2021 13:14
Package description for swiftpm version of Google ML Vision
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "MLKitVisionPackage",
platforms: [
.iOS(.v10),
],
products: [
.library(
@MapaX
MapaX / MakeXCFramework.swift
Last active April 28, 2021 12:45
Swift command line tool to make any .framework to .xcframework which works then in Apple Silicon M1 mac. The script is used with command "MakeXCFramework.swift myFramework.framework"
#!/usr/bin/env swift
import Foundation
func shell(_ command: String) -> String {
print("Running command: \(command)")
let task = Process()
let pipe = Pipe()
task.standardOutput = pipe
task.standardError = pipe
@MapaX
MapaX / makeXCFamework.sh
Created April 26, 2021 10:45
Shell script to create xcframeworks from MLKit frameworks
#!/bin/zsh
makeXCFramework () {
BASEDIR=$(pwd)
echo "Script location: ${BASEDIR}"
LIBNAME=$(basename $BASEDIR)
echo "lib is: $LIBNAME"
cd Frameworks