Eric Steven Raymond, Thyrsus Enterprises, < esr@thyrsus.com >
Rick Moen, < respond-auto@linuxmafia.com >
翻译:柯非, < zer4tul@gmail.com >
这篇译文基于2014.05.21更新的原文修订版3.10。
特别感谢王刚,此前本文的翻译是由他进行的。
| public extension MoyaProvider { | |
| public func request(_ target: Target, | |
| callbackQueue: DispatchQueue? = nil, | |
| progress: ProgressBlock? = nil) -> Promise<Moya.Response> { | |
| return Promise { [weak self] fulfill, reject in | |
| self?.request( | |
| target, | |
| callbackQueue: callbackQueue, | |
| progress: progress, | |
| completion: self?.completion(for: fulfill, reject: reject) ?? {_ in } |
| /// 範例中使用了 SVProgressHUD, SwiftyJSON | |
| /// 另外 UIAlertController 有 extension | |
| func request(_ path: String, method: HttpMethod = .get, parameters: [String: Any]? = nil, localizedStatus: String? = NSLocalizedString("資料處理中", comment: "呼叫API讀取狀態文字"), _ completion: @escaping (_ json: JSON) -> Void) { | |
| // 顯示 ActivityIndicator | |
| if let status = localizedStatus { SVProgressHUD.show(withStatus: status) } | |
| // 待會使用 GCD 版本所以要 Dispatch 到其他 thread | |
| DispatchQueue.global().async { | |
| fastlane_version "1.94.0" | |
| default_platform :ios | |
| platform :ios do | |
| desc "Run Unity Editor tests" | |
| lane :test_unit do | |
| unity( | |
| run_editor_tests: true | |
| ) |
Eric Steven Raymond, Thyrsus Enterprises, < esr@thyrsus.com >
Rick Moen, < respond-auto@linuxmafia.com >
翻译:柯非, < zer4tul@gmail.com >
这篇译文基于2014.05.21更新的原文修订版3.10。
特别感谢王刚,此前本文的翻译是由他进行的。
| 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 |