GCC_PREPROCESSOR_DEFINITIONS = FOO=My Value
It is particularly important to check that the definition of your value exists here, as it will not cause a compilation failure, but instead result in the generation of @"FOO".
@import Foundation;| # Does this branch contain my fix? | |
| git merge-base --is-ancestor <maybe_ancestor> <descendant> && echo "Yes" || echo "No" | 
| # Xcode does not offer a way to fully remove all cached Package manifest data from | |
| # macOS. This script takes care of it for you. | |
| # | |
| # Important: SPM implicitly relies on the `org.swift.swiftpm` Swift package | |
| # to manage a local database of resolved package manifest files. That database | |
| # will happily cache your resolved manifest to character-level accuracy. To | |
| # clear out the resolved package manifest, there is only one known solution: | |
| # nuking and paving that database. Running the following command (standard | |
| # user permissions works fine) will nuke the database: | 
| 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 | |
| } | 
| 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 |