├── .gitignore ├── Kingsroad ├── Kingsroad.h └── Info.plist ├── KingsroadTests ├── Info.plist └── KingsroadTests.swift ├── Core ├── KingsroadPlugin.swift ├── KingsroadCommand.swift ├── KingsroadPluginManager.swift ├── CordovaScriptMessageHandler.swift ├── KingsroadPluginResult.swift └── KingsroadViewController.swift ├── LICENSE ├── README.md └── Kingsroad.xcodeproj ├── xcshareddata └── xcschemes │ └── Kingsroad.xcscheme └── project.pbxproj /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | Pods/ 3 | Carthage/ 4 | build/ 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | *.xcworkspace 14 | !default.xcworkspace 15 | xcuserdata 16 | *.moved-aside 17 | .idea 18 | *.DS_Store 19 | 20 | libReveal.dylib 21 | -------------------------------------------------------------------------------- /Kingsroad/Kingsroad.h: -------------------------------------------------------------------------------- 1 | // 2 | // Kingsroad.h 3 | // Kingsroad 4 | // 5 | // Created by Carl Chen on 3/7/16. 6 | // Copyright © 2016 Ricebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Kingsroad. 12 | FOUNDATION_EXPORT double KingsroadVersionNumber; 13 | 14 | //! Project version string for Kingsroad. 15 | FOUNDATION_EXPORT const unsigned char KingsroadVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /KingsroadTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Core/KingsroadPlugin.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KingsroadPlugin.swift 3 | // Daenerys 4 | // 5 | // Created by Carl Chen on 3/1/16. 6 | // Copyright © 2016 Carl Chen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class KingsroadPlugin: NSObject { 12 | 13 | weak public var commandDelgete: KingsroadCommandDelegate? = nil 14 | 15 | override required public init() { 16 | super.init() 17 | } 18 | 19 | public func judgeCommandMethodArgumentCount(command: KingsroadCommand, rightCount count: UInt) -> KingsroadPluginResult? { 20 | let result: KingsroadPluginResult? 21 | if command.methodArguments.count != Int(count) { 22 | result = KingsroadPluginResult.errorWithMessage("argument count is wrong.") 23 | }else { 24 | result = nil 25 | } 26 | 27 | return result 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Kingsroad/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Core/KingsroadCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KingsroadCommand.swift 3 | // Daenerys 4 | // 5 | // Created by Carl Chen on 3/1/16. 6 | // Copyright © 2016 Carl Chen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol KingsroadCommandDelegate { 12 | func sendPluginResult(result: KingsroadPluginResult, callbackID: String) 13 | } 14 | 15 | public class KingsroadCommand: NSObject { 16 | 17 | public let callbackID: String 18 | public let pluginName: String 19 | public let pluginMethodName: String 20 | public let methodArguments: [AnyObject] 21 | 22 | public init(callbackID: String, 23 | pluginName: String, 24 | pluginMethodName: String, 25 | methodArguments: [AnyObject]) 26 | { 27 | self.callbackID = callbackID 28 | self.pluginName = pluginName 29 | self.pluginMethodName = pluginMethodName 30 | self.methodArguments = methodArguments 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Serious Tech. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /KingsroadTests/KingsroadTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KingsroadTests.swift 3 | // KingsroadTests 4 | // 5 | // Created by Carl Chen on 3/7/16. 6 | // Copyright © 2016 Ricebook. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Kingsroad 11 | 12 | class KingsroadTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Core/KingsroadPluginManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KingsroadPluginManager.swift 3 | // Daenerys 4 | // 5 | // Created by Carl Chen on 3/1/16. 6 | // Copyright © 2016 Carl Chen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class KingsroadPluginManager { 12 | public static let sharedManager = KingsroadPluginManager() 13 | 14 | private init() { 15 | 16 | } 17 | 18 | /** 19 | Register plugin. 20 | 21 | - parameter name: Name of plugin that is used in js 22 | - parameter pluginType: The Class of plugin 23 | */ 24 | public func registerPluginTypeWithName(name: String, pluginType: KingsroadPlugin.Type) { 25 | _pluginTypeMap[name] = pluginType 26 | } 27 | 28 | 29 | public func registerPlugins(plugins: [String: KingsroadPlugin.Type]) { 30 | for (key, value) in plugins { 31 | _pluginTypeMap[key] = value 32 | } 33 | } 34 | 35 | public subscript(pluginName: String) -> KingsroadPlugin.Type? { 36 | return _pluginTypeMap[pluginName] 37 | } 38 | 39 | 40 | // MARK: - Private properties 41 | private var _pluginTypeMap: [String: KingsroadPlugin.Type] = [:] 42 | } 43 | -------------------------------------------------------------------------------- /Core/CordovaScriptMessageHandler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CordovaScriptMessageHandler.swift 3 | // Daenerys 4 | // 5 | // Created by Carl Chen on 3/1/16. 6 | // Copyright © 2016 Carl Chen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | 12 | 13 | 14 | public class CordovaScriptMessageHandler: NSObject, WKScriptMessageHandler { 15 | public weak var commandDelgete: KingsroadCommandDelegate? = nil 16 | 17 | public func userContentController(userContentController: WKUserContentController, didReceiveScriptMessage message: WKScriptMessage) { 18 | 19 | guard message.name == "cordova" else { 20 | return 21 | } 22 | 23 | guard let msgBody = message.body as? [AnyObject] 24 | where msgBody.count >= 4 25 | else { 26 | return 27 | } 28 | 29 | guard let callbackID = msgBody[0] as? String, 30 | pluginName = msgBody[1] as? String, 31 | pluginMethodName = msgBody[2] as? String, 32 | methodArguments = msgBody[3] as? [AnyObject] 33 | else { 34 | return 35 | } 36 | 37 | let command = KingsroadCommand(callbackID: callbackID, pluginName: pluginName, pluginMethodName: pluginMethodName, methodArguments: methodArguments) 38 | 39 | guard let pluginType = KingsroadPluginManager.sharedManager[pluginName] else { 40 | print("Plugin \(pluginName) not found.") 41 | return 42 | } 43 | 44 | let plugin: KingsroadPlugin 45 | if let cachedPlugin = _pluginMap[pluginName] { 46 | plugin = cachedPlugin 47 | } else { 48 | plugin = pluginType.init() 49 | plugin.commandDelgete = commandDelgete 50 | _pluginMap[pluginName] = plugin 51 | } 52 | 53 | let methodSelector = Selector(pluginMethodName + ":") 54 | if plugin.respondsToSelector(methodSelector) { 55 | plugin.performSelector(methodSelector, withObject: command) 56 | } 57 | 58 | } 59 | 60 | private var _pluginMap: [String: KingsroadPlugin] = [:] 61 | } 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Kingsroad 2 | ====== 3 | 4 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 5 | 6 | Kingsroad is an iOS hybrid framework written in Swift that using WKWebView and is compatible to Cordova JS interface. 7 | 8 | ## Features 9 | 10 | - WKWebView supportable 11 | - Cordova JS interface compatible 12 | - Write plugin in Swift 13 | 14 | 15 | ## Requirements 16 | 17 | - iOS 8.0+ 18 | - Xcode 7.2+ 19 | 20 | ## TODO List 21 | 22 | - [ ] Localization 23 | - [ ] Unit Test 24 | 25 | ## Attention 26 | 27 | WKWebView has some known problems, If you use Kingsroad, you should handle these problems yourself. 28 | 29 | #### 1. Loading local file under iOS8 30 | 31 | There is a discuss about this problem on [Stackoverflow](http://stackoverflow.com/questions/24882834/wkwebview-not-loading-local-files-under-ios-8) 32 | 33 | In general, if your app support iOS8, there is two way to solve this problem. 34 | 35 | * Move your local file to the Temp directory of your app. 36 | * Start a local web server(like [GCDWebServer](https://github.com/Hearst-DD/ObjectMapper)) and load your hybrid resource through http. 37 | 38 | #### 2. CORS 39 | 40 | Here is a [document](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Access_control_CORS) about CORS. 41 | 42 | If your local hybrid page send a http request by XMLHttpRequest, like request an API of server. Server should be configured to support CORS, or your request will fail. 43 | 44 | ## Usage 45 | 46 | Usage of Kingsroad is very similar to Cordova. 47 | 48 | Register your plugins when app launch. 49 | 50 | ``` Swift 51 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 52 | 53 | KingsroadPluginManager.sharedManager.registerPlugins([ 54 | "XXXX": Plugin1ClassName.self, 55 | "YYYY": Plugin2ClassName.self, 56 | ]) 57 | 58 | ..... 59 | } 60 | 61 | ``` 62 | 63 | Write a custom plugin is very similar to Cordova. 64 | 65 | Plugin should inherit `KingsroadPlugin`, and remember to register it. 66 | 67 | Format of plugin method: 68 | 69 | ``` Swift 70 | func methodName(command: KingsroadCommand) { 71 | 72 | } 73 | 74 | ``` 75 | 76 | 77 | ## Installation 78 | 79 | If you're using [Carthage](https://github.com/Carthage/Carthage) you can add a dependency on Kingsroad by adding it to your `Cartfile`: 80 | 81 | ``` 82 | github "ricebook/Kingsroad" ~> 0.1 83 | ``` 84 | 85 | You can also use git submodule to install Kingsroad. 86 | 87 | ## License 88 | 89 | Kingsroad is released under the MIT license. See LICENSE for details. -------------------------------------------------------------------------------- /Core/KingsroadPluginResult.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KingsroadPluginResult.swift 3 | // Daenerys 4 | // 5 | // Created by Carl Chen on 3/1/16. 6 | // Copyright © 2016 Carl Chen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum KingsroadCommandStatus: Int { 12 | case NoResult = 0 13 | case OK 14 | case ClassNotFoundException 15 | case IllegalAccessException 16 | case MalformedURLException 17 | case IOException 18 | case InvalidAction 19 | case JsonException 20 | case Error 21 | } 22 | 23 | public class KingsroadPluginResult: NSObject { 24 | private(set) var status: KingsroadCommandStatus 25 | var message: AnyObject? 26 | let keepCallback: Bool 27 | 28 | convenience public init(status: KingsroadCommandStatus) { 29 | self.init(status: status, message: nil, keepCallback: false) 30 | } 31 | 32 | convenience public init(status: KingsroadCommandStatus, message: AnyObject) { 33 | self.init(status: status, message: message, keepCallback: false) 34 | } 35 | 36 | public init(status: KingsroadCommandStatus, message: AnyObject?, keepCallback: Bool) { 37 | self.status = status 38 | self.message = message 39 | self.keepCallback = keepCallback 40 | 41 | super.init() 42 | } 43 | 44 | public class func errorWithMessage(msg: String) -> KingsroadPluginResult { 45 | return KingsroadPluginResult(status: .Error, message: msg) 46 | } 47 | 48 | public class func dataFormatError() -> KingsroadPluginResult { 49 | return errorWithMessage("数据格式有误") 50 | } 51 | 52 | func constructResultJSWithCallbackID(callbackID: String) -> String { 53 | 54 | var resultInfoDic: [String: AnyObject] = [ 55 | "status": "\(status.rawValue)", 56 | "keepCallback": keepCallback 57 | ] 58 | 59 | resultInfoDic["message"] = message 60 | 61 | // 默认是 Json 格式错误 62 | let resultParamStr: String 63 | if let jsonData = try? NSJSONSerialization.dataWithJSONObject(resultInfoDic, options: NSJSONWritingOptions()), 64 | paramStr = String(data: jsonData, encoding: NSUTF8StringEncoding) 65 | { 66 | resultParamStr = paramStr 67 | } else { 68 | // 如果 Json 序列化错误,则将状态置为这个 69 | status = .JsonException 70 | resultParamStr = "{\"status\":\"7\",\"message\":\"JsonException\",\"keepCallback\":false}" 71 | } 72 | 73 | let resultJS: String 74 | 75 | switch status { 76 | case .OK: 77 | resultJS = "cordova.callbackSuccess('\(callbackID)', \(resultParamStr));" 78 | default: 79 | resultJS = "cordova.callbackError('\(callbackID)', \(resultParamStr));" 80 | } 81 | 82 | return resultJS 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /Kingsroad.xcodeproj/xcshareddata/xcschemes/Kingsroad.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Core/KingsroadViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KingsroadViewController.swift 3 | // Daenerys 4 | // 5 | // Created by Carl Chen on 3/1/16. 6 | // Copyright © 2016 Carl Chen. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | 12 | public class KingsroadViewController: UIViewController { 13 | public private(set) var webView: WKWebView! 14 | 15 | public var jsScriptRunAfterWebViewInit: String? 16 | 17 | 18 | // MAKR: - init 19 | public init?(baseURL: NSURL, indexPath: String) { 20 | super.init(nibName: nil, bundle: nil) 21 | 22 | if baseURL.fileURL { 23 | // 如果是本地文件,则判断对应文件夹是否存在 24 | var isDirectory: ObjCBool = ObjCBool(false) 25 | let fileFolderPath = baseURL.path ?? "" 26 | let isExist = NSFileManager.defaultManager().fileExistsAtPath(fileFolderPath, isDirectory: &isDirectory) 27 | if !isExist || !isDirectory.boolValue { 28 | print("\(fileFolderPath) does not exist" ) 29 | return nil 30 | } 31 | } 32 | 33 | _baseURL = baseURL 34 | _indexPath = indexPath 35 | 36 | } 37 | 38 | required public init?(coder aDecoder: NSCoder) { 39 | super.init(coder: aDecoder) 40 | } 41 | 42 | 43 | // MARK: - Private properties 44 | private var _baseURL: NSURL = NSURL(fileURLWithPath: "/") 45 | private var _indexPath: String = "index.html" 46 | 47 | } 48 | 49 | // MARK: - Extension: Life cycle 50 | extension KingsroadViewController { 51 | // MARK: - Life Cycle 52 | 53 | override public func viewDidLoad() { 54 | super.viewDidLoad() 55 | 56 | // Do any additional setup after loading the view. 57 | 58 | p_constructSubviews() 59 | 60 | let wholeURLString = _baseURL.absoluteString.map { $0 + "/" + _indexPath } 61 | guard let wholeURL = NSURL(string: wholeURLString ?? "") else { return } 62 | 63 | if #available(iOS 9.0, *) { 64 | if _baseURL.fileURL { 65 | webView.loadFileURL(wholeURL, allowingReadAccessToURL: _baseURL) 66 | return 67 | } 68 | } 69 | webView.loadRequest(NSURLRequest(URL: wholeURL)) 70 | } 71 | 72 | override public func didReceiveMemoryWarning() { 73 | super.didReceiveMemoryWarning() 74 | // Dispose of any resources that can be recreated. 75 | } 76 | } 77 | 78 | // MARK: - Extension: Delegates 79 | // MARK: KingsroadCommandDelegate 80 | extension KingsroadViewController: KingsroadCommandDelegate { 81 | public func sendPluginResult(result: KingsroadPluginResult, callbackID: String) { 82 | 83 | let resultJS = result.constructResultJSWithCallbackID(callbackID) 84 | webView.evaluateJavaScript(resultJS) { (obj, error) -> Void in 85 | if error == nil { 86 | // print("Callback JS run successfully. Result : \(obj)") 87 | } else { 88 | print("Callback JS run error. \(error)") 89 | } 90 | } 91 | 92 | } 93 | } 94 | 95 | // MARK: WKNavigationDelegate 96 | extension KingsroadViewController: WKNavigationDelegate { 97 | public func webView(webView: WKWebView, decidePolicyForNavigationAction navigationAction: WKNavigationAction, decisionHandler: (WKNavigationActionPolicy) -> Void) { 98 | // print(navigationAction) 99 | decisionHandler(.Allow) 100 | } 101 | 102 | public func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) { 103 | print(navigation) 104 | } 105 | } 106 | 107 | // MARK: WKUIDelegate 108 | extension KingsroadViewController: WKUIDelegate { 109 | // HTML页面Alert出内容 110 | public func webView(webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: () -> Void) { 111 | let ac = UIAlertController(title: "提示", message: message, preferredStyle: .Alert) 112 | ac.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: { (_) -> Void in 113 | completionHandler() 114 | })) 115 | 116 | presentViewController(ac, animated: true, completion: nil) 117 | } 118 | 119 | // HTML页面弹出Confirm时调用此方法 120 | public func webView(webView: WKWebView, runJavaScriptConfirmPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: (Bool) -> Void) { 121 | let ac = UIAlertController(title: "提示", message: message, preferredStyle: .Alert) 122 | ac.addAction(UIAlertAction(title: "OK", style: .Default, handler: 123 | { (_) -> Void in 124 | completionHandler(true) 125 | })) 126 | 127 | ac.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: 128 | { (_) -> Void in 129 | completionHandler(false) 130 | })) 131 | 132 | presentViewController(ac, animated: true, completion: nil) 133 | } 134 | } 135 | 136 | // MARK: - Extension: Private methods 137 | extension KingsroadViewController { 138 | private func p_constructSubviews() { 139 | let userContentController = WKUserContentController() 140 | 141 | if let jsString = jsScriptRunAfterWebViewInit where !jsString.isEmpty { 142 | let userScript = WKUserScript(source: jsString, injectionTime: .AtDocumentEnd, forMainFrameOnly: true) 143 | userContentController.addUserScript(userScript) 144 | } 145 | 146 | let cordovaMessageHandler = CordovaScriptMessageHandler() 147 | cordovaMessageHandler.commandDelgete = self 148 | userContentController.addScriptMessageHandler(cordovaMessageHandler, name: "cordova") 149 | 150 | let configuration = WKWebViewConfiguration() 151 | configuration.userContentController = userContentController 152 | webView = WKWebView(frame: CGRectZero, configuration: configuration) 153 | 154 | 155 | webView.navigationDelegate = self 156 | webView.UIDelegate = self 157 | webView.allowsBackForwardNavigationGestures = false 158 | 159 | 160 | view.addSubview(webView) 161 | webView.translatesAutoresizingMaskIntoConstraints = false 162 | 163 | let viewDic: [String: AnyObject] = [ 164 | "webView": webView 165 | ] 166 | var cons = NSLayoutConstraint.constraintsWithVisualFormat("H:|[webView]|", options: NSLayoutFormatOptions(), metrics: nil, views: viewDic) 167 | view.addConstraints(cons) 168 | 169 | cons = NSLayoutConstraint.constraintsWithVisualFormat("V:|[webView]|", options: NSLayoutFormatOptions(), metrics: nil, views: viewDic) 170 | view.addConstraints(cons) 171 | 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /Kingsroad.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C3EAB5461C8D844100B9C5FE /* Kingsroad.h in Headers */ = {isa = PBXBuildFile; fileRef = C3EAB5451C8D844100B9C5FE /* Kingsroad.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | C3EAB54D1C8D844100B9C5FE /* Kingsroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3EAB5421C8D844100B9C5FE /* Kingsroad.framework */; }; 12 | C3EAB5521C8D844100B9C5FE /* KingsroadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB5511C8D844100B9C5FE /* KingsroadTests.swift */; }; 13 | C3EAB5631C8D84E100B9C5FE /* CordovaScriptMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB55D1C8D84E100B9C5FE /* CordovaScriptMessageHandler.swift */; }; 14 | C3EAB5641C8D84E100B9C5FE /* KingsroadCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB55E1C8D84E100B9C5FE /* KingsroadCommand.swift */; }; 15 | C3EAB5651C8D84E100B9C5FE /* KingsroadPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB55F1C8D84E100B9C5FE /* KingsroadPlugin.swift */; }; 16 | C3EAB5661C8D84E100B9C5FE /* KingsroadPluginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB5601C8D84E100B9C5FE /* KingsroadPluginManager.swift */; }; 17 | C3EAB5671C8D84E100B9C5FE /* KingsroadPluginResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB5611C8D84E100B9C5FE /* KingsroadPluginResult.swift */; }; 18 | C3EAB5681C8D84E100B9C5FE /* KingsroadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EAB5621C8D84E100B9C5FE /* KingsroadViewController.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | C3EAB54E1C8D844100B9C5FE /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = C3EAB5391C8D844100B9C5FE /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = C3EAB5411C8D844100B9C5FE; 27 | remoteInfo = Kingsroad; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | C3EAB5421C8D844100B9C5FE /* Kingsroad.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Kingsroad.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | C3EAB5451C8D844100B9C5FE /* Kingsroad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Kingsroad.h; sourceTree = ""; }; 34 | C3EAB5471C8D844100B9C5FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | C3EAB54C1C8D844100B9C5FE /* KingsroadTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KingsroadTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | C3EAB5511C8D844100B9C5FE /* KingsroadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KingsroadTests.swift; sourceTree = ""; }; 37 | C3EAB5531C8D844100B9C5FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | C3EAB55D1C8D84E100B9C5FE /* CordovaScriptMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CordovaScriptMessageHandler.swift; sourceTree = ""; }; 39 | C3EAB55E1C8D84E100B9C5FE /* KingsroadCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KingsroadCommand.swift; sourceTree = ""; }; 40 | C3EAB55F1C8D84E100B9C5FE /* KingsroadPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KingsroadPlugin.swift; sourceTree = ""; }; 41 | C3EAB5601C8D84E100B9C5FE /* KingsroadPluginManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KingsroadPluginManager.swift; sourceTree = ""; }; 42 | C3EAB5611C8D84E100B9C5FE /* KingsroadPluginResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KingsroadPluginResult.swift; sourceTree = ""; }; 43 | C3EAB5621C8D84E100B9C5FE /* KingsroadViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KingsroadViewController.swift; sourceTree = ""; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | C3EAB53E1C8D844100B9C5FE /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | C3EAB5491C8D844100B9C5FE /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | C3EAB54D1C8D844100B9C5FE /* Kingsroad.framework in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | C3EAB5381C8D844100B9C5FE = { 66 | isa = PBXGroup; 67 | children = ( 68 | C3EAB55C1C8D84D100B9C5FE /* Core */, 69 | C3EAB5441C8D844100B9C5FE /* Kingsroad */, 70 | C3EAB5501C8D844100B9C5FE /* KingsroadTests */, 71 | C3EAB5431C8D844100B9C5FE /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | C3EAB5431C8D844100B9C5FE /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | C3EAB5421C8D844100B9C5FE /* Kingsroad.framework */, 79 | C3EAB54C1C8D844100B9C5FE /* KingsroadTests.xctest */, 80 | ); 81 | name = Products; 82 | sourceTree = ""; 83 | }; 84 | C3EAB5441C8D844100B9C5FE /* Kingsroad */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | C3EAB5451C8D844100B9C5FE /* Kingsroad.h */, 88 | C3EAB5471C8D844100B9C5FE /* Info.plist */, 89 | ); 90 | path = Kingsroad; 91 | sourceTree = ""; 92 | }; 93 | C3EAB5501C8D844100B9C5FE /* KingsroadTests */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | C3EAB5511C8D844100B9C5FE /* KingsroadTests.swift */, 97 | C3EAB5531C8D844100B9C5FE /* Info.plist */, 98 | ); 99 | path = KingsroadTests; 100 | sourceTree = ""; 101 | }; 102 | C3EAB55C1C8D84D100B9C5FE /* Core */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | C3EAB55D1C8D84E100B9C5FE /* CordovaScriptMessageHandler.swift */, 106 | C3EAB55E1C8D84E100B9C5FE /* KingsroadCommand.swift */, 107 | C3EAB55F1C8D84E100B9C5FE /* KingsroadPlugin.swift */, 108 | C3EAB5601C8D84E100B9C5FE /* KingsroadPluginManager.swift */, 109 | C3EAB5611C8D84E100B9C5FE /* KingsroadPluginResult.swift */, 110 | C3EAB5621C8D84E100B9C5FE /* KingsroadViewController.swift */, 111 | ); 112 | path = Core; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXHeadersBuildPhase section */ 118 | C3EAB53F1C8D844100B9C5FE /* Headers */ = { 119 | isa = PBXHeadersBuildPhase; 120 | buildActionMask = 2147483647; 121 | files = ( 122 | C3EAB5461C8D844100B9C5FE /* Kingsroad.h in Headers */, 123 | ); 124 | runOnlyForDeploymentPostprocessing = 0; 125 | }; 126 | /* End PBXHeadersBuildPhase section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | C3EAB5411C8D844100B9C5FE /* Kingsroad */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = C3EAB5561C8D844100B9C5FE /* Build configuration list for PBXNativeTarget "Kingsroad" */; 132 | buildPhases = ( 133 | C3EAB53D1C8D844100B9C5FE /* Sources */, 134 | C3EAB53E1C8D844100B9C5FE /* Frameworks */, 135 | C3EAB53F1C8D844100B9C5FE /* Headers */, 136 | C3EAB5401C8D844100B9C5FE /* Resources */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | ); 142 | name = Kingsroad; 143 | productName = Kingsroad; 144 | productReference = C3EAB5421C8D844100B9C5FE /* Kingsroad.framework */; 145 | productType = "com.apple.product-type.framework"; 146 | }; 147 | C3EAB54B1C8D844100B9C5FE /* KingsroadTests */ = { 148 | isa = PBXNativeTarget; 149 | buildConfigurationList = C3EAB5591C8D844100B9C5FE /* Build configuration list for PBXNativeTarget "KingsroadTests" */; 150 | buildPhases = ( 151 | C3EAB5481C8D844100B9C5FE /* Sources */, 152 | C3EAB5491C8D844100B9C5FE /* Frameworks */, 153 | C3EAB54A1C8D844100B9C5FE /* Resources */, 154 | ); 155 | buildRules = ( 156 | ); 157 | dependencies = ( 158 | C3EAB54F1C8D844100B9C5FE /* PBXTargetDependency */, 159 | ); 160 | name = KingsroadTests; 161 | productName = KingsroadTests; 162 | productReference = C3EAB54C1C8D844100B9C5FE /* KingsroadTests.xctest */; 163 | productType = "com.apple.product-type.bundle.unit-test"; 164 | }; 165 | /* End PBXNativeTarget section */ 166 | 167 | /* Begin PBXProject section */ 168 | C3EAB5391C8D844100B9C5FE /* Project object */ = { 169 | isa = PBXProject; 170 | attributes = { 171 | LastSwiftUpdateCheck = 0720; 172 | LastUpgradeCheck = 0800; 173 | ORGANIZATIONNAME = Ricebook; 174 | TargetAttributes = { 175 | C3EAB5411C8D844100B9C5FE = { 176 | CreatedOnToolsVersion = 7.2.1; 177 | LastSwiftMigration = 0800; 178 | }; 179 | C3EAB54B1C8D844100B9C5FE = { 180 | CreatedOnToolsVersion = 7.2.1; 181 | LastSwiftMigration = 0800; 182 | }; 183 | }; 184 | }; 185 | buildConfigurationList = C3EAB53C1C8D844100B9C5FE /* Build configuration list for PBXProject "Kingsroad" */; 186 | compatibilityVersion = "Xcode 3.2"; 187 | developmentRegion = English; 188 | hasScannedForEncodings = 0; 189 | knownRegions = ( 190 | en, 191 | ); 192 | mainGroup = C3EAB5381C8D844100B9C5FE; 193 | productRefGroup = C3EAB5431C8D844100B9C5FE /* Products */; 194 | projectDirPath = ""; 195 | projectRoot = ""; 196 | targets = ( 197 | C3EAB5411C8D844100B9C5FE /* Kingsroad */, 198 | C3EAB54B1C8D844100B9C5FE /* KingsroadTests */, 199 | ); 200 | }; 201 | /* End PBXProject section */ 202 | 203 | /* Begin PBXResourcesBuildPhase section */ 204 | C3EAB5401C8D844100B9C5FE /* Resources */ = { 205 | isa = PBXResourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | C3EAB54A1C8D844100B9C5FE /* Resources */ = { 212 | isa = PBXResourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXResourcesBuildPhase section */ 219 | 220 | /* Begin PBXSourcesBuildPhase section */ 221 | C3EAB53D1C8D844100B9C5FE /* Sources */ = { 222 | isa = PBXSourcesBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | C3EAB5651C8D84E100B9C5FE /* KingsroadPlugin.swift in Sources */, 226 | C3EAB5641C8D84E100B9C5FE /* KingsroadCommand.swift in Sources */, 227 | C3EAB5631C8D84E100B9C5FE /* CordovaScriptMessageHandler.swift in Sources */, 228 | C3EAB5671C8D84E100B9C5FE /* KingsroadPluginResult.swift in Sources */, 229 | C3EAB5661C8D84E100B9C5FE /* KingsroadPluginManager.swift in Sources */, 230 | C3EAB5681C8D84E100B9C5FE /* KingsroadViewController.swift in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | C3EAB5481C8D844100B9C5FE /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | C3EAB5521C8D844100B9C5FE /* KingsroadTests.swift in Sources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXSourcesBuildPhase section */ 243 | 244 | /* Begin PBXTargetDependency section */ 245 | C3EAB54F1C8D844100B9C5FE /* PBXTargetDependency */ = { 246 | isa = PBXTargetDependency; 247 | target = C3EAB5411C8D844100B9C5FE /* Kingsroad */; 248 | targetProxy = C3EAB54E1C8D844100B9C5FE /* PBXContainerItemProxy */; 249 | }; 250 | /* End PBXTargetDependency section */ 251 | 252 | /* Begin XCBuildConfiguration section */ 253 | C3EAB5541C8D844100B9C5FE /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | ALWAYS_SEARCH_USER_PATHS = NO; 257 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 258 | CLANG_CXX_LIBRARY = "libc++"; 259 | CLANG_ENABLE_MODULES = YES; 260 | CLANG_ENABLE_OBJC_ARC = YES; 261 | CLANG_WARN_BOOL_CONVERSION = YES; 262 | CLANG_WARN_CONSTANT_CONVERSION = YES; 263 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 264 | CLANG_WARN_EMPTY_BODY = YES; 265 | CLANG_WARN_ENUM_CONVERSION = YES; 266 | CLANG_WARN_INFINITE_RECURSION = YES; 267 | CLANG_WARN_INT_CONVERSION = YES; 268 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 269 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 270 | CLANG_WARN_UNREACHABLE_CODE = YES; 271 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 272 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 273 | COPY_PHASE_STRIP = NO; 274 | CURRENT_PROJECT_VERSION = 1; 275 | DEBUG_INFORMATION_FORMAT = dwarf; 276 | ENABLE_STRICT_OBJC_MSGSEND = YES; 277 | ENABLE_TESTABILITY = YES; 278 | GCC_C_LANGUAGE_STANDARD = gnu99; 279 | GCC_DYNAMIC_NO_PIC = NO; 280 | GCC_NO_COMMON_BLOCKS = YES; 281 | GCC_OPTIMIZATION_LEVEL = 0; 282 | GCC_PREPROCESSOR_DEFINITIONS = ( 283 | "DEBUG=1", 284 | "$(inherited)", 285 | ); 286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 288 | GCC_WARN_UNDECLARED_SELECTOR = YES; 289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 290 | GCC_WARN_UNUSED_FUNCTION = YES; 291 | GCC_WARN_UNUSED_VARIABLE = YES; 292 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 293 | MTL_ENABLE_DEBUG_INFO = YES; 294 | ONLY_ACTIVE_ARCH = YES; 295 | SDKROOT = iphoneos; 296 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 297 | TARGETED_DEVICE_FAMILY = "1,2"; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | VERSION_INFO_PREFIX = ""; 300 | }; 301 | name = Debug; 302 | }; 303 | C3EAB5551C8D844100B9C5FE /* Release */ = { 304 | isa = XCBuildConfiguration; 305 | buildSettings = { 306 | ALWAYS_SEARCH_USER_PATHS = NO; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_CONSTANT_CONVERSION = YES; 313 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 314 | CLANG_WARN_EMPTY_BODY = YES; 315 | CLANG_WARN_ENUM_CONVERSION = YES; 316 | CLANG_WARN_INFINITE_RECURSION = YES; 317 | CLANG_WARN_INT_CONVERSION = YES; 318 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 319 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 320 | CLANG_WARN_UNREACHABLE_CODE = YES; 321 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 322 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 323 | COPY_PHASE_STRIP = NO; 324 | CURRENT_PROJECT_VERSION = 1; 325 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 326 | ENABLE_NS_ASSERTIONS = NO; 327 | ENABLE_STRICT_OBJC_MSGSEND = YES; 328 | GCC_C_LANGUAGE_STANDARD = gnu99; 329 | GCC_NO_COMMON_BLOCKS = YES; 330 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 331 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 332 | GCC_WARN_UNDECLARED_SELECTOR = YES; 333 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 334 | GCC_WARN_UNUSED_FUNCTION = YES; 335 | GCC_WARN_UNUSED_VARIABLE = YES; 336 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 337 | MTL_ENABLE_DEBUG_INFO = NO; 338 | SDKROOT = iphoneos; 339 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 340 | TARGETED_DEVICE_FAMILY = "1,2"; 341 | VALIDATE_PRODUCT = YES; 342 | VERSIONING_SYSTEM = "apple-generic"; 343 | VERSION_INFO_PREFIX = ""; 344 | }; 345 | name = Release; 346 | }; 347 | C3EAB5571C8D844100B9C5FE /* Debug */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | CLANG_ENABLE_MODULES = YES; 351 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 352 | DEFINES_MODULE = YES; 353 | DYLIB_COMPATIBILITY_VERSION = 1; 354 | DYLIB_CURRENT_VERSION = 1; 355 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 356 | INFOPLIST_FILE = Kingsroad/Info.plist; 357 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 359 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 360 | PRODUCT_BUNDLE_IDENTIFIER = com.ricebook.Kingsroad; 361 | PRODUCT_NAME = "$(TARGET_NAME)"; 362 | SKIP_INSTALL = YES; 363 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 364 | SWIFT_VERSION = 2.3; 365 | }; 366 | name = Debug; 367 | }; 368 | C3EAB5581C8D844100B9C5FE /* Release */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | CLANG_ENABLE_MODULES = YES; 372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 373 | DEFINES_MODULE = YES; 374 | DYLIB_COMPATIBILITY_VERSION = 1; 375 | DYLIB_CURRENT_VERSION = 1; 376 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 377 | INFOPLIST_FILE = Kingsroad/Info.plist; 378 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 381 | PRODUCT_BUNDLE_IDENTIFIER = com.ricebook.Kingsroad; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SKIP_INSTALL = YES; 384 | SWIFT_VERSION = 2.3; 385 | }; 386 | name = Release; 387 | }; 388 | C3EAB55A1C8D844100B9C5FE /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | INFOPLIST_FILE = KingsroadTests/Info.plist; 392 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 393 | PRODUCT_BUNDLE_IDENTIFIER = com.ricebook.KingsroadTests; 394 | PRODUCT_NAME = "$(TARGET_NAME)"; 395 | SWIFT_VERSION = 2.3; 396 | }; 397 | name = Debug; 398 | }; 399 | C3EAB55B1C8D844100B9C5FE /* Release */ = { 400 | isa = XCBuildConfiguration; 401 | buildSettings = { 402 | INFOPLIST_FILE = KingsroadTests/Info.plist; 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 404 | PRODUCT_BUNDLE_IDENTIFIER = com.ricebook.KingsroadTests; 405 | PRODUCT_NAME = "$(TARGET_NAME)"; 406 | SWIFT_VERSION = 2.3; 407 | }; 408 | name = Release; 409 | }; 410 | /* End XCBuildConfiguration section */ 411 | 412 | /* Begin XCConfigurationList section */ 413 | C3EAB53C1C8D844100B9C5FE /* Build configuration list for PBXProject "Kingsroad" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | C3EAB5541C8D844100B9C5FE /* Debug */, 417 | C3EAB5551C8D844100B9C5FE /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | defaultConfigurationName = Release; 421 | }; 422 | C3EAB5561C8D844100B9C5FE /* Build configuration list for PBXNativeTarget "Kingsroad" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | C3EAB5571C8D844100B9C5FE /* Debug */, 426 | C3EAB5581C8D844100B9C5FE /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | C3EAB5591C8D844100B9C5FE /* Build configuration list for PBXNativeTarget "KingsroadTests" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | C3EAB55A1C8D844100B9C5FE /* Debug */, 435 | C3EAB55B1C8D844100B9C5FE /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | /* End XCConfigurationList section */ 441 | }; 442 | rootObject = C3EAB5391C8D844100B9C5FE /* Project object */; 443 | } 444 | --------------------------------------------------------------------------------