Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.
Edit Xcode Scheme and add a pre-action script.
Copy the contents of preaction.sh into the pre-action script box.
| struct EnumSequence<T: RawRepresentable> where T.RawValue == Int {} | |
| extension EnumSequence: Sequence { | |
| func makeIterator() -> AnyIterator<T> { | |
| var rawValue = 0 | |
| return AnyIterator { | |
| let nextCase = T(rawValue: rawValue) | |
| rawValue += 1 | |
| return nextCase |
| Banco do Brasil = "bbapp://" | |
| Bradesco = "BDNiPhoneVarejo://" | |
| Bradesco Prime = "BDNiPhonePrime://" | |
| Itaú = "itauvarejo://" | |
| Itaú Personnalité = "itaupersonnalite://" | |
| Santander = "santanderpf://" | |
| Sicoob = "sicoob://" | |
| Neon = "banconeon://" | |
| Nubank = "nuapp://" |
Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.
Edit Xcode Scheme and add a pre-action script.
Copy the contents of preaction.sh into the pre-action script box.
| let badwork = { (queue: DispatchQueue) in | |
| queue.async { | |
| let app = UIApplication.shared | |
| for index in 0..<100000 { | |
| let name = "Yolo \(index)" | |
| let identifier = app.beginBackgroundTask(withName: name, expirationHandler: { | |
| print("Expired") | |
| }); |
| extension Sequence { | |
| func reduce<A>(_ initial: A, combine: (inout A, Iterator.Element) -> ()) -> A { | |
| var result = initial | |
| for element in self { | |
| combine(&result, element) | |
| } | |
| return result | |
| } | |
| } |
| // | |
| // Operators.swift | |
| // FastParsing | |
| // | |
| // Created by Chris Eidhof on 26/12/2016. | |
| // Copyright © 2016 objc.io. All rights reserved. | |
| // | |
| // TODO: give appropriate credit. Many parts were stolen from SwiftParsec. |
| // | |
| // Results+Rx.swift | |
| // | |
| // Make Realm auto-updating Results observable. Works with Realm 0.98 and later, RxSwift 2.1.0 and later. | |
| // | |
| // Created by Florent Pillet on 12/02/16. | |
| // Copyright (c) 2016 Florent Pillet. All rights reserved. | |
| // | |
| import Foundation |
| import UIKit | |
| struct Screen<A> { | |
| let run: (A -> ()) -> UIViewController | |
| } | |
| struct Step<A> { | |
| let build: (navigationController: UINavigationController, callback: A -> ()) -> UIViewController | |
| } |
| - (NSString *)description { | |
| __block NSMutableString *displayString = [NSMutableString stringWithFormat:@"curl -v -X %@", self.HTTPMethod]; | |
| [displayString appendFormat:@" \'%@\'", self.URL.absoluteString]; | |
| [self.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(id key, id val, BOOL *stop) { | |
| [displayString appendFormat:@" -H \'%@: %@\'", key, val]; | |
| }]; | |