This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func loadSourceRoot() throws -> URL { | |
let env = ProcessInfo.processInfo.environment // "DYLD_LIBRARY_PATH": "/Users/marc/Library/Developer/Xcode/DerivedData/App-eyahphpvsfdoezahxmpgdlrnhwxg/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection" | |
guard let dyld = env["DYLD_LIBRARY_PATH"]?.split(separator: ":").first else { // e.g. /Users/marc/Library/Developer/Xcode/DerivedData/App-eyahphpvsfdoezahxmpgdlrnhwxg/Build/Products/Debug-iphonesimulator | |
throw CocoaError(.fileNoSuchFile) | |
} | |
// we have a bunch of potential places to guess here, but this is one of them… | |
let workspaceInfo = URL(fileURLWithPath: "../../../info.plist", isDirectory: false, relativeTo: URL(fileURLWithPath: String(dyld), isDirectory: true)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This example provides a `installSystemCertificates()` function that will | |
/// locate the standard Android certificate directories and assemble all the contents into | |
/// a single cacerts.pem file that can be loaded by libcurl, which enables | |
/// `Foundation.URLSession` to load HTTPS sites. | |
import Foundation | |
#if canImport(FoundationNetworking) | |
import FoundationNetworking | |
#endif | |
#if canImport(Android) | |
import Android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ex | |
# This script should be executed in the root of a Skip project | |
# It will convert the specified image source (typically a PDF) | |
# into all the required icons for the Darwin/ and Android/ versions | |
# | |
# Prerequisite: `brew install imagemagick` | |
# | |
# e.g.: skip.iconconvert.sh Sources/Showcase/Resources/Module.xcassets/skiplogo.imageset/skiplogo.pdf | |
which magick &> /dev/null || (echo "$(basename $0): error: magick command not found (install imagemagick)"; exit 1) |
OlderNewer