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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN” "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<dict> | |
<key>SuccessfulExit</key> | |
<false/> | |
</dict> | |
<key>Label</key> |
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
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
killall Dock |
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
// JSON Serializer helper class | |
class Serializer { | |
// Retrieve JSON from Url and tries to parse it | |
static func jsonFromUrl(url: String, completionHandler: (NSDictionary) -> (), errorHandler: (NSError?) -> ()) { | |
let url = NSURL(string: url) | |
let task = NSURLSession.sharedSession().dataTaskWithURL(url!) {(data, response, error) in | |
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
// MARK: - Get properties using reflection | |
extension NSObject { | |
func properties() -> [String: String]{ | |
var results: [String: String] = [:] | |
for child in Mirror(reflecting: self).children { | |
var propertyName = "" |
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
class func executeAfter(delay: TimeInterval, block: @escaping () -> Void){ | |
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + delay, execute: block) | |
} |
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 Foundation | |
extension String { | |
var parseJSON: AnyObject? { | |
let data = self.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false) | |
if let jsonData = data { | |
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
#... | |
alias cpwd="pwd | tr -d '\n' | pbcopy" | |
#... |
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
# insert this at the end of your Podfile | |
post_install do |installer| | |
installer.project.targets.each do |target| | |
target.build_configurations.each do |configuration| | |
target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD)' # it sets 'Valid Architectures' to '$(ARCHS_STANDARD)' to all pods | |
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO' # it sets 'Build Active Architecture Only' to 'NO' | |
end | |
end | |
end |
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
xcodebuild -project YourProject.xcodeproj -scheme YourProjectScheme -destination "OS=10.0,name=iPhone 7" -sdk "iphonesimulator10.0" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c; | |
xcodebuild -project YourProject.xcodeproj -scheme YourProjectSchemeWatchOS -destination "OS=3.0,name=Apple Watch Series 2 - 42mm" -sdk "watchsimulator3.0" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; | |
xcodebuild -project YourProject.xcodeproj -scheme YourProjectSchemeTvOS -destination "OS=10.0,name=Apple TV 1080p" -sdk "appletvsimulator10.0" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c; | |
xcodebuild -project YourProject.xcodeproj -scheme YourProjectSchemeMacOS -destination "arch=x86_64" -sdk "macosx10.12" RUN_TESTS="YES" BUILD_EXAMPLE="NO" |
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
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES |