This file contains hidden or 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
| desc "Sync appstore certificates via match (readonly)" | |
| lane :certificates_appstore do | |
| match(app_identifier: ["deda9.Bitrise-Example"], type: "appstore", readonly: true) | |
| end |
This file contains hidden or 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
| desc "Deploy a new version to the App Store" | |
| lane :release do | |
| cocoapods | |
| certificates_appstore | |
| gym(scheme: "Bitrise-Example") | |
| deliver(skip_screenshots: true, force: true) | |
| end |
This file contains hidden or 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
| desc "Submit a new Testing Build pointing to staging to Apple TestFlight" | |
| lane :testflight do | |
| certificates_appstore | |
| gym(scheme: "Bitrise-Example") | |
| upload_to_testflight( | |
| skip_submission: true, | |
| notify_external_testers: false, | |
| skip_waiting_for_build_processing: true | |
| ) | |
| end |
This file contains hidden or 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
| indirect enum LinkedList<T> { | |
| case value(element: T, next: LinkedList<T>) | |
| case end | |
| } | |
| extension LinkedList: Sequence { | |
| func makeIterator() -> LinkedListIterator<T> { | |
| return LinkedListIterator(current: self) | |
| } | |
| } |
This file contains hidden or 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
| let multiply: (Int, Int) -> Int = { $0 * $1 } | |
| let divide: (Int, Int) -> Int = { $0 / $1 } | |
| let minus: (Int, Int) -> Int = { $0 - $1 } | |
| minus(multiply(divide(10,2), 2), 1) |
This file contains hidden or 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
| typealias RequestChainable<T: Codable> = (request: URLRequestBuilder, model: T.Type) | |
| extension NetworkService { | |
| func chain<T, U>(_ r: RequestChainable<T>, _ r2: RequestChainable<U>, completion: @escaping (Result<(T?, U?)>) -> Void) { | |
| self.execute(r.request, model: r.model) { res in | |
| switch res { | |
| case .success(let value): completion(Result.success((value, nil))) | |
| case .failure: | |
| self.execute(r2.request, model: r2.model, completion: { result in |
This file contains hidden or 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
| func createRxObservable() { | |
| let source: Observable<Int> = Observable<Int>.timer(3, scheduler: ConcurrentDispatchQueueScheduler.init(qos: DispatchQoS.background)) | |
| source | |
| .subscribe(onNext: { number in | |
| print("Current emitted number: ", number) | |
| }, onError: { _ in print("On Error") }, | |
| onCompleted: { print("Complete") }, | |
| onDisposed: nil) | |
| } |
This file contains hidden or 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
| func createRxObservable() { | |
| let source: Observable<Int> = Observable.repeatElement(12).take(2) | |
| source | |
| .subscribe(onNext: { number in | |
| print("Current emitted number: ", number) | |
| }, onError: { _ in print("On Error") }, | |
| onCompleted: { print("Complete") }, | |
| onDisposed: nil) | |
| } |
This file contains hidden or 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
| func createRxObservable() { | |
| let source: Observable<Int> = Observable.range(start: 3, count: 3) | |
| source | |
| .subscribe(onNext: { number in | |
| print("Current emitted number: ", number) | |
| }, onError: { _ in print("On Error") }, | |
| onCompleted: { print("Complete") }, | |
| onDisposed: nil) | |
| } |
This file contains hidden or 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
| func createRxObservable() { | |
| let source: Observable<Int> = Observable.just(1) | |
| source | |
| .subscribe(onNext: { number in | |
| print("Current emitted number: ", number) | |
| }, onError: { _ in print("On Error") }, | |
| onCompleted: { print("Complete") }, | |
| onDisposed: nil) | |
| } |
NewerOlder