Repackaging a Fat Static Library as an xcframework
Consider this directory tree from a vendor:
OwningTheLibs/
OwningTheLibs.a
include/
OwningTheLibs/
OwningTheLibs.h
Consider this directory tree from a vendor:
OwningTheLibs/
OwningTheLibs.a
include/
OwningTheLibs/
OwningTheLibs.h
import Foundation | |
/// This class is public, because my library exposes this to the rest of my app. | |
public class ObligatoryNetworkingClient { | |
public enum GetEndpoint { | |
case timeline | |
case profile(userID: String) | |
case directMessages | |
} |
# ______ ______ __ __ | |
# /\___ \ /\ ___\ /\ \_\ \ | |
# \/_/ /__ \ \___ \ \ \ __ \ | |
# /\_____\ \/\_____\ \ \_\ \_\ | |
# \/_____/ \/_____/ \/_/\/_/ | |
# | |
# THE GODDAMN PROMPT | |
# --------------------------------------------------------------- | |
# Looks best with certain fonts, e.g. SFMono, smoothing enabled. |
import Foundation | |
/* | |
Alls you gotta do is (in Main.swift): | |
1. Initialize an Importer with the file URL to the JSON file (origin) and a URL to the directory that will contain all the Jekyll-formatted posts (destination). | |
2. Call the `run()` method on the Importer. | |
*/ |
I recently repurposed a family computer to play a new role: Xcode build server. Setting up the bot wasn't too bad overall, but there was one really big hurdle: getting post-integration email notifications to actually send. Despite the (relative) user-friendliness of the UI, the email notification feature is very unforgiving. It expects to be running on a mac that is hosting (or sitting behind) a domain that's also running it's own SMTP service. A repurposed family computer is not going to have such a setup. Outbound mail is going to either not send at all or else likely get bounced by spam filtering.
I do have a GSuite account for small business stuff. I host my website at Media Temple, but the email service is run by Gmail, with DNS records configured to route mail traffic to Gmail. What I want is for my Xcode bot to send email notifications from one of my GSuite accounts. The following are s
enum MyEnum: Codable { | |
case foo | |
case bar(Int) | |
case baz(label: String) | |
case qux(Bool, label: String, Int) | |
case anotherCase(discriminator: String, anotherCase_1: Int) | |
} | |
// Begin synthesized code... |
/// Quick-n-dirty translation of MWFeedParser's algorithm from Objective-C to Swift | |
/// seealso: https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m | |
public extension NSString { | |
public func byConvertingHTMLToPlainText() -> String { | |
let stopCharacters = CharacterSet(charactersIn: "< \t\n\r\(0x0085)\(0x000C)\(0x2028)\(0x2029)") | |
let newLineAndWhitespaceCharacters = CharacterSet(charactersIn: " \t\n\r\(0x0085)\(0x000C)\(0x2028)\(0x2029)") | |
let tagNameCharacters = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") | |
ACTION = build | |
AD_HOC_CODE_SIGNING_ALLOWED = NO | |
ALTERNATE_GROUP = staff | |
ALTERNATE_MODE = u+w,go-w,a+rX | |
ALTERNATE_OWNER = grantdavis | |
ALWAYS_SEARCH_USER_PATHS = NO | |
ALWAYS_USE_SEPARATE_HEADERMAPS = YES | |
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer | |
APPLE_INTERNAL_DIR = /AppleInternal | |
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation |
// | |
// Warnings.xcconfig | |
// | |
// The list of warnings we (don’t) use, and the reasons why. | |
// | |
// :MARK: Warnings in use: | |
// :MARK: -everything | |
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us. | |
// | |
// :MARK: - Warnings not to be promoted: |
post_install do |installer_representation| | |
installer_representation.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.to_s == 'Beta' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
elsif config.to_s == 'Release' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
end | |
end | |
end |