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
#!/usr/bin/env bash | |
set -e | |
set -x | |
# get release number from Xcode build settings | |
version=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $BITRISE_SOURCE_DIR/FieldaFreedom.xcodeproj/project.pbxproj) | |
if [ -z "${version}" ]; then | |
echo "[ERROR] failed to get MARKETING_VERSION" | |
exit 1 |
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 | |
class Vehicle { | |
var model: String | |
var make: Int | |
init(model: String, make: Int) { | |
self.model = model | |
self.make = make | |
} |
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 | |
class Vehicle { | |
var model: String | |
var make: Int | |
init(model: String, make: Int) { | |
self.model = model | |
self.make = make | |
} |
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 | |
class Vehicle { | |
var model: String | |
var make: Int | |
init(model: String, make: Int) { | |
self.model = model | |
self.make = make | |
} |
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 | |
class Vehicle { | |
var model: String | |
var make: Int | |
init(model: String, make: Int) { | |
self.model = model | |
self.make = make | |
} |
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 | |
class Vehicle { | |
var model: String | |
var make: Int | |
init(model: String, make: Int) { | |
self.model = model | |
self.make = make | |
} |
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 | |
// MARK: - Sequences | |
struct ConstantIterator: IteratorProtocol { | |
typealias Element = Int | |
mutating func next() -> Element? { | |
return 1 | |
} | |
} |
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
post_install do |installer| | |
print "Setting the default SWIFT_VERSION to 4.0\n" | |
installer.pods_project.build_configurations.each do |config| | |
config.build_settings['SWIFT_VERSION'] = '4.0' | |
end | |
installer.pods_project.targets.each do |target| | |
if ['SomeTarget-iOS', 'SomeTarget-watchOS'].include? "#{target}" | |
print "Setting #{target}'s SWIFT_VERSION to 3.0\n" | |
target.build_configurations.each do |config| |
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 | |
import RxSwift | |
protocol EditTimeEntryType { | |
var projectIds: Variable<[String]?> { get } | |
var projectsNames: Observable<String?> { get } | |
var isValid: Observable<Bool> { get } | |
var realmService: RealmProjectsServiceProtocol { get } | |
var interval: Variable<DateInterval> { get } | |
var type: EditTimeEntryViewModel.ScreenType { get } |
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
protocol VendorType { | |
func process(order: Order, success: () -> Void, failure: () -> Void) | |
} | |
class Administrator: VendorType { | |
func process(order: Order, success: () -> Void, failure: () -> Void) { /* process order */ } | |
} | |
class Seller: VendorType { | |
func process(order: Order, success: () -> Void, failure: () -> Void) { /* process order */ } | |
} |
NewerOlder