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/bash | |
####################################################################### | |
# Generates documentation for a target, for example a Swift package, | |
# that supports both iOS and macOS. | |
# | |
# The script is designed to be placed in the root of a Swift package. | |
# Change the paths as needed if your project structure is different. | |
# | |
# In order for DocC to annotate all symbols with the platforms |
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
import SwiftUI | |
extension Calendar { | |
func generateDates( | |
inside interval: DateInterval, | |
matching components: DateComponents | |
) -> [Date] { | |
var dates: [Date] = [] | |
dates.append(interval.start) |
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
#define MSDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead."))) | |
// Sample usage: | |
- (instancetype)initWithObject:(id)object; | |
- (instancetype)init MSDesignatedInitializer(initWithObject:); // <- This even gets auto-complete. | |
// Now calling init on this class would throw a warning. |
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
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
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
# (File moved to https://github.com/ole/Storyboard-Strings-Extraction) |
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
// | |
// ARC Helper | |
// | |
// Version 2.2 | |
// | |
// Created by Nick Lockwood on 05/01/2012. | |
// Copyright 2012 Charcoal Design | |
// | |
// Distributed under the permissive zlib license | |
// Get the latest version from here: |
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
// | |
// NSData+Hex.h | |
// | |
// Based on code by AliSoftware | |
// http://stackoverflow.com/a/7520723/60488 | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSData (Hex) |
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
// | |
// NSURL+PathParameters.h | |
// | |
// Created by Johan Kool on 27/9/2011. | |
// Copyright 2011 Koolistov Pte. Ltd. All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without modification, are | |
// permitted provided that the following conditions are met: | |
// | |
// * Redistributions of source code must retain the above copyright notice, this list of |
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
application: you-app-name-here | |
version: 1 | |
runtime: python | |
api_version: 1 | |
default_expiration: "30d" | |
handlers: | |
- url: /(.*\.(appcache|manifest)) | |
mime_type: text/cache-manifest |