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 | |
function usage { | |
echo "Usage: $0 -c [CodeSign Directory] -p [Xcode Project File.xcodeproj]" | |
echo "If any arguments are not specified, defaults will be attempted. If defaults don't exist, script will exit." | |
echo "OPTIONS:" | |
echo " -c [CodeSign Directory]: Location of directory containing project's provisioning profiles." | |
echo " -p [Xcode Project File]: Path of Xcode project directory (the .xcodeproj, not .pbxproj)" | |
echo " -b: Use PlistBuddy command for UUID replacement instead of sed. (Better handling of a couple of edge cases, but makes diffs impossible to read.)" | |
echo " -v: Verbose logging." |
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
var fetchedResultsProcessingOperations: [NSBlockOperation] = [] | |
private func addFetchedResultsProcessingBlock(processingBlock:(Void)->Void) { | |
fetchedResultsProcessingOperations.append(NSBlockOperation(block: processingBlock)) | |
} | |
func controller(controller: NSFetchedResultsController, didChangeObject anObject: AnyObject, atIndexPath indexPath: NSIndexPath?, forChangeType type: NSFetchedResultsChangeType, newIndexPath: NSIndexPath?) { | |
switch type { | |
case .Insert: |
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
The MIT License (MIT) | |
Copyright (c) 2016 Fueled | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 CoreData | |
import Foundation | |
/// Safely copies the specified `NSPersistentStore` to a temporary file. | |
/// Useful for backups. | |
/// | |
/// - Parameter index: The index of the persistent store in the coordinator's | |
/// `persistentStores` array. Passing an index that doesn't exist will trap. | |
/// | |
/// - Returns: The URL of the backup file, wrapped in a TemporaryFile instance |
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
In console: | |
git config credential.helper | |
You will see: osxkeychain | |
git config credential.helper sourcetree | |
Then if you perform git config credential.helper again | |
You will see: sourcetree |
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 | |
class MyModel: ObservableObject { | |
@Published var attempted: Bool = false | |
@Published var firstname: String = "" { | |
didSet { updateDismissability() } | |
} | |
@Published var lastname: String = "" { |
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 UIKit | |
import SwiftUI | |
// SwiftUI | |
struct SomeView: View { | |
var body: some View { | |
Text("Hello World!") | |
} | |
} |