├── .gitignore ├── media ├── demo.gif ├── download.svg └── logo.svg ├── quicktype ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── macos-128.png │ │ ├── macos-16.png │ │ ├── macos-256.png │ │ ├── macos-32.png │ │ ├── macos-512.png │ │ ├── macos-128@2x.png │ │ ├── macos-16@2x.png │ │ ├── macos-256@2x.png │ │ ├── macos-32@2x.png │ │ ├── macos-512@2x.png │ │ └── Contents.json ├── quicktype_xcode.entitlements ├── Info.plist ├── AppDelegate.swift └── Base.lproj │ └── MainMenu.xib ├── quicktype-xcode.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── quicktype-xcode.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcuserdata │ └── david.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── xcshareddata │ └── xcschemes │ │ ├── quicktype.xcscheme │ │ └── quicktype-xcode.xcscheme └── project.pbxproj ├── quicktype-xcode ├── SourceEditorExtension.swift ├── quicktype.entitlements ├── Info.plist ├── Runtime.swift └── PasteJSONCommand.swift ├── script └── build.sh ├── package.json ├── README.md ├── appcenter └── slack.sh └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | /Pods 4 | 5 | *.xcbkptlist 6 | *.xcuserstate 7 | -------------------------------------------------------------------------------- /media/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/media/demo.gif -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-128.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-16.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-256.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-32.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-512.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-128@2x.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-16@2x.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-256@2x.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-32@2x.png -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/macos-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glideapps/quicktype-xcode/HEAD/quicktype/Assets.xcassets/AppIcon.appiconset/macos-512@2x.png -------------------------------------------------------------------------------- /quicktype-xcode.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /quicktype-xcode.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /quicktype-xcode.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /quicktype-xcode/SourceEditorExtension.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XcodeKit 3 | 4 | 5 | class SourceEditorExtension: NSObject, XCSourceEditorExtension { 6 | func extensionDidFinishLaunching() { 7 | if !Runtime.shared.initialize() { 8 | print("Could not initialize quicktype JavaScript runtime") 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /quicktype-xcode/quicktype.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /quicktype/quicktype_xcode.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /script/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Update to latest compatible quicktype release 4 | npm upgrade quicktype 5 | 6 | # Bundle quicktype 7 | browserify \ 8 | node_modules/quicktype/dist/index.js \ 9 | -s quicktype \ 10 | -o quicktype-xcode/quicktype.js 11 | 12 | # Sync Xcode plugin version with quicktype 13 | VERSION=`npm -j ls quicktype | jq -r .dependencies.quicktype.version` 14 | agvtool new-marketing-version $VERSION 15 | agvtool new-version -all $VERSION -------------------------------------------------------------------------------- /quicktype-xcode.xcodeproj/xcuserdata/david.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | quicktype-xcode.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 1 11 | 12 | quicktype.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quicktype-xcode", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "install": "npm run build", 8 | "build": "script/build.sh" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/quicktype/quicktype-xcode.git" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/quicktype/quicktype-xcode/issues" 18 | }, 19 | "homepage": "https://github.com/quicktype/quicktype-xcode#readme", 20 | "devDependencies": { 21 | "browserify": "^14.5.0", 22 | "quicktype": "^10.0.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### [Try quicktype in your browser](https://app.quicktype.io#l=swift). 2 | 3 |
4 | 5 | ![](media/logo.svg) 6 | 7 | [![Join us in Slack](http://slack.quicktype.io/badge.svg)](http://slack.quicktype.io/) 8 | 9 | `quicktype` infers types from sample JSON data, then outputs strongly typed models and serializers for working with that data in Swift, Objective-C, C++, Java and more. This extension adds native `quicktype` support to Xcode 9. 10 | 11 | [![paste json as code](media/download.svg)](https://itunes.apple.com/us/app/paste-json-as-code-quicktype/id1330801220?mt=12) 12 | 13 | ![paste json as code](media/demo.gif) 14 | 15 | ## Development 16 | 17 | ### Install prereqs and bundle quicktype 18 | 19 | ```bash 20 | $ npm install 21 | ``` 22 | -------------------------------------------------------------------------------- /appcenter/slack.sh: -------------------------------------------------------------------------------- 1 | ORG=quicktype 2 | APP=quicktype-xcode 3 | 4 | ICON=https://pbs.twimg.com/profile_images/881784177422725121/hXRP69QY_200x200.jpg 5 | 6 | build_url=https://appcenter.ms/orgs/$ORG/apps/$APP/build/branches/$APPCENTER_BRANCH/builds/$APPCENTER_BUILD_ID 7 | build_link="<$build_url|$APP ($APPCENTER_BRANCH)>" 8 | 9 | TESTER_URL="https://install.appcenter.ms/orgs/quicktype/apps/quicktype-xcode/distribution_groups/xcode%20testers" 10 | 11 | quicktype-version () { 12 | npm -j ls quicktype | jq -r .dependencies.quicktype.version 13 | } 14 | 15 | slack_notify() { 16 | local message 17 | local "${@}" 18 | 19 | curl -X POST --data-urlencode \ 20 | "payload={ 21 | \"channel\": \"#notifications\", 22 | \"username\": \"App Center\", 23 | \"text\": \"$message\", 24 | \"icon_url\": \"$ICON\" \ 25 | }" \ 26 | $SLACK_WEBHOOK 27 | } 28 | 29 | slack_notify_build_passed() { 30 | slack_notify message="✓ $build_link built" 31 | } 32 | 33 | slack_notify_build_failed() { 34 | slack_notify message="💥 $build_link build failed" 35 | } 36 | 37 | slack_notify_deployed() { 38 | slack_notify message="✓ <$TESTER_URL|$APP v`quicktype-version`> distributed to testers" 39 | } -------------------------------------------------------------------------------- /quicktype/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 0 21 | CFBundleVersion 22 | 0 23 | LSApplicationCategoryType 24 | public.app-category.developer-tools 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2017 quicktype. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /quicktype/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "macos-16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "macos-16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "macos-32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "macos-32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "macos-128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "macos-128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "macos-256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "macos-256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "macos-512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "macos-512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /quicktype-xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | quicktype 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Paste JSON 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 0 21 | CFBundleVersion 22 | 0 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | XCSourceEditorCommandDefinitions 30 | 31 | 32 | XCSourceEditorCommandClassName 33 | $(PRODUCT_MODULE_NAME).PasteJSONCommand 34 | XCSourceEditorCommandIdentifier 35 | $(PRODUCT_BUNDLE_IDENTIFIER).PasteJSONAsCode 36 | XCSourceEditorCommandName 37 | Paste JSON as Code 38 | 39 | 40 | XCSourceEditorCommandClassName 41 | $(PRODUCT_MODULE_NAME).PasteJSONCommand 42 | XCSourceEditorCommandIdentifier 43 | $(PRODUCT_BUNDLE_IDENTIFIER).PasteJSONAsObjCHeader 44 | XCSourceEditorCommandName 45 | Paste JSON as Objective-C Header 46 | 47 | 48 | XCSourceEditorCommandClassName 49 | $(PRODUCT_MODULE_NAME).PasteJSONCommand 50 | XCSourceEditorCommandIdentifier 51 | $(PRODUCT_BUNDLE_IDENTIFIER).PasteJSONAsObjCImplementation 52 | XCSourceEditorCommandName 53 | Paste JSON as Objective-C Implementation 54 | 55 | 56 | XCSourceEditorExtensionPrincipalClass 57 | $(PRODUCT_MODULE_NAME).SourceEditorExtension 58 | 59 | NSExtensionPointIdentifier 60 | com.apple.dt.Xcode.extension.source-editor 61 | 62 | NSHumanReadableCopyright 63 | Copyright © 2017 quicktype. All rights reserved. 64 | 65 | 66 | -------------------------------------------------------------------------------- /quicktype-xcode.xcodeproj/xcshareddata/xcschemes/quicktype.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /quicktype/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import WebKit 3 | 4 | @NSApplicationMain 5 | class AppDelegate: NSObject, NSApplicationDelegate, WKNavigationDelegate, WKUIDelegate { 6 | 7 | @IBOutlet weak var window: NSWindow! 8 | @IBOutlet weak var webView: WKWebView! 9 | 10 | let repoUrl = URL(string: "https://github.com/quicktype/quicktype")! 11 | let issuesUrl = URL(string: "https://github.com/quicktype/quicktype-xcode/issues/new")! 12 | let aboutUrl = URL(string: "https://quicktype.io")! 13 | let appUrl = URL(string: "https://app.quicktype.io/#l=swift&context=xcode")! 14 | 15 | func showDialog() { 16 | let alert = NSAlert() 17 | alert.messageText = "quicktype's Xcode extension is ready to use" 18 | alert.informativeText = "Enable the extension in System Preferences → Extensions, then find \"Paste JSON as\" in Xcode's Editor menu." 19 | alert.alertStyle = .informational 20 | alert.addButton(withTitle: "Ok") 21 | alert.addButton(withTitle: "Open System Preferences") 22 | 23 | alert.beginSheetModal(for: window) { 24 | switch $0 { 25 | case .alertSecondButtonReturn: 26 | NSWorkspace.shared.open(URL(string: "/System/Library/PreferencePanes/Extensions.prefPane")!) 27 | break; 28 | case .alertThirdButtonReturn: 29 | break; 30 | default: 31 | break; 32 | } 33 | } 34 | } 35 | 36 | @IBAction func openGitHub(_ sender: Any) { 37 | NSWorkspace.shared.open(repoUrl) 38 | } 39 | 40 | @IBAction func showAbout(_ sender: Any) { 41 | NSWorkspace.shared.open(aboutUrl) 42 | } 43 | 44 | @IBAction func showHelp(_ sender: Any) { 45 | NSWorkspace.shared.open(self.issuesUrl) 46 | } 47 | 48 | var isFirstRun: Bool { 49 | get { return !UserDefaults.standard.bool(forKey: "hasRunBefore") } 50 | set(value) { UserDefaults.standard.set(!value, forKey: "hasRunBefore") } 51 | } 52 | 53 | func openExternalLink(_ navigationAction: WKNavigationAction) { 54 | if let url = navigationAction.request.url { 55 | NSWorkspace.shared.open(url) 56 | } 57 | } 58 | 59 | func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { 60 | 61 | func isExternal(_ url: URL) -> Bool { 62 | let s = url.absoluteString 63 | return s.starts(with: "http") && !s.starts(with: "https://app.quicktype.io") 64 | } 65 | 66 | if let url = navigationAction.request.url { 67 | if isExternal(url) { 68 | openExternalLink(navigationAction) 69 | decisionHandler(.cancel) 70 | } else { 71 | decisionHandler(.allow) 72 | } 73 | } else { 74 | decisionHandler(.allow) 75 | } 76 | } 77 | 78 | func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? { 79 | if navigationAction.targetFrame == nil { 80 | openExternalLink(navigationAction) 81 | } 82 | return nil 83 | } 84 | 85 | func applicationDidFinishLaunching(_ aNotification: Notification) { 86 | window.makeKeyAndOrderFront(self) 87 | 88 | webView.navigationDelegate = self 89 | webView.uiDelegate = self 90 | webView.load(URLRequest(url: appUrl)) 91 | 92 | if isFirstRun { 93 | showDialog() 94 | isFirstRun = false 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /quicktype-xcode.xcodeproj/xcshareddata/xcschemes/quicktype-xcode.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 69 | 73 | 74 | 75 | 81 | 82 | 83 | 84 | 91 | 93 | 99 | 100 | 101 | 102 | 104 | 105 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /quicktype-xcode/Runtime.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import JavaScriptCore 3 | 4 | enum Language: String { 5 | case swift, java, cpp, objc, objcHeader 6 | } 7 | 8 | fileprivate let languageUTIs: [CFString: Language] = [ 9 | kUTTypeSwiftSource: .swift, 10 | kUTTypeObjectiveCSource: .objc, 11 | kUTTypeCHeader: .objc, 12 | kUTTypeJavaSource: .java, 13 | kUTTypeCPlusPlusSource: .cpp, 14 | kUTTypeObjectiveCPlusPlusSource: .objc, 15 | "com.apple.dt.playground" as CFString: .swift 16 | ] 17 | 18 | func languageFor(contentUTI: CFString) -> Language? { 19 | print(contentUTI) 20 | for (uti, language) in languageUTIs { 21 | if UTTypeConformsTo(contentUTI as CFString, uti) { 22 | return language 23 | } 24 | } 25 | return nil 26 | } 27 | 28 | class Runtime { 29 | public static let shared = Runtime() 30 | 31 | var context: JSContext! 32 | 33 | let preface = [ 34 | "Generated with quicktype", 35 | "For more options, try https://app.quicktype.io" 36 | ] 37 | 38 | private init() { 39 | } 40 | 41 | var isInitialized: Bool { 42 | return nil != context 43 | } 44 | 45 | var _quicktypeJavaScript: String? 46 | var quicktypeJavaScript: String? { 47 | if nil == _quicktypeJavaScript { 48 | guard let javascriptPath = Bundle.main.url(forResource: "quicktype", withExtension: "js") else { return nil } 49 | guard let data = try? Data(contentsOf: javascriptPath) else { return nil } 50 | _quicktypeJavaScript = String(data: data, encoding: .utf8) 51 | } 52 | 53 | return _quicktypeJavaScript 54 | } 55 | 56 | func initialize() -> Bool { 57 | guard let context = JSContext() else { return false } 58 | 59 | context.exceptionHandler = { context, exception in 60 | print("JS Error: \(exception?.description ?? "unknown error")") 61 | } 62 | 63 | context.evaluateScript(""" 64 | var window = {}; 65 | var setTimeout = function(f) { f(); }; 66 | var clearTimeout = function() {}; 67 | var console = {}; 68 | """) 69 | 70 | let consoleLog: @convention(block) (Any) -> Void = { print($0) } 71 | context.objectForKeyedSubscript("console").setObject(consoleLog, forKeyedSubscript: "log" as NSString) 72 | 73 | guard let javascript = quicktypeJavaScript else { return false } 74 | context.evaluateScript(javascript) 75 | 76 | self.context = context 77 | 78 | return true 79 | } 80 | 81 | private func resolve(resolve: @escaping ([String]) -> Void) { 82 | let resolveBlock: @convention(block) ([String]) -> Void = { resolve($0) } 83 | context.setObject(resolveBlock, forKeyedSubscript: "resolve" as NSString) 84 | } 85 | 86 | private func reject(reject: @escaping (String) -> Void) { 87 | let rejectBlock: @convention(block) (String) -> Void = { reject($0) } 88 | context.setObject(rejectBlock, forKeyedSubscript: "reject" as NSString) 89 | } 90 | 91 | func renderOptionsToJavaScriptObject(_ options: [String: Any]) -> String { 92 | return "{ " + options.map { key, value in 93 | var javaScriptValue = "\(value)" 94 | 95 | switch value { 96 | case is String: javaScriptValue = "\"\(value)\"" 97 | default: break 98 | } 99 | 100 | return "\"\(key)\": \(javaScriptValue)" 101 | }.joined(separator: ", ") + " }" 102 | } 103 | 104 | func quicktype(_ json: String, topLevel: String, language: Language, options: [String: Any], fail: @escaping (String) -> Void, success: @escaping ([String]) -> Void) { 105 | // .header (C header files) are assumed to be Objective-C headers 106 | if language == .objcHeader { 107 | return quicktype(json, topLevel: topLevel, language:.objc, options: options, fail: fail, success: success) 108 | } 109 | 110 | resolve { lines in success(lines) } 111 | reject { errorMessage in fail(errorMessage) } 112 | 113 | let comments = preface.map { "\"\($0)\"" }.joined(separator: ",") 114 | 115 | context.evaluateScript(""" 116 | function swifttype(json) { 117 | window.quicktype.quicktype({ 118 | lang: "\(language.rawValue)", 119 | sources: [{ 120 | kind: "json", 121 | name: "\(topLevel)", 122 | samples: [json] 123 | }], 124 | leadingComments: [\(comments)], 125 | rendererOptions: \(renderOptionsToJavaScriptObject(options)), 126 | }).then(function(result) { 127 | resolve(result.lines); 128 | }).catch(function(e) { 129 | reject(e.toString()); 130 | }); 131 | } 132 | """) 133 | 134 | let swifttype = context.objectForKeyedSubscript("swifttype")! 135 | swifttype.call(withArguments: [json]) 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /quicktype-xcode/PasteJSONCommand.swift: -------------------------------------------------------------------------------- 1 | 2 | import Foundation 3 | import AppKit 4 | 5 | import XcodeKit 6 | 7 | typealias Invocation = XCSourceEditorCommandInvocation 8 | 9 | // Commands correspond to definitions in Info.plist 10 | enum Command: String { 11 | case pasteJSONAsCode = "PasteJSONAsCode" 12 | case pasteJSONAsObjCHeader = "PasteJSONAsObjCHeader" 13 | case pasteJSONAsObjCImplementation = "PasteJSONAsObjCImplementation" 14 | } 15 | 16 | // "io.quicktype.quicktype-xcode.X" -> Command(rawValue: "X") 17 | func command(identifier: String) -> Command? { 18 | guard let component = identifier.split(separator: ".").last else { 19 | return nil 20 | } 21 | return Command(rawValue: String(component)) 22 | } 23 | 24 | let commandOptions: [Language: [String: Any]] = [ 25 | .objc: [ 26 | // Objective-C is not ideal yet, so extra comments are useful 27 | "extra-comments": true 28 | ], 29 | .objcHeader: ["features": "interface"], 30 | .swift: ["initializers": true] 31 | ] 32 | 33 | class PasteJSONCommand: NSObject, XCSourceEditorCommand { 34 | func error(_ message: String, details: String = "No details") -> NSError { 35 | return NSError(domain: "quicktype", code: 1, userInfo: [ 36 | NSLocalizedDescriptionKey: NSLocalizedString(message, comment: ""), 37 | NSLocalizedFailureReasonErrorKey: NSLocalizedString(details, comment: "") 38 | ]) 39 | } 40 | 41 | func getFirstSelection(_ buffer: XCSourceTextBuffer) -> XCSourceTextRange? { 42 | for range in buffer.selections { 43 | guard let range = range as? XCSourceTextRange else { 44 | continue 45 | } 46 | return range 47 | } 48 | return nil 49 | } 50 | 51 | func isBlank(_ line: String) -> Bool { 52 | return line.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty 53 | } 54 | 55 | func isComment(_ line: String) -> Bool { 56 | return line.starts(with: "//") 57 | } 58 | 59 | func isImport(_ line: String) -> Bool { 60 | // TODO we should split this functionality by current source language 61 | return ["import ", "#include ", "#import "].firstIndex { line.starts(with: $0) } != nil 62 | } 63 | 64 | func trimStart(_ lines: [String]) -> [String] { 65 | // Remove leading imports, comments, whitespace from start and end 66 | return Array(lines.drop(while: { line in 67 | return isComment(line) || isBlank(line) || isImport(line) 68 | })) 69 | } 70 | 71 | func trimEnd(_ lines: [String]) -> [String] { 72 | return Array(lines 73 | .reversed() 74 | .drop { isBlank($0) || isComment($0) } 75 | .reversed() 76 | ) 77 | } 78 | 79 | func insertingAfterCode(_ buffer: XCSourceTextBuffer, _ selection: XCSourceTextRange) -> Bool { 80 | for i in 0.. String { 91 | // By default, new Objective-C files start like this: 92 | 93 | // 94 | // QTFileName.h 95 | 96 | // So we simply look at the second line of the buffer to attempt to 97 | // guess the filename, so we can provide a better class prefix and top-level name 98 | 99 | let lines = buffer.lines as! [String] 100 | let selection = getFirstSelection(buffer) ?? XCSourceTextRange() 101 | if lines.count > 1 { 102 | let line = lines[1] as String 103 | if let _ = line.range(of: "// (.+).(\\w+)", options: .regularExpression, range: nil, locale: nil) { 104 | let topLevel = String(line.dropFirst(4).prefix { $0 != "." }) 105 | 106 | // There must be no other occurrences outside of the selection 107 | var matches = 0 108 | for (index, element) in lines.enumerated() { 109 | if isImport(element) { continue } 110 | 111 | let outsideSelection = index < selection.start.line || index > selection.end.line 112 | if outsideSelection && element.range(of: topLevel) != nil { 113 | matches += 1 114 | } 115 | } 116 | if matches == 1 { 117 | return topLevel 118 | } 119 | } 120 | } 121 | return "TopLevel" 122 | } 123 | 124 | func classPrefixFromClass(_ name: String) -> String? { 125 | func isUppercase(_ c: Character) -> Bool { 126 | for scalar in c.unicodeScalars { 127 | if !CharacterSet.uppercaseLetters.contains(scalar) { 128 | return false 129 | } 130 | } 131 | return true 132 | } 133 | let prefix = name.prefix { isUppercase($0) }.dropLast() 134 | return prefix.isEmpty ? nil : String(prefix) 135 | } 136 | 137 | func handleSuccess(lines: [String], _ invocation: Invocation, _ completionHandler: @escaping (Error?) -> Void) { 138 | let buffer = invocation.buffer 139 | let selection = getFirstSelection(invocation.buffer) ?? XCSourceTextRange() 140 | 141 | // If we're pasting in the middle of anything, we omit imports 142 | let cleanLines = insertingAfterCode(buffer, selection) 143 | ? trimEnd(trimStart(lines)) 144 | : trimEnd(lines) 145 | 146 | let selectionEmpty = 147 | selection.start.line == selection.end.line && 148 | selection.start.column == selection.end.column 149 | 150 | if !selectionEmpty { 151 | let selectedIndices = selection.end.line == buffer.lines.count 152 | ? selection.start.line...(selection.end.line - 1) 153 | : selection.start.line...selection.end.line 154 | 155 | buffer.lines.removeObjects(at: IndexSet(selectedIndices)) 156 | } 157 | 158 | let insertedIndices = selection.start.line..<(selection.start.line + cleanLines.count) 159 | buffer.lines.insert(cleanLines, at: IndexSet(insertedIndices)) 160 | 161 | // Clear any selections 162 | buffer.selections.removeAllObjects() 163 | let cursorPosition = XCSourceTextPosition(line: selection.start.line, column: 0) 164 | buffer.selections.add(XCSourceTextRange(start: cursorPosition, end: cursorPosition)) 165 | 166 | completionHandler(nil) 167 | } 168 | 169 | func handleError(message: String, _ invocation: Invocation, _ completionHandler: @escaping (Error?) -> Void) { 170 | // Sometimes an error ruins our Runtime, so let's reinitialize it 171 | print("quicktype encountered an error: \(message)") 172 | if Runtime.shared.initialize() { 173 | print("quicktype runtime reinitialized") 174 | } else { 175 | print("quicktype runtime could not be reinitialized") 176 | } 177 | 178 | let displayMessage = message.contains("cannot parse input") 179 | ? "Clipboard does not contain valid JSON" 180 | : "quicktype encountered an internal error" 181 | 182 | completionHandler(error(displayMessage, details: message)) 183 | } 184 | 185 | func getTarget(_ command: Command, _ invocation: Invocation) -> (language: Language, options: [String: Any])? { 186 | switch command { 187 | case .pasteJSONAsObjCHeader: 188 | return (.objc, ["features": "interface"]) 189 | case .pasteJSONAsObjCImplementation: 190 | return (.objc, ["features": "implementation"]) 191 | default: 192 | if let language = languageFor(contentUTI: invocation.buffer.contentUTI as CFString) { 193 | return(language, commandOptions[language] ?? [:]) 194 | } 195 | } 196 | return nil 197 | } 198 | 199 | func perform(with invocation: Invocation, completionHandler: @escaping (Error?) -> Void) -> Void { 200 | guard let command = command(identifier: invocation.commandIdentifier) else { 201 | completionHandler(error("Unrecognized command")) 202 | return 203 | } 204 | 205 | guard let (language, options) = getTarget(command, invocation) else { 206 | completionHandler(error("Cannot generate code for \(invocation.buffer.contentUTI)")) 207 | return 208 | } 209 | 210 | let runtime = Runtime.shared 211 | 212 | if !runtime.isInitialized && !runtime.initialize() { 213 | completionHandler(error("Couldn't initialize type engine")) 214 | return 215 | } 216 | 217 | guard let json = NSPasteboard.general.string(forType: .string) else { 218 | completionHandler(error("Couldn't get JSON from clipboard")) 219 | return 220 | } 221 | 222 | var finalOptions = options 223 | let topLevel = inferTopLevelNameFromBuffer(invocation.buffer) 224 | // For Objective-C, we try to infer the class prefix 225 | if language == .objc { 226 | if let classPrefix = classPrefixFromClass(topLevel) { 227 | finalOptions = options.merging(["class-prefix": classPrefix], uniquingKeysWith: { $1 }) 228 | } 229 | } 230 | 231 | runtime.quicktype(json, 232 | topLevel: topLevel, 233 | language: language, 234 | options: finalOptions, 235 | fail: { self.handleError(message: $0, invocation, completionHandler) }, 236 | success: { self.handleSuccess(lines: $0, invocation, completionHandler) }) 237 | } 238 | } 239 | -------------------------------------------------------------------------------- /media/download.svg: -------------------------------------------------------------------------------- 1 | 2 | Download_on_the_Mac_App_Store_Badge_US-UK_RGB_blk_092917 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /media/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 7 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /quicktype/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | -------------------------------------------------------------------------------- /quicktype-xcode.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6317CD021FECC5DC006CCFC1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6317CD011FECC5DC006CCFC1 /* AppDelegate.swift */; }; 11 | 6317CD041FECC5DC006CCFC1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6317CD031FECC5DC006CCFC1 /* Assets.xcassets */; }; 12 | 6317CD071FECC5DC006CCFC1 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6317CD051FECC5DC006CCFC1 /* MainMenu.xib */; }; 13 | 6317CD161FECC654006CCFC1 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6317CD151FECC654006CCFC1 /* Cocoa.framework */; }; 14 | 6317CD191FECC654006CCFC1 /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6317CD181FECC654006CCFC1 /* SourceEditorExtension.swift */; }; 15 | 6317CD1B1FECC654006CCFC1 /* PasteJSONCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6317CD1A1FECC654006CCFC1 /* PasteJSONCommand.swift */; }; 16 | 6317CD201FECC654006CCFC1 /* quicktype-xcode.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6317CD131FECC654006CCFC1 /* quicktype-xcode.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 17 | 6349B5AD1FECF39D00F7AA42 /* quicktype.js in Resources */ = {isa = PBXBuildFile; fileRef = 6349B5AC1FECF39D00F7AA42 /* quicktype.js */; }; 18 | 63BCCEDF1FED99AD00E1C1DB /* Runtime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63BCCEDE1FED99AD00E1C1DB /* Runtime.swift */; }; 19 | D877021225F7EAE5002E3EA3 /* XcodeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D877021125F7EAE5002E3EA3 /* XcodeKit.framework */; }; 20 | D877021325F7EAE5002E3EA3 /* XcodeKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D877021125F7EAE5002E3EA3 /* XcodeKit.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 6317CD1E1FECC654006CCFC1 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 6317CCF61FECC5DC006CCFC1 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 6317CD121FECC654006CCFC1; 29 | remoteInfo = quicktype; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXCopyFilesBuildPhase section */ 34 | 6317CD241FECC654006CCFC1 /* Embed App Extensions */ = { 35 | isa = PBXCopyFilesBuildPhase; 36 | buildActionMask = 2147483647; 37 | dstPath = ""; 38 | dstSubfolderSpec = 13; 39 | files = ( 40 | 6317CD201FECC654006CCFC1 /* quicktype-xcode.appex in Embed App Extensions */, 41 | ); 42 | name = "Embed App Extensions"; 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | D877021425F7EAE5002E3EA3 /* Embed Frameworks */ = { 46 | isa = PBXCopyFilesBuildPhase; 47 | buildActionMask = 2147483647; 48 | dstPath = ""; 49 | dstSubfolderSpec = 10; 50 | files = ( 51 | D877021325F7EAE5002E3EA3 /* XcodeKit.framework in Embed Frameworks */, 52 | ); 53 | name = "Embed Frameworks"; 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXCopyFilesBuildPhase section */ 57 | 58 | /* Begin PBXFileReference section */ 59 | 6317CCFE1FECC5DC006CCFC1 /* Paste JSON as Code • quicktype.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Paste JSON as Code • quicktype.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 6317CD011FECC5DC006CCFC1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 61 | 6317CD031FECC5DC006CCFC1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 62 | 6317CD061FECC5DC006CCFC1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 63 | 6317CD081FECC5DC006CCFC1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 6317CD091FECC5DC006CCFC1 /* quicktype_xcode.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = quicktype_xcode.entitlements; sourceTree = ""; }; 65 | 6317CD131FECC654006CCFC1 /* quicktype-xcode.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "quicktype-xcode.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 6317CD151FECC654006CCFC1 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 67 | 6317CD181FECC654006CCFC1 /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; }; 68 | 6317CD1A1FECC654006CCFC1 /* PasteJSONCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasteJSONCommand.swift; sourceTree = ""; }; 69 | 6317CD1C1FECC654006CCFC1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 70 | 6317CD1D1FECC654006CCFC1 /* quicktype.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = quicktype.entitlements; sourceTree = ""; }; 71 | 6349B5AC1FECF39D00F7AA42 /* quicktype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = quicktype.js; sourceTree = ""; }; 72 | 63A69E26201979880069EE72 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 73 | 63BCCEDE1FED99AD00E1C1DB /* Runtime.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Runtime.swift; sourceTree = ""; }; 74 | D877021125F7EAE5002E3EA3 /* XcodeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XcodeKit.framework; path = Library/Frameworks/XcodeKit.framework; sourceTree = DEVELOPER_DIR; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | 6317CCFB1FECC5DC006CCFC1 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | 6317CD101FECC654006CCFC1 /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | D877021225F7EAE5002E3EA3 /* XcodeKit.framework in Frameworks */, 90 | 6317CD161FECC654006CCFC1 /* Cocoa.framework in Frameworks */, 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | /* End PBXFrameworksBuildPhase section */ 95 | 96 | /* Begin PBXGroup section */ 97 | 6317CCF51FECC5DC006CCFC1 = { 98 | isa = PBXGroup; 99 | children = ( 100 | 63A69E26201979880069EE72 /* README.md */, 101 | 6317CD001FECC5DC006CCFC1 /* quicktype */, 102 | 6317CD171FECC654006CCFC1 /* quicktype-xcode */, 103 | 6317CD141FECC654006CCFC1 /* Frameworks */, 104 | 6317CCFF1FECC5DC006CCFC1 /* Products */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 6317CCFF1FECC5DC006CCFC1 /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 6317CCFE1FECC5DC006CCFC1 /* Paste JSON as Code • quicktype.app */, 112 | 6317CD131FECC654006CCFC1 /* quicktype-xcode.appex */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 6317CD001FECC5DC006CCFC1 /* quicktype */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 6317CD011FECC5DC006CCFC1 /* AppDelegate.swift */, 121 | 6317CD031FECC5DC006CCFC1 /* Assets.xcassets */, 122 | 6317CD051FECC5DC006CCFC1 /* MainMenu.xib */, 123 | 6317CD081FECC5DC006CCFC1 /* Info.plist */, 124 | 6317CD091FECC5DC006CCFC1 /* quicktype_xcode.entitlements */, 125 | ); 126 | path = quicktype; 127 | sourceTree = ""; 128 | }; 129 | 6317CD141FECC654006CCFC1 /* Frameworks */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | D877021125F7EAE5002E3EA3 /* XcodeKit.framework */, 133 | 6317CD151FECC654006CCFC1 /* Cocoa.framework */, 134 | ); 135 | name = Frameworks; 136 | sourceTree = ""; 137 | }; 138 | 6317CD171FECC654006CCFC1 /* quicktype-xcode */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 6349B5AC1FECF39D00F7AA42 /* quicktype.js */, 142 | 6317CD181FECC654006CCFC1 /* SourceEditorExtension.swift */, 143 | 6317CD1A1FECC654006CCFC1 /* PasteJSONCommand.swift */, 144 | 63BCCEDE1FED99AD00E1C1DB /* Runtime.swift */, 145 | 6317CD1C1FECC654006CCFC1 /* Info.plist */, 146 | 6317CD1D1FECC654006CCFC1 /* quicktype.entitlements */, 147 | ); 148 | path = "quicktype-xcode"; 149 | sourceTree = ""; 150 | }; 151 | /* End PBXGroup section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 6317CCFD1FECC5DC006CCFC1 /* quicktype */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 6317CD0C1FECC5DC006CCFC1 /* Build configuration list for PBXNativeTarget "quicktype" */; 157 | buildPhases = ( 158 | 6317CCFA1FECC5DC006CCFC1 /* Sources */, 159 | 6317CCFB1FECC5DC006CCFC1 /* Frameworks */, 160 | 6317CCFC1FECC5DC006CCFC1 /* Resources */, 161 | 6317CD241FECC654006CCFC1 /* Embed App Extensions */, 162 | ); 163 | buildRules = ( 164 | ); 165 | dependencies = ( 166 | 6317CD1F1FECC654006CCFC1 /* PBXTargetDependency */, 167 | ); 168 | name = quicktype; 169 | packageProductDependencies = ( 170 | ); 171 | productName = "quicktype-xcode"; 172 | productReference = 6317CCFE1FECC5DC006CCFC1 /* Paste JSON as Code • quicktype.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | 6317CD121FECC654006CCFC1 /* quicktype-xcode */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 6317CD211FECC654006CCFC1 /* Build configuration list for PBXNativeTarget "quicktype-xcode" */; 178 | buildPhases = ( 179 | 6317CD0F1FECC654006CCFC1 /* Sources */, 180 | 6317CD101FECC654006CCFC1 /* Frameworks */, 181 | 6317CD111FECC654006CCFC1 /* Resources */, 182 | D877021425F7EAE5002E3EA3 /* Embed Frameworks */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = "quicktype-xcode"; 189 | packageProductDependencies = ( 190 | ); 191 | productName = quicktype; 192 | productReference = 6317CD131FECC654006CCFC1 /* quicktype-xcode.appex */; 193 | productType = "com.apple.product-type.xcode-extension"; 194 | }; 195 | /* End PBXNativeTarget section */ 196 | 197 | /* Begin PBXProject section */ 198 | 6317CCF61FECC5DC006CCFC1 /* Project object */ = { 199 | isa = PBXProject; 200 | attributes = { 201 | LastSwiftUpdateCheck = 0900; 202 | LastUpgradeCheck = 1240; 203 | ORGANIZATIONNAME = quicktype; 204 | TargetAttributes = { 205 | 6317CCFD1FECC5DC006CCFC1 = { 206 | CreatedOnToolsVersion = 9.0; 207 | LastSwiftMigration = 1240; 208 | ProvisioningStyle = Automatic; 209 | }; 210 | 6317CD121FECC654006CCFC1 = { 211 | CreatedOnToolsVersion = 9.0; 212 | LastSwiftMigration = 1240; 213 | ProvisioningStyle = Automatic; 214 | }; 215 | }; 216 | }; 217 | buildConfigurationList = 6317CCF91FECC5DC006CCFC1 /* Build configuration list for PBXProject "quicktype-xcode" */; 218 | compatibilityVersion = "Xcode 8.0"; 219 | developmentRegion = en; 220 | hasScannedForEncodings = 0; 221 | knownRegions = ( 222 | en, 223 | Base, 224 | ); 225 | mainGroup = 6317CCF51FECC5DC006CCFC1; 226 | packageReferences = ( 227 | ); 228 | productRefGroup = 6317CCFF1FECC5DC006CCFC1 /* Products */; 229 | projectDirPath = ""; 230 | projectRoot = ""; 231 | targets = ( 232 | 6317CCFD1FECC5DC006CCFC1 /* quicktype */, 233 | 6317CD121FECC654006CCFC1 /* quicktype-xcode */, 234 | ); 235 | }; 236 | /* End PBXProject section */ 237 | 238 | /* Begin PBXResourcesBuildPhase section */ 239 | 6317CCFC1FECC5DC006CCFC1 /* Resources */ = { 240 | isa = PBXResourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 6317CD041FECC5DC006CCFC1 /* Assets.xcassets in Resources */, 244 | 6317CD071FECC5DC006CCFC1 /* MainMenu.xib in Resources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 6317CD111FECC654006CCFC1 /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 6349B5AD1FECF39D00F7AA42 /* quicktype.js in Resources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXResourcesBuildPhase section */ 257 | 258 | /* Begin PBXSourcesBuildPhase section */ 259 | 6317CCFA1FECC5DC006CCFC1 /* Sources */ = { 260 | isa = PBXSourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 6317CD021FECC5DC006CCFC1 /* AppDelegate.swift in Sources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | 6317CD0F1FECC654006CCFC1 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 6317CD191FECC654006CCFC1 /* SourceEditorExtension.swift in Sources */, 272 | 63BCCEDF1FED99AD00E1C1DB /* Runtime.swift in Sources */, 273 | 6317CD1B1FECC654006CCFC1 /* PasteJSONCommand.swift in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | /* End PBXSourcesBuildPhase section */ 278 | 279 | /* Begin PBXTargetDependency section */ 280 | 6317CD1F1FECC654006CCFC1 /* PBXTargetDependency */ = { 281 | isa = PBXTargetDependency; 282 | target = 6317CD121FECC654006CCFC1 /* quicktype-xcode */; 283 | targetProxy = 6317CD1E1FECC654006CCFC1 /* PBXContainerItemProxy */; 284 | }; 285 | /* End PBXTargetDependency section */ 286 | 287 | /* Begin PBXVariantGroup section */ 288 | 6317CD051FECC5DC006CCFC1 /* MainMenu.xib */ = { 289 | isa = PBXVariantGroup; 290 | children = ( 291 | 6317CD061FECC5DC006CCFC1 /* Base */, 292 | ); 293 | name = MainMenu.xib; 294 | sourceTree = ""; 295 | }; 296 | /* End PBXVariantGroup section */ 297 | 298 | /* Begin XCBuildConfiguration section */ 299 | 6317CD0A1FECC5DC006CCFC1 /* Debug */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | ALWAYS_SEARCH_USER_PATHS = NO; 303 | CLANG_ANALYZER_NONNULL = YES; 304 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_MODULES = YES; 308 | CLANG_ENABLE_OBJC_ARC = YES; 309 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 310 | CLANG_WARN_BOOL_CONVERSION = YES; 311 | CLANG_WARN_COMMA = YES; 312 | CLANG_WARN_CONSTANT_CONVERSION = YES; 313 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 314 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 315 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 316 | CLANG_WARN_EMPTY_BODY = YES; 317 | CLANG_WARN_ENUM_CONVERSION = YES; 318 | CLANG_WARN_INFINITE_RECURSION = YES; 319 | CLANG_WARN_INT_CONVERSION = YES; 320 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 322 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | CODE_SIGN_IDENTITY = "Mac Developer"; 332 | COPY_PHASE_STRIP = NO; 333 | DEBUG_INFORMATION_FORMAT = dwarf; 334 | ENABLE_STRICT_OBJC_MSGSEND = YES; 335 | ENABLE_TESTABILITY = YES; 336 | GCC_C_LANGUAGE_STANDARD = gnu11; 337 | GCC_DYNAMIC_NO_PIC = NO; 338 | GCC_NO_COMMON_BLOCKS = YES; 339 | GCC_OPTIMIZATION_LEVEL = 0; 340 | GCC_PREPROCESSOR_DEFINITIONS = ( 341 | "DEBUG=1", 342 | "$(inherited)", 343 | ); 344 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 345 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 346 | GCC_WARN_UNDECLARED_SELECTOR = YES; 347 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 348 | GCC_WARN_UNUSED_FUNCTION = YES; 349 | GCC_WARN_UNUSED_VARIABLE = YES; 350 | MACOSX_DEPLOYMENT_TARGET = 11.1; 351 | MTL_ENABLE_DEBUG_INFO = YES; 352 | ONLY_ACTIVE_ARCH = YES; 353 | SDKROOT = macosx; 354 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 355 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 356 | }; 357 | name = Debug; 358 | }; 359 | 6317CD0B1FECC5DC006CCFC1 /* Release */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | ALWAYS_SEARCH_USER_PATHS = NO; 363 | CLANG_ANALYZER_NONNULL = YES; 364 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 366 | CLANG_CXX_LIBRARY = "libc++"; 367 | CLANG_ENABLE_MODULES = YES; 368 | CLANG_ENABLE_OBJC_ARC = YES; 369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_COMMA = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 376 | CLANG_WARN_EMPTY_BODY = YES; 377 | CLANG_WARN_ENUM_CONVERSION = YES; 378 | CLANG_WARN_INFINITE_RECURSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 382 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 386 | CLANG_WARN_STRICT_PROTOTYPES = YES; 387 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 388 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 389 | CLANG_WARN_UNREACHABLE_CODE = YES; 390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 391 | CODE_SIGN_IDENTITY = "Mac Developer"; 392 | COPY_PHASE_STRIP = NO; 393 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 394 | ENABLE_NS_ASSERTIONS = NO; 395 | ENABLE_STRICT_OBJC_MSGSEND = YES; 396 | GCC_C_LANGUAGE_STANDARD = gnu11; 397 | GCC_NO_COMMON_BLOCKS = YES; 398 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 399 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 400 | GCC_WARN_UNDECLARED_SELECTOR = YES; 401 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 402 | GCC_WARN_UNUSED_FUNCTION = YES; 403 | GCC_WARN_UNUSED_VARIABLE = YES; 404 | MACOSX_DEPLOYMENT_TARGET = 11.1; 405 | MTL_ENABLE_DEBUG_INFO = NO; 406 | SDKROOT = macosx; 407 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 408 | }; 409 | name = Release; 410 | }; 411 | 6317CD0D1FECC5DC006CCFC1 /* Debug */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 415 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 416 | CODE_SIGN_ENTITLEMENTS = quicktype/quicktype_xcode.entitlements; 417 | CODE_SIGN_IDENTITY = "Apple Development"; 418 | CODE_SIGN_STYLE = Automatic; 419 | COMBINE_HIDPI_IMAGES = YES; 420 | DEVELOPMENT_TEAM = W9D824R4EW; 421 | DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC = YES; 422 | ENABLE_HARDENED_RUNTIME = YES; 423 | INFOPLIST_FILE = quicktype/Info.plist; 424 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 425 | PRODUCT_BUNDLE_IDENTIFIER = io.quicktype.quicktype; 426 | PRODUCT_NAME = "Paste JSON as Code • quicktype"; 427 | PROVISIONING_PROFILE_SPECIFIER = ""; 428 | SWIFT_VERSION = 5.0; 429 | }; 430 | name = Debug; 431 | }; 432 | 6317CD0E1FECC5DC006CCFC1 /* Release */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | CODE_SIGN_ENTITLEMENTS = quicktype/quicktype_xcode.entitlements; 438 | CODE_SIGN_IDENTITY = "Apple Development"; 439 | CODE_SIGN_STYLE = Automatic; 440 | COMBINE_HIDPI_IMAGES = YES; 441 | DEVELOPMENT_TEAM = W9D824R4EW; 442 | DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC = YES; 443 | ENABLE_HARDENED_RUNTIME = YES; 444 | INFOPLIST_FILE = quicktype/Info.plist; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 446 | PRODUCT_BUNDLE_IDENTIFIER = io.quicktype.quicktype; 447 | PRODUCT_NAME = "Paste JSON as Code • quicktype"; 448 | PROVISIONING_PROFILE_SPECIFIER = ""; 449 | SWIFT_VERSION = 5.0; 450 | }; 451 | name = Release; 452 | }; 453 | 6317CD221FECC654006CCFC1 /* Debug */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | CODE_SIGN_ENTITLEMENTS = "quicktype-xcode/quicktype.entitlements"; 457 | CODE_SIGN_IDENTITY = "Mac Developer"; 458 | CODE_SIGN_STYLE = Automatic; 459 | COMBINE_HIDPI_IMAGES = YES; 460 | DEVELOPMENT_TEAM = W9D824R4EW; 461 | DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC = YES; 462 | ENABLE_HARDENED_RUNTIME = YES; 463 | INFOPLIST_FILE = "quicktype-xcode/Info.plist"; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 465 | PRODUCT_BUNDLE_IDENTIFIER = "io.quicktype.quicktype-xcode"; 466 | PRODUCT_NAME = "$(TARGET_NAME)"; 467 | PROVISIONING_PROFILE_SPECIFIER = ""; 468 | SKIP_INSTALL = YES; 469 | SWIFT_VERSION = 5.0; 470 | }; 471 | name = Debug; 472 | }; 473 | 6317CD231FECC654006CCFC1 /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | CODE_SIGN_ENTITLEMENTS = "quicktype-xcode/quicktype.entitlements"; 477 | CODE_SIGN_IDENTITY = "Mac Developer"; 478 | CODE_SIGN_STYLE = Automatic; 479 | COMBINE_HIDPI_IMAGES = YES; 480 | DEVELOPMENT_TEAM = W9D824R4EW; 481 | DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC = YES; 482 | ENABLE_HARDENED_RUNTIME = YES; 483 | INFOPLIST_FILE = "quicktype-xcode/Info.plist"; 484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 485 | PRODUCT_BUNDLE_IDENTIFIER = "io.quicktype.quicktype-xcode"; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | PROVISIONING_PROFILE_SPECIFIER = ""; 488 | SKIP_INSTALL = YES; 489 | SWIFT_VERSION = 5.0; 490 | }; 491 | name = Release; 492 | }; 493 | /* End XCBuildConfiguration section */ 494 | 495 | /* Begin XCConfigurationList section */ 496 | 6317CCF91FECC5DC006CCFC1 /* Build configuration list for PBXProject "quicktype-xcode" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | 6317CD0A1FECC5DC006CCFC1 /* Debug */, 500 | 6317CD0B1FECC5DC006CCFC1 /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 6317CD0C1FECC5DC006CCFC1 /* Build configuration list for PBXNativeTarget "quicktype" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 6317CD0D1FECC5DC006CCFC1 /* Debug */, 509 | 6317CD0E1FECC5DC006CCFC1 /* Release */, 510 | ); 511 | defaultConfigurationIsVisible = 0; 512 | defaultConfigurationName = Release; 513 | }; 514 | 6317CD211FECC654006CCFC1 /* Build configuration list for PBXNativeTarget "quicktype-xcode" */ = { 515 | isa = XCConfigurationList; 516 | buildConfigurations = ( 517 | 6317CD221FECC654006CCFC1 /* Debug */, 518 | 6317CD231FECC654006CCFC1 /* Release */, 519 | ); 520 | defaultConfigurationIsVisible = 0; 521 | defaultConfigurationName = Release; 522 | }; 523 | /* End XCConfigurationList section */ 524 | }; 525 | rootObject = 6317CCF61FECC5DC006CCFC1 /* Project object */; 526 | } 527 | --------------------------------------------------------------------------------