For faster connection speed and more flexibility.
- Start Xcode in command line by running this in commandline
/Applications/Xcode.app/Contents/MacOS/Xcode - Start downloading of the simulator
- Cancel it. YES CANCEL IT!
- You will get a message like this:
| import Foundation | |
| /// | |
| /// A file reader class. | |
| /// | |
| /// - Note: Here we will decode JSON data from a static file contaning Movies. | |
| /// | |
| final class FileReader { |
For faster connection speed and more flexibility.
/Applications/Xcode.app/Contents/MacOS/Xcode| import Foundation | |
| import WebKit | |
| final class WebCacheCleaner { | |
| class func clean() { | |
| HTTPCookieStorage.shared.removeCookies(since: Date.distantPast) | |
| print("[WebCacheCleaner] All cookies deleted") | |
| WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in |
| platform :ios, '9.0' | |
| use_frameworks! | |
| $rxVersion = '~> 2.2.0' | |
| target 'MyProject' do | |
| pod 'RxSwift', $rxVersion | |
| pod 'RxCocoa', $rxVersion | |
| end |
| func takeScreenshot(view: UIView) -> UIImageView { | |
| UIGraphicsBeginImageContext(view.frame.size) | |
| view.layer.renderInContext(UIGraphicsGetCurrentContext()) | |
| let image = UIGraphicsGetImageFromCurrentImageContext() | |
| UIGraphicsEndImageContext() | |
| UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) | |
| return UIImageView(image: image) | |
| } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| ACTION | |
| AD_HOC_CODE_SIGNING_ALLOWED | |
| ALTERNATE_GROUP | |
| ALTERNATE_MODE | |
| ALTERNATE_OWNER | |
| ALWAYS_SEARCH_USER_PATHS | |
| ALWAYS_USE_SEPARATE_HEADERMAPS | |
| APPLE_INTERNAL_DEVELOPER_DIR | |
| APPLE_INTERNAL_DIR | |
| APPLE_INTERNAL_DOCUMENTATION_DIR |
| #!/bin/sh | |
| # This script automatically sets the version and short version string of an | |
| # Xcode project from the Git repository containing the project. | |
| # | |
| # To use this script in Xcode 4, add the contents to a "Run Script" build | |
| # phase for your application target. | |
| set -o errexit | |
| set -o nounset |
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |