├── iDevBox
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── iDevBox.entitlements
├── HomeView.swift
├── SideBar.swift
├── AppDelegate.swift
├── Info.plist
├── TutorialView.swift
├── Commands
│ └── FormatJSON
│ │ └── FormatJSON.swift
└── Base.lproj
│ └── Main.storyboard
├── XcodeExtension
├── XcodeExtension.entitlements
├── SourceEditorExtension.swift
├── FormatJSONCommand.swift
└── Info.plist
├── iDevBoxFramework
├── Defaults.swift
├── iDevBoxFramework.h
├── Info.plist
└── JSONFormatter.swift
├── README.md
├── .gitignore
└── iDevBoxApp.xcodeproj
├── xcshareddata
└── xcschemes
│ └── iDevBoxKit.xcscheme
└── project.pbxproj
/iDevBox/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/iDevBox/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/XcodeExtension/XcodeExtension.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | $(TeamIdentifierPrefix)iDevBox
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/iDevBox/iDevBox.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | $(TeamIdentifierPrefix)iDevBox
10 |
11 | com.apple.security.files.user-selected.read-only
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/iDevBoxFramework/Defaults.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Defaults.swift
3 | // iDevBoxFramework
4 | //
5 | // Created by Lex on 2020/7/18.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import SwiftyUserDefaults
11 |
12 | extension DefaultsKeys {
13 | var useJavaScriptCore: DefaultsKey { .init("useJavaScriptCore", defaultValue: true) }
14 | }
15 |
16 | public struct Settings {
17 | @SwiftyUserDefault(keyPath: \.useJavaScriptCore)
18 | public static var useJavaScriptCore: Bool
19 | }
20 |
--------------------------------------------------------------------------------
/iDevBoxFramework/iDevBoxFramework.h:
--------------------------------------------------------------------------------
1 | //
2 | // iDevBoxFramework.h
3 | // iDevBoxFramework
4 | //
5 | // Created by Lex on 2020/7/18.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for iDevBoxFramework.
12 | FOUNDATION_EXPORT double iDevBoxFrameworkVersionNumber;
13 |
14 | //! Project version string for iDevBoxFramework.
15 | FOUNDATION_EXPORT const unsigned char iDevBoxFrameworkVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/iDevBox/HomeView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeView.swift
3 | // iDevBox
4 | //
5 | // Created by Lex on 2020/7/11.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import AppKit
10 | import SwiftUI
11 |
12 | struct HomeView: View {
13 | var body: some View {
14 | NavigationView {
15 | SideBar()
16 |
17 | TutorialView()
18 | }
19 | .frame(minWidth: 500, maxWidth: .infinity, minHeight: 400, maxHeight: .infinity)
20 | .navigationViewStyle(DoubleColumnNavigationViewStyle())
21 | }
22 | }
23 |
24 |
25 | struct HomeView_Previews: PreviewProvider {
26 | static var previews: some View {
27 | HomeView()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/XcodeExtension/SourceEditorExtension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorExtension.swift
3 | // XcodeExtension
4 | //
5 | // Created by Lex on 2020/7/11.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import XcodeKit
11 |
12 | class SourceEditorExtension: NSObject, XCSourceEditorExtension {
13 |
14 | /*
15 | func extensionDidFinishLaunching() {
16 | // If your extension needs to do any work at launch, implement this optional method.
17 | }
18 | */
19 |
20 | /*
21 | var commandDefinitions: [[XCSourceEditorCommandDefinitionKey: Any]] {
22 | // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter.
23 | return []
24 | }
25 | */
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/iDevBox/SideBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SideBar.swift
3 | // iDevBox
4 | //
5 | // Created by Lex on 2020/7/13.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 |
11 | struct SideBar: View {
12 |
13 | var body: some View {
14 | List {
15 | NavigationLink(destination: TutorialView()) {
16 | Text("How to use?")
17 | }
18 | NavigationLink(destination: FormatJSON()) {
19 | Text("Format JSON")
20 | }
21 | }
22 | .lineSpacing(15)
23 | .listStyle(SidebarListStyle())
24 | .frame(minWidth: 150, idealWidth: 150, maxWidth: 200, maxHeight: .infinity)
25 | .padding(.top, 15)
26 | }
27 | }
28 |
29 | struct Sidebar_Previews: PreviewProvider {
30 | static var previews: some View {
31 | SideBar()
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/iDevBoxFramework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSHumanReadableCopyright
22 | Copyright © 2020 Lex. All rights reserved.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # iDevBox
2 |
3 | Yet another learning-by-doing XcodeKit project
4 |
5 | [](https://swift.org/download/)
6 | [](https://twitter.com/lexrus)
7 |
8 | ## Features
9 |
10 | - [x] Format JSON
11 | - [ ] JSON to struct and Codable
12 | - [ ] .proto to struct and Codable
13 | - [ ] Create AppIcon.assets with a simple 1024x1024 image
14 | - [ ] Load external Swift files as commands
15 | - [ ] Translate selection with Google or Deepl
16 | - [ ] Transform strings between Simplified Chinese and Traditional Chinese
17 | - [ ] Resort delegates and datasources and group each into prague marks
18 | - [ ] Wrap current UIViewController or UIView into a SwiftUI View
19 | - [ ] Uncrustify, ClangFormat, SwiftFormat
20 | - [ ] ideas?
21 |
22 | ## LICENSE
23 |
24 | This code is distributed under the terms and conditions of the MIT license.
25 |
--------------------------------------------------------------------------------
/XcodeExtension/FormatJSONCommand.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FormatJSONCommand.swift
3 | // XcodeExtension
4 | //
5 | // Created by Lex on 2020/7/11.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import XcodeKit
11 | import JavaScriptCore
12 | import iDevBoxKit
13 |
14 | class FormatJSONCommand: NSObject, XCSourceEditorCommand {
15 |
16 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) -> Void {
17 | let lines = invocation.buffer.lines
18 |
19 | // FIXME: We should format the completeBuffer when nothing selected. Otherwise try format selection first.
20 | let sourceString = invocation.buffer.completeBuffer
21 |
22 | do {
23 | let formattedJSONString = try JSONFormatter.format(sourceString)
24 | lines.removeAllObjects()
25 | lines.addObjects(from: [formattedJSONString])
26 | completionHandler(nil)
27 | } catch {
28 | completionHandler(error)
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/iDevBox/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "scale" : "1x",
6 | "size" : "16x16"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "scale" : "2x",
11 | "size" : "16x16"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "scale" : "1x",
16 | "size" : "32x32"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "scale" : "2x",
21 | "size" : "32x32"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "scale" : "1x",
26 | "size" : "128x128"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "scale" : "2x",
31 | "size" : "128x128"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "scale" : "1x",
36 | "size" : "256x256"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "scale" : "2x",
41 | "size" : "256x256"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "scale" : "1x",
46 | "size" : "512x512"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "scale" : "2x",
51 | "size" : "512x512"
52 | }
53 | ],
54 | "info" : {
55 | "author" : "xcode",
56 | "version" : 1
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/iDevBox/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // iDevBox
4 | //
5 | // Created by Lex on 2020/7/11.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 | import SwiftUI
11 | import SwiftyUserDefaults
12 |
13 | @NSApplicationMain
14 | class AppDelegate: NSObject, NSApplicationDelegate {
15 |
16 | var window: NSWindow!
17 |
18 |
19 | func applicationDidFinishLaunching(_ aNotification: Notification) {
20 | // Create the SwiftUI view that provides the window contents.
21 | let contentView = HomeView()
22 |
23 | // Create the window and set the content view.
24 | window = NSWindow(
25 | contentRect: NSRect(x: 0, y: 0, width: 480, height: 300),
26 | styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView],
27 | backing: .buffered, defer: false)
28 | window.center()
29 | window.setFrameAutosaveName("Main Window")
30 | window.contentView = NSHostingView(rootView: contentView)
31 | window.makeKeyAndOrderFront(nil)
32 | window.title = "iDevBox"
33 | }
34 |
35 | func applicationWillTerminate(_ aNotification: Notification) {
36 | // Insert code here to tear down your application
37 | }
38 |
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/iDevBox/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2020 Lex. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 | NSSupportsAutomaticTermination
32 |
33 | NSSupportsSuddenTermination
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/iDevBox/TutorialView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TutorialView.swift
3 | // iDevBox
4 | //
5 | // Created by Lex on 2020/7/13.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 |
11 | struct TutorialView: View {
12 | fileprivate func stepView(_ step: Int, _ title: String) -> some View {
13 | return HStack {
14 | Text("\(step).")
15 | .font(.subheadline)
16 | .frame(minWidth: 15, alignment: .trailing)
17 | Text(title)
18 | }
19 | .padding([.top, .bottom], 7)
20 | .padding([.leading, .trailing], 15)
21 | .background(Color.blue)
22 | .clipShape(RoundedRectangle(cornerRadius: 20))
23 | }
24 |
25 | var body: some View {
26 | VStack(alignment: .leading) {
27 | Text("How To Use?")
28 | .font(.title)
29 | .fontWeight(.bold)
30 |
31 | VStack(alignment: .leading, spacing: 15) {
32 | stepView(1, "Open System Preferences")
33 | stepView(2, "Open Extensions")
34 | stepView(3, "Restart Xcode")
35 | stepView(4, "Editor -> iDevBox")
36 | }
37 | .padding(.top)
38 | .font(.subheadline)
39 | }
40 | .padding()
41 | .tabItem {
42 | Text("Tutorial")
43 | }
44 | .frame(maxWidth: .infinity, maxHeight: .infinity)
45 | }
46 | }
47 |
48 | struct TutorialView_Previews: PreviewProvider {
49 | static var previews: some View {
50 | TutorialView()
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.toptal.com/developers/gitignore/api/xcode,macos
3 | # Edit at https://www.toptal.com/developers/gitignore?templates=xcode,macos
4 |
5 | ### macOS ###
6 | # General
7 | .DS_Store
8 | .AppleDouble
9 | .LSOverride
10 |
11 | # Icon must end with two \r
12 | Icon
13 |
14 | # Thumbnails
15 | ._*
16 |
17 | # Files that might appear in the root of a volume
18 | .DocumentRevisions-V100
19 | .fseventsd
20 | .Spotlight-V100
21 | .TemporaryItems
22 | .Trashes
23 | .VolumeIcon.icns
24 | .com.apple.timemachine.donotpresent
25 |
26 | # Directories potentially created on remote AFP share
27 | .AppleDB
28 | .AppleDesktop
29 | Network Trash Folder
30 | Temporary Items
31 | .apdisk
32 |
33 | ### Xcode ###
34 | # Xcode
35 | #
36 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
37 |
38 | ## User settings
39 | xcuserdata/
40 |
41 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
42 | *.xcscmblueprint
43 | *.xccheckout
44 |
45 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
46 | build/
47 | DerivedData/
48 | *.moved-aside
49 | *.pbxuser
50 | !default.pbxuser
51 | *.mode1v3
52 | !default.mode1v3
53 | *.mode2v3
54 | !default.mode2v3
55 | *.perspectivev3
56 | !default.perspectivev3
57 |
58 | ## Gcc Patch
59 | /*.gcno
60 |
61 | ### Xcode Patch ###
62 | *.xcodeproj/*
63 | !*.xcodeproj/project.pbxproj
64 | !*.xcodeproj/xcshareddata/
65 | !*.xcworkspace/contents.xcworkspacedata
66 | **/xcshareddata/WorkspaceSettings.xcsettings
67 |
68 | # End of https://www.toptal.com/developers/gitignore/api/xcode,macos
69 |
--------------------------------------------------------------------------------
/XcodeExtension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | iDevBox
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | XCSourceEditorCommandDefinitions
30 |
31 |
32 | XCSourceEditorCommandClassName
33 | $(PRODUCT_MODULE_NAME).FormatJSONCommand
34 | XCSourceEditorCommandIdentifier
35 | $(PRODUCT_BUNDLE_IDENTIFIER).FormatJSONCommand
36 | XCSourceEditorCommandName
37 | Format JSON
38 |
39 |
40 | XCSourceEditorExtensionPrincipalClass
41 | $(PRODUCT_MODULE_NAME).SourceEditorExtension
42 |
43 | NSExtensionPointIdentifier
44 | com.apple.dt.Xcode.extension.source-editor
45 |
46 | NSHumanReadableCopyright
47 | Copyright © 2020 Lex. All rights reserved.
48 |
49 |
50 |
--------------------------------------------------------------------------------
/iDevBoxFramework/JSONFormatter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JSONFormatter.swift
3 | // iDevBoxKit
4 | //
5 | // Created by Lex on 2020/7/26.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import JavaScriptCore
11 |
12 | public enum FormatJSONError : Error {
13 | case bufferError
14 | case invalidJSON
15 | case invalidData
16 | case jsContextFailure
17 | case failedToFormat
18 | }
19 |
20 | public enum FormatEngine {
21 | case jsonSerializer
22 | case javaScriptCore
23 | }
24 |
25 | public struct JSONFormatter {
26 |
27 | private static var formatEngine: FormatEngine {
28 | Settings.useJavaScriptCore ? .javaScriptCore : .jsonSerializer
29 | }
30 |
31 | public static func format(_ string: String, usesTabsForIndentation: Bool = false, indentationWidth: Int = 4) throws -> String? {
32 | switch formatEngine {
33 |
34 | // MARK: - JavaScriptCore
35 | case .javaScriptCore:
36 | guard let jsContext = JSContext() else {
37 | throw FormatJSONError.jsContextFailure
38 | }
39 |
40 | jsContext.setObject(string, forKeyedSubscript: "jsonString" as NSString)
41 |
42 | let indentation = usesTabsForIndentation
43 | ? "\t"
44 | : [String](repeating: " ", count: indentationWidth).joined()
45 |
46 | let js = "try{JSON.stringify(JSON.parse(jsonString), null, '\(indentation)')}catch{}"
47 |
48 | guard let result = jsContext.evaluateScript(js), result.isString else {
49 | throw FormatJSONError.failedToFormat
50 | }
51 |
52 | return result.toString()
53 |
54 | // MARK: - JSONSerializer
55 | case .jsonSerializer:
56 | guard let data = string.data(using: .utf8, allowLossyConversion: true) else {
57 | throw FormatJSONError.bufferError
58 | }
59 |
60 | do {
61 | let json = try JSONSerialization.jsonObject(with: data, options: [.allowFragments, .mutableLeaves])
62 | let formattedData = try JSONSerialization.data(withJSONObject: json, options: [.fragmentsAllowed, .prettyPrinted])
63 | guard let result = String(data: formattedData, encoding: .utf8) else {
64 | throw FormatJSONError.invalidData
65 | }
66 |
67 | return result
68 | } catch {
69 | throw FormatJSONError.invalidData
70 | }
71 | }
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/iDevBox/Commands/FormatJSON/FormatJSON.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FormatJSON.swift
3 | // iDevBox
4 | //
5 | // Created by Lex on 2020/7/13.
6 | // Copyright © 2020 Lex. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 | import iDevBoxKit
11 |
12 | enum FormatEngine: String, CaseIterable {
13 | case javaScriptCore = "JavaScriptCore"
14 | case jsonSerializer = "JSONSerializer"
15 | }
16 |
17 | struct FormatJSON: View {
18 | @State var currentEngine: FormatEngine = .javaScriptCore
19 |
20 | var body: some View {
21 | VStack {
22 | Text("Format JSON")
23 | .font(.title)
24 | .fontWeight(.bold)
25 |
26 | ForEach(FormatEngine.allCases, id: \.self) { engine in
27 | CheckBox(label: engine.rawValue, isMarked: self.currentEngine == engine) {
28 | self.currentEngine = engine
29 | Settings.useJavaScriptCore = engine == .javaScriptCore
30 | }
31 | }
32 | }
33 | .tabItem {
34 | Text("Format JSON")
35 | }
36 | .frame(maxWidth: .infinity, maxHeight: .infinity)
37 | }
38 | }
39 |
40 | struct CheckBox: View {
41 | private let isMarked: Bool
42 | private let label: String
43 | private let callback: () -> Void
44 |
45 | init(label: String, isMarked: Bool = false, callback: @escaping () -> Void) {
46 | self.label = label
47 | self.callback = callback
48 | self.isMarked = isMarked
49 | }
50 |
51 | var body: some View {
52 | Button(action: callback) {
53 | HStack(alignment: .center, spacing: 10) {
54 | ZStack {
55 | Circle()
56 | .strokeBorder(isMarked ? Color.blue : Color.primary)
57 | if isMarked {
58 | Circle()
59 | .foregroundColor(Color.blue)
60 | .frame(maxWidth: 13)
61 | .shadow(color: Color.blue, radius: 3, x: 0, y: 0)
62 | }
63 | }.frame(maxWidth: 24, maxHeight: 24)
64 |
65 | Text(label)
66 | .font(.body)
67 | .foregroundColor(isMarked ? .blue : .primary)
68 | .frame(maxHeight: 30)
69 | }
70 | .frame(maxWidth: .infinity)
71 | }
72 | .padding()
73 | .buttonStyle(PlainButtonStyle())
74 | }
75 | }
76 |
77 | struct FormatJSON_Previews: PreviewProvider {
78 | static var previews: some View {
79 | FormatJSON()
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/iDevBoxApp.xcodeproj/xcshareddata/xcschemes/iDevBoxKit.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/iDevBoxApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 52;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D7144F2824BA0D83007FB6C1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7144F2724BA0D83007FB6C1 /* AppDelegate.swift */; };
11 | D7144F2A24BA0D83007FB6C1 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7144F2924BA0D83007FB6C1 /* HomeView.swift */; };
12 | D7144F2C24BA0D85007FB6C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D7144F2B24BA0D85007FB6C1 /* Assets.xcassets */; };
13 | D7144F2F24BA0D85007FB6C1 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D7144F2E24BA0D85007FB6C1 /* Preview Assets.xcassets */; };
14 | D7144F3224BA0D85007FB6C1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D7144F3024BA0D85007FB6C1 /* Main.storyboard */; };
15 | D7144F4124BA0E88007FB6C1 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7144F4024BA0E88007FB6C1 /* Cocoa.framework */; };
16 | D7144F4424BA0E88007FB6C1 /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7144F4324BA0E88007FB6C1 /* SourceEditorExtension.swift */; };
17 | D7144F4624BA0E88007FB6C1 /* FormatJSONCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7144F4524BA0E88007FB6C1 /* FormatJSONCommand.swift */; };
18 | D7144F4B24BA0E88007FB6C1 /* iDevBox.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D7144F3E24BA0E88007FB6C1 /* iDevBox.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
19 | D769DEDD24C2AF0E006438BA /* iDevBoxFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = D769DEDB24C2AF0E006438BA /* iDevBoxFramework.h */; settings = {ATTRIBUTES = (Public, ); }; };
20 | D769DEE024C2AF0E006438BA /* iDevBoxKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D769DED924C2AF0E006438BA /* iDevBoxKit.framework */; };
21 | D769DEE124C2AF0E006438BA /* iDevBoxKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D769DED924C2AF0E006438BA /* iDevBoxKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
22 | D769DEE724C2AF32006438BA /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = D769DEE624C2AF32006438BA /* Defaults.swift */; };
23 | D78C45AE24C5E469009521D8 /* SwiftyUserDefaults in Frameworks */ = {isa = PBXBuildFile; productRef = D78C45AD24C5E469009521D8 /* SwiftyUserDefaults */; };
24 | D78C45AF24C5E5E1009521D8 /* iDevBoxKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D769DED924C2AF0E006438BA /* iDevBoxKit.framework */; };
25 | D7A4C0D124CD2C390036813A /* JSONFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A4C0D024CD2C390036813A /* JSONFormatter.swift */; };
26 | D7F928A924BCA8DE00E4736F /* SideBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7F928A824BCA8DE00E4736F /* SideBar.swift */; };
27 | D7F928AD24BCA9F000E4736F /* FormatJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7F928AC24BCA9F000E4736F /* FormatJSON.swift */; };
28 | D7F928AF24BCAF7B00E4736F /* TutorialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7F928AE24BCAF7B00E4736F /* TutorialView.swift */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | D7144F4924BA0E88007FB6C1 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = D7144F1C24BA0D83007FB6C1 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = D7144F3D24BA0E88007FB6C1;
37 | remoteInfo = XcodeExtension;
38 | };
39 | D769DEDE24C2AF0E006438BA /* PBXContainerItemProxy */ = {
40 | isa = PBXContainerItemProxy;
41 | containerPortal = D7144F1C24BA0D83007FB6C1 /* Project object */;
42 | proxyType = 1;
43 | remoteGlobalIDString = D769DED824C2AF0E006438BA;
44 | remoteInfo = iDevBoxFramework;
45 | };
46 | /* End PBXContainerItemProxy section */
47 |
48 | /* Begin PBXCopyFilesBuildPhase section */
49 | D7144F4F24BA0E88007FB6C1 /* Embed App Extensions */ = {
50 | isa = PBXCopyFilesBuildPhase;
51 | buildActionMask = 2147483647;
52 | dstPath = "";
53 | dstSubfolderSpec = 13;
54 | files = (
55 | D7144F4B24BA0E88007FB6C1 /* iDevBox.appex in Embed App Extensions */,
56 | );
57 | name = "Embed App Extensions";
58 | runOnlyForDeploymentPostprocessing = 0;
59 | };
60 | D769DEE524C2AF0E006438BA /* Embed Frameworks */ = {
61 | isa = PBXCopyFilesBuildPhase;
62 | buildActionMask = 2147483647;
63 | dstPath = "";
64 | dstSubfolderSpec = 10;
65 | files = (
66 | D769DEE124C2AF0E006438BA /* iDevBoxKit.framework in Embed Frameworks */,
67 | );
68 | name = "Embed Frameworks";
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | /* End PBXCopyFilesBuildPhase section */
72 |
73 | /* Begin PBXFileReference section */
74 | D7144F2424BA0D83007FB6C1 /* iDevBoxApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iDevBoxApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
75 | D7144F2724BA0D83007FB6C1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
76 | D7144F2924BA0D83007FB6C1 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; };
77 | D7144F2B24BA0D85007FB6C1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
78 | D7144F2E24BA0D85007FB6C1 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
79 | D7144F3124BA0D85007FB6C1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
80 | D7144F3324BA0D85007FB6C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
81 | D7144F3424BA0D85007FB6C1 /* iDevBox.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iDevBox.entitlements; sourceTree = ""; };
82 | D7144F3E24BA0E88007FB6C1 /* iDevBox.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = iDevBox.appex; sourceTree = BUILT_PRODUCTS_DIR; };
83 | D7144F4024BA0E88007FB6C1 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
84 | D7144F4324BA0E88007FB6C1 /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; };
85 | D7144F4524BA0E88007FB6C1 /* FormatJSONCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatJSONCommand.swift; sourceTree = ""; };
86 | D7144F4724BA0E88007FB6C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
87 | D7144F4824BA0E88007FB6C1 /* XcodeExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = XcodeExtension.entitlements; sourceTree = ""; };
88 | D769DED924C2AF0E006438BA /* iDevBoxKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = iDevBoxKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
89 | D769DEDB24C2AF0E006438BA /* iDevBoxFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = iDevBoxFramework.h; sourceTree = ""; };
90 | D769DEDC24C2AF0E006438BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
91 | D769DEE624C2AF32006438BA /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = ""; };
92 | D7A4C0D024CD2C390036813A /* JSONFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONFormatter.swift; sourceTree = ""; };
93 | D7F928A424BCA0C600E4736F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
94 | D7F928A824BCA8DE00E4736F /* SideBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideBar.swift; sourceTree = ""; };
95 | D7F928AC24BCA9F000E4736F /* FormatJSON.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatJSON.swift; sourceTree = ""; };
96 | D7F928AE24BCAF7B00E4736F /* TutorialView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TutorialView.swift; sourceTree = ""; };
97 | /* End PBXFileReference section */
98 |
99 | /* Begin PBXFrameworksBuildPhase section */
100 | D7144F2124BA0D83007FB6C1 /* Frameworks */ = {
101 | isa = PBXFrameworksBuildPhase;
102 | buildActionMask = 2147483647;
103 | files = (
104 | D769DEE024C2AF0E006438BA /* iDevBoxKit.framework in Frameworks */,
105 | );
106 | runOnlyForDeploymentPostprocessing = 0;
107 | };
108 | D7144F3B24BA0E88007FB6C1 /* Frameworks */ = {
109 | isa = PBXFrameworksBuildPhase;
110 | buildActionMask = 2147483647;
111 | files = (
112 | D78C45AF24C5E5E1009521D8 /* iDevBoxKit.framework in Frameworks */,
113 | D7144F4124BA0E88007FB6C1 /* Cocoa.framework in Frameworks */,
114 | );
115 | runOnlyForDeploymentPostprocessing = 0;
116 | };
117 | D769DED624C2AF0E006438BA /* Frameworks */ = {
118 | isa = PBXFrameworksBuildPhase;
119 | buildActionMask = 2147483647;
120 | files = (
121 | D78C45AE24C5E469009521D8 /* SwiftyUserDefaults in Frameworks */,
122 | );
123 | runOnlyForDeploymentPostprocessing = 0;
124 | };
125 | /* End PBXFrameworksBuildPhase section */
126 |
127 | /* Begin PBXGroup section */
128 | D7144F1B24BA0D83007FB6C1 = {
129 | isa = PBXGroup;
130 | children = (
131 | D7F928A424BCA0C600E4736F /* README.md */,
132 | D7144F2624BA0D83007FB6C1 /* iDevBox */,
133 | D7144F4224BA0E88007FB6C1 /* XcodeExtension */,
134 | D769DEDA24C2AF0E006438BA /* iDevBoxFramework */,
135 | D7144F3F24BA0E88007FB6C1 /* Frameworks */,
136 | D7144F2524BA0D83007FB6C1 /* Products */,
137 | );
138 | sourceTree = "";
139 | };
140 | D7144F2524BA0D83007FB6C1 /* Products */ = {
141 | isa = PBXGroup;
142 | children = (
143 | D7144F2424BA0D83007FB6C1 /* iDevBoxApp.app */,
144 | D7144F3E24BA0E88007FB6C1 /* iDevBox.appex */,
145 | D769DED924C2AF0E006438BA /* iDevBoxKit.framework */,
146 | );
147 | name = Products;
148 | sourceTree = "";
149 | };
150 | D7144F2624BA0D83007FB6C1 /* iDevBox */ = {
151 | isa = PBXGroup;
152 | children = (
153 | D7144F2724BA0D83007FB6C1 /* AppDelegate.swift */,
154 | D7144F2924BA0D83007FB6C1 /* HomeView.swift */,
155 | D7F928A824BCA8DE00E4736F /* SideBar.swift */,
156 | D7F928AE24BCAF7B00E4736F /* TutorialView.swift */,
157 | D7F928AA24BCA9D800E4736F /* Commands */,
158 | D7144F2B24BA0D85007FB6C1 /* Assets.xcassets */,
159 | D7144F3024BA0D85007FB6C1 /* Main.storyboard */,
160 | D7144F3324BA0D85007FB6C1 /* Info.plist */,
161 | D7144F3424BA0D85007FB6C1 /* iDevBox.entitlements */,
162 | D7144F2D24BA0D85007FB6C1 /* Preview Content */,
163 | );
164 | path = iDevBox;
165 | sourceTree = "";
166 | };
167 | D7144F2D24BA0D85007FB6C1 /* Preview Content */ = {
168 | isa = PBXGroup;
169 | children = (
170 | D7144F2E24BA0D85007FB6C1 /* Preview Assets.xcassets */,
171 | );
172 | path = "Preview Content";
173 | sourceTree = "";
174 | };
175 | D7144F3F24BA0E88007FB6C1 /* Frameworks */ = {
176 | isa = PBXGroup;
177 | children = (
178 | D7144F4024BA0E88007FB6C1 /* Cocoa.framework */,
179 | );
180 | name = Frameworks;
181 | sourceTree = "";
182 | };
183 | D7144F4224BA0E88007FB6C1 /* XcodeExtension */ = {
184 | isa = PBXGroup;
185 | children = (
186 | D7144F4324BA0E88007FB6C1 /* SourceEditorExtension.swift */,
187 | D7144F4524BA0E88007FB6C1 /* FormatJSONCommand.swift */,
188 | D7144F4724BA0E88007FB6C1 /* Info.plist */,
189 | D7144F4824BA0E88007FB6C1 /* XcodeExtension.entitlements */,
190 | );
191 | path = XcodeExtension;
192 | sourceTree = "";
193 | };
194 | D769DEDA24C2AF0E006438BA /* iDevBoxFramework */ = {
195 | isa = PBXGroup;
196 | children = (
197 | D769DEDB24C2AF0E006438BA /* iDevBoxFramework.h */,
198 | D769DEDC24C2AF0E006438BA /* Info.plist */,
199 | D769DEE624C2AF32006438BA /* Defaults.swift */,
200 | D7A4C0D024CD2C390036813A /* JSONFormatter.swift */,
201 | );
202 | path = iDevBoxFramework;
203 | sourceTree = "";
204 | };
205 | D7F928AA24BCA9D800E4736F /* Commands */ = {
206 | isa = PBXGroup;
207 | children = (
208 | D7F928AB24BCA9E000E4736F /* FormatJSON */,
209 | );
210 | path = Commands;
211 | sourceTree = "";
212 | };
213 | D7F928AB24BCA9E000E4736F /* FormatJSON */ = {
214 | isa = PBXGroup;
215 | children = (
216 | D7F928AC24BCA9F000E4736F /* FormatJSON.swift */,
217 | );
218 | path = FormatJSON;
219 | sourceTree = "";
220 | };
221 | /* End PBXGroup section */
222 |
223 | /* Begin PBXHeadersBuildPhase section */
224 | D769DED424C2AF0E006438BA /* Headers */ = {
225 | isa = PBXHeadersBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | D769DEDD24C2AF0E006438BA /* iDevBoxFramework.h in Headers */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXHeadersBuildPhase section */
233 |
234 | /* Begin PBXNativeTarget section */
235 | D7144F2324BA0D83007FB6C1 /* iDevBoxApp */ = {
236 | isa = PBXNativeTarget;
237 | buildConfigurationList = D7144F3724BA0D85007FB6C1 /* Build configuration list for PBXNativeTarget "iDevBoxApp" */;
238 | buildPhases = (
239 | D7144F2024BA0D83007FB6C1 /* Sources */,
240 | D7144F2124BA0D83007FB6C1 /* Frameworks */,
241 | D7144F2224BA0D83007FB6C1 /* Resources */,
242 | D7144F4F24BA0E88007FB6C1 /* Embed App Extensions */,
243 | D769DEE524C2AF0E006438BA /* Embed Frameworks */,
244 | );
245 | buildRules = (
246 | );
247 | dependencies = (
248 | D7144F4A24BA0E88007FB6C1 /* PBXTargetDependency */,
249 | D769DEDF24C2AF0E006438BA /* PBXTargetDependency */,
250 | );
251 | name = iDevBoxApp;
252 | packageProductDependencies = (
253 | );
254 | productName = iDevBox;
255 | productReference = D7144F2424BA0D83007FB6C1 /* iDevBoxApp.app */;
256 | productType = "com.apple.product-type.application";
257 | };
258 | D7144F3D24BA0E88007FB6C1 /* iDevBox */ = {
259 | isa = PBXNativeTarget;
260 | buildConfigurationList = D7144F4C24BA0E88007FB6C1 /* Build configuration list for PBXNativeTarget "iDevBox" */;
261 | buildPhases = (
262 | D7144F3A24BA0E88007FB6C1 /* Sources */,
263 | D7144F3B24BA0E88007FB6C1 /* Frameworks */,
264 | D7144F3C24BA0E88007FB6C1 /* Resources */,
265 | );
266 | buildRules = (
267 | );
268 | dependencies = (
269 | );
270 | name = iDevBox;
271 | productName = XcodeExtension;
272 | productReference = D7144F3E24BA0E88007FB6C1 /* iDevBox.appex */;
273 | productType = "com.apple.product-type.xcode-extension";
274 | };
275 | D769DED824C2AF0E006438BA /* iDevBoxKit */ = {
276 | isa = PBXNativeTarget;
277 | buildConfigurationList = D769DEE224C2AF0E006438BA /* Build configuration list for PBXNativeTarget "iDevBoxKit" */;
278 | buildPhases = (
279 | D769DED424C2AF0E006438BA /* Headers */,
280 | D769DED524C2AF0E006438BA /* Sources */,
281 | D769DED624C2AF0E006438BA /* Frameworks */,
282 | D769DED724C2AF0E006438BA /* Resources */,
283 | );
284 | buildRules = (
285 | );
286 | dependencies = (
287 | );
288 | name = iDevBoxKit;
289 | packageProductDependencies = (
290 | D78C45AD24C5E469009521D8 /* SwiftyUserDefaults */,
291 | );
292 | productName = iDevBoxFramework;
293 | productReference = D769DED924C2AF0E006438BA /* iDevBoxKit.framework */;
294 | productType = "com.apple.product-type.framework";
295 | };
296 | /* End PBXNativeTarget section */
297 |
298 | /* Begin PBXProject section */
299 | D7144F1C24BA0D83007FB6C1 /* Project object */ = {
300 | isa = PBXProject;
301 | attributes = {
302 | LastSwiftUpdateCheck = 1150;
303 | LastUpgradeCheck = 1160;
304 | ORGANIZATIONNAME = Lex;
305 | TargetAttributes = {
306 | D7144F2324BA0D83007FB6C1 = {
307 | CreatedOnToolsVersion = 11.5;
308 | };
309 | D7144F3D24BA0E88007FB6C1 = {
310 | CreatedOnToolsVersion = 11.5;
311 | };
312 | D769DED824C2AF0E006438BA = {
313 | CreatedOnToolsVersion = 11.6;
314 | LastSwiftMigration = 1160;
315 | };
316 | };
317 | };
318 | buildConfigurationList = D7144F1F24BA0D83007FB6C1 /* Build configuration list for PBXProject "iDevBoxApp" */;
319 | compatibilityVersion = "Xcode 9.3";
320 | developmentRegion = en;
321 | hasScannedForEncodings = 0;
322 | knownRegions = (
323 | en,
324 | Base,
325 | );
326 | mainGroup = D7144F1B24BA0D83007FB6C1;
327 | packageReferences = (
328 | D769DED124C2AEA4006438BA /* XCRemoteSwiftPackageReference "SwiftyUserDefaults" */,
329 | );
330 | productRefGroup = D7144F2524BA0D83007FB6C1 /* Products */;
331 | projectDirPath = "";
332 | projectRoot = "";
333 | targets = (
334 | D7144F2324BA0D83007FB6C1 /* iDevBoxApp */,
335 | D7144F3D24BA0E88007FB6C1 /* iDevBox */,
336 | D769DED824C2AF0E006438BA /* iDevBoxKit */,
337 | );
338 | };
339 | /* End PBXProject section */
340 |
341 | /* Begin PBXResourcesBuildPhase section */
342 | D7144F2224BA0D83007FB6C1 /* Resources */ = {
343 | isa = PBXResourcesBuildPhase;
344 | buildActionMask = 2147483647;
345 | files = (
346 | D7144F3224BA0D85007FB6C1 /* Main.storyboard in Resources */,
347 | D7144F2F24BA0D85007FB6C1 /* Preview Assets.xcassets in Resources */,
348 | D7144F2C24BA0D85007FB6C1 /* Assets.xcassets in Resources */,
349 | );
350 | runOnlyForDeploymentPostprocessing = 0;
351 | };
352 | D7144F3C24BA0E88007FB6C1 /* Resources */ = {
353 | isa = PBXResourcesBuildPhase;
354 | buildActionMask = 2147483647;
355 | files = (
356 | );
357 | runOnlyForDeploymentPostprocessing = 0;
358 | };
359 | D769DED724C2AF0E006438BA /* Resources */ = {
360 | isa = PBXResourcesBuildPhase;
361 | buildActionMask = 2147483647;
362 | files = (
363 | );
364 | runOnlyForDeploymentPostprocessing = 0;
365 | };
366 | /* End PBXResourcesBuildPhase section */
367 |
368 | /* Begin PBXSourcesBuildPhase section */
369 | D7144F2024BA0D83007FB6C1 /* Sources */ = {
370 | isa = PBXSourcesBuildPhase;
371 | buildActionMask = 2147483647;
372 | files = (
373 | D7F928AD24BCA9F000E4736F /* FormatJSON.swift in Sources */,
374 | D7F928AF24BCAF7B00E4736F /* TutorialView.swift in Sources */,
375 | D7144F2A24BA0D83007FB6C1 /* HomeView.swift in Sources */,
376 | D7144F2824BA0D83007FB6C1 /* AppDelegate.swift in Sources */,
377 | D7F928A924BCA8DE00E4736F /* SideBar.swift in Sources */,
378 | );
379 | runOnlyForDeploymentPostprocessing = 0;
380 | };
381 | D7144F3A24BA0E88007FB6C1 /* Sources */ = {
382 | isa = PBXSourcesBuildPhase;
383 | buildActionMask = 2147483647;
384 | files = (
385 | D7144F4424BA0E88007FB6C1 /* SourceEditorExtension.swift in Sources */,
386 | D7144F4624BA0E88007FB6C1 /* FormatJSONCommand.swift in Sources */,
387 | );
388 | runOnlyForDeploymentPostprocessing = 0;
389 | };
390 | D769DED524C2AF0E006438BA /* Sources */ = {
391 | isa = PBXSourcesBuildPhase;
392 | buildActionMask = 2147483647;
393 | files = (
394 | D7A4C0D124CD2C390036813A /* JSONFormatter.swift in Sources */,
395 | D769DEE724C2AF32006438BA /* Defaults.swift in Sources */,
396 | );
397 | runOnlyForDeploymentPostprocessing = 0;
398 | };
399 | /* End PBXSourcesBuildPhase section */
400 |
401 | /* Begin PBXTargetDependency section */
402 | D7144F4A24BA0E88007FB6C1 /* PBXTargetDependency */ = {
403 | isa = PBXTargetDependency;
404 | target = D7144F3D24BA0E88007FB6C1 /* iDevBox */;
405 | targetProxy = D7144F4924BA0E88007FB6C1 /* PBXContainerItemProxy */;
406 | };
407 | D769DEDF24C2AF0E006438BA /* PBXTargetDependency */ = {
408 | isa = PBXTargetDependency;
409 | target = D769DED824C2AF0E006438BA /* iDevBoxKit */;
410 | targetProxy = D769DEDE24C2AF0E006438BA /* PBXContainerItemProxy */;
411 | };
412 | /* End PBXTargetDependency section */
413 |
414 | /* Begin PBXVariantGroup section */
415 | D7144F3024BA0D85007FB6C1 /* Main.storyboard */ = {
416 | isa = PBXVariantGroup;
417 | children = (
418 | D7144F3124BA0D85007FB6C1 /* Base */,
419 | );
420 | name = Main.storyboard;
421 | sourceTree = "";
422 | };
423 | /* End PBXVariantGroup section */
424 |
425 | /* Begin XCBuildConfiguration section */
426 | D7144F3524BA0D85007FB6C1 /* Debug */ = {
427 | isa = XCBuildConfiguration;
428 | buildSettings = {
429 | ALWAYS_SEARCH_USER_PATHS = NO;
430 | CLANG_ANALYZER_NONNULL = YES;
431 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
432 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
433 | CLANG_CXX_LIBRARY = "libc++";
434 | CLANG_ENABLE_MODULES = YES;
435 | CLANG_ENABLE_OBJC_ARC = YES;
436 | CLANG_ENABLE_OBJC_WEAK = YES;
437 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
438 | CLANG_WARN_BOOL_CONVERSION = YES;
439 | CLANG_WARN_COMMA = YES;
440 | CLANG_WARN_CONSTANT_CONVERSION = YES;
441 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
442 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
443 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
444 | CLANG_WARN_EMPTY_BODY = YES;
445 | CLANG_WARN_ENUM_CONVERSION = YES;
446 | CLANG_WARN_INFINITE_RECURSION = YES;
447 | CLANG_WARN_INT_CONVERSION = YES;
448 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
449 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
450 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
452 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
453 | CLANG_WARN_STRICT_PROTOTYPES = YES;
454 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
455 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
456 | CLANG_WARN_UNREACHABLE_CODE = YES;
457 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
458 | COPY_PHASE_STRIP = NO;
459 | DEBUG_INFORMATION_FORMAT = dwarf;
460 | ENABLE_STRICT_OBJC_MSGSEND = YES;
461 | ENABLE_TESTABILITY = YES;
462 | GCC_C_LANGUAGE_STANDARD = gnu11;
463 | GCC_DYNAMIC_NO_PIC = NO;
464 | GCC_NO_COMMON_BLOCKS = YES;
465 | GCC_OPTIMIZATION_LEVEL = 0;
466 | GCC_PREPROCESSOR_DEFINITIONS = (
467 | "DEBUG=1",
468 | "$(inherited)",
469 | );
470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
472 | GCC_WARN_UNDECLARED_SELECTOR = YES;
473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
474 | GCC_WARN_UNUSED_FUNCTION = YES;
475 | GCC_WARN_UNUSED_VARIABLE = YES;
476 | MACOSX_DEPLOYMENT_TARGET = 10.15;
477 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
478 | MTL_FAST_MATH = YES;
479 | ONLY_ACTIVE_ARCH = YES;
480 | SDKROOT = macosx;
481 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
482 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
483 | };
484 | name = Debug;
485 | };
486 | D7144F3624BA0D85007FB6C1 /* Release */ = {
487 | isa = XCBuildConfiguration;
488 | buildSettings = {
489 | ALWAYS_SEARCH_USER_PATHS = NO;
490 | CLANG_ANALYZER_NONNULL = YES;
491 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
492 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
493 | CLANG_CXX_LIBRARY = "libc++";
494 | CLANG_ENABLE_MODULES = YES;
495 | CLANG_ENABLE_OBJC_ARC = YES;
496 | CLANG_ENABLE_OBJC_WEAK = YES;
497 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
498 | CLANG_WARN_BOOL_CONVERSION = YES;
499 | CLANG_WARN_COMMA = YES;
500 | CLANG_WARN_CONSTANT_CONVERSION = YES;
501 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
502 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
503 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
504 | CLANG_WARN_EMPTY_BODY = YES;
505 | CLANG_WARN_ENUM_CONVERSION = YES;
506 | CLANG_WARN_INFINITE_RECURSION = YES;
507 | CLANG_WARN_INT_CONVERSION = YES;
508 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
509 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
510 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
511 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
512 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
513 | CLANG_WARN_STRICT_PROTOTYPES = YES;
514 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
515 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
516 | CLANG_WARN_UNREACHABLE_CODE = YES;
517 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
518 | COPY_PHASE_STRIP = NO;
519 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
520 | ENABLE_NS_ASSERTIONS = NO;
521 | ENABLE_STRICT_OBJC_MSGSEND = YES;
522 | GCC_C_LANGUAGE_STANDARD = gnu11;
523 | GCC_NO_COMMON_BLOCKS = YES;
524 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
525 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
526 | GCC_WARN_UNDECLARED_SELECTOR = YES;
527 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
528 | GCC_WARN_UNUSED_FUNCTION = YES;
529 | GCC_WARN_UNUSED_VARIABLE = YES;
530 | MACOSX_DEPLOYMENT_TARGET = 10.15;
531 | MTL_ENABLE_DEBUG_INFO = NO;
532 | MTL_FAST_MATH = YES;
533 | SDKROOT = macosx;
534 | SWIFT_COMPILATION_MODE = wholemodule;
535 | SWIFT_OPTIMIZATION_LEVEL = "-O";
536 | };
537 | name = Release;
538 | };
539 | D7144F3824BA0D85007FB6C1 /* Debug */ = {
540 | isa = XCBuildConfiguration;
541 | buildSettings = {
542 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
543 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
544 | CODE_SIGN_ENTITLEMENTS = iDevBox/iDevBox.entitlements;
545 | CODE_SIGN_IDENTITY = "Apple Development";
546 | CODE_SIGN_STYLE = Automatic;
547 | COMBINE_HIDPI_IMAGES = YES;
548 | DEVELOPMENT_ASSET_PATHS = "\"iDevBox/Preview Content\"";
549 | DEVELOPMENT_TEAM = 5SKD83S59G;
550 | ENABLE_HARDENED_RUNTIME = YES;
551 | ENABLE_PREVIEWS = YES;
552 | INFOPLIST_FILE = iDevBox/Info.plist;
553 | LD_RUNPATH_SEARCH_PATHS = (
554 | "$(inherited)",
555 | "@executable_path/../Frameworks",
556 | );
557 | MACOSX_DEPLOYMENT_TARGET = 10.15;
558 | PRODUCT_BUNDLE_IDENTIFIER = sh.lex.iDevBox;
559 | PRODUCT_NAME = "$(TARGET_NAME)";
560 | SWIFT_VERSION = 5.0;
561 | };
562 | name = Debug;
563 | };
564 | D7144F3924BA0D85007FB6C1 /* Release */ = {
565 | isa = XCBuildConfiguration;
566 | buildSettings = {
567 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
568 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
569 | CODE_SIGN_ENTITLEMENTS = iDevBox/iDevBox.entitlements;
570 | CODE_SIGN_IDENTITY = "Apple Development";
571 | CODE_SIGN_STYLE = Automatic;
572 | COMBINE_HIDPI_IMAGES = YES;
573 | DEVELOPMENT_ASSET_PATHS = "\"iDevBox/Preview Content\"";
574 | DEVELOPMENT_TEAM = 5SKD83S59G;
575 | ENABLE_HARDENED_RUNTIME = YES;
576 | ENABLE_PREVIEWS = YES;
577 | INFOPLIST_FILE = iDevBox/Info.plist;
578 | LD_RUNPATH_SEARCH_PATHS = (
579 | "$(inherited)",
580 | "@executable_path/../Frameworks",
581 | );
582 | MACOSX_DEPLOYMENT_TARGET = 10.15;
583 | PRODUCT_BUNDLE_IDENTIFIER = sh.lex.iDevBox;
584 | PRODUCT_NAME = "$(TARGET_NAME)";
585 | SWIFT_VERSION = 5.0;
586 | };
587 | name = Release;
588 | };
589 | D7144F4D24BA0E88007FB6C1 /* Debug */ = {
590 | isa = XCBuildConfiguration;
591 | buildSettings = {
592 | APPLICATION_EXTENSION_API_ONLY = NO;
593 | CODE_SIGN_ENTITLEMENTS = XcodeExtension/XcodeExtension.entitlements;
594 | CODE_SIGN_IDENTITY = "Apple Development";
595 | CODE_SIGN_STYLE = Automatic;
596 | COMBINE_HIDPI_IMAGES = YES;
597 | DEVELOPMENT_TEAM = 5SKD83S59G;
598 | ENABLE_HARDENED_RUNTIME = YES;
599 | INFOPLIST_FILE = XcodeExtension/Info.plist;
600 | LD_RUNPATH_SEARCH_PATHS = (
601 | "$(inherited)",
602 | "@executable_path/../Frameworks",
603 | "@executable_path/../../../../Frameworks",
604 | );
605 | PRODUCT_BUNDLE_IDENTIFIER = sh.lex.iDevBox.XcodeExtension;
606 | PRODUCT_NAME = "$(TARGET_NAME)";
607 | SKIP_INSTALL = YES;
608 | SWIFT_VERSION = 5.0;
609 | };
610 | name = Debug;
611 | };
612 | D7144F4E24BA0E88007FB6C1 /* Release */ = {
613 | isa = XCBuildConfiguration;
614 | buildSettings = {
615 | APPLICATION_EXTENSION_API_ONLY = NO;
616 | CODE_SIGN_ENTITLEMENTS = XcodeExtension/XcodeExtension.entitlements;
617 | CODE_SIGN_IDENTITY = "Apple Development";
618 | CODE_SIGN_STYLE = Automatic;
619 | COMBINE_HIDPI_IMAGES = YES;
620 | DEVELOPMENT_TEAM = 5SKD83S59G;
621 | ENABLE_HARDENED_RUNTIME = YES;
622 | INFOPLIST_FILE = XcodeExtension/Info.plist;
623 | LD_RUNPATH_SEARCH_PATHS = (
624 | "$(inherited)",
625 | "@executable_path/../Frameworks",
626 | "@executable_path/../../../../Frameworks",
627 | );
628 | PRODUCT_BUNDLE_IDENTIFIER = sh.lex.iDevBox.XcodeExtension;
629 | PRODUCT_NAME = "$(TARGET_NAME)";
630 | SKIP_INSTALL = YES;
631 | SWIFT_VERSION = 5.0;
632 | };
633 | name = Release;
634 | };
635 | D769DEE324C2AF0E006438BA /* Debug */ = {
636 | isa = XCBuildConfiguration;
637 | buildSettings = {
638 | CLANG_ENABLE_MODULES = YES;
639 | CODE_SIGN_STYLE = Automatic;
640 | COMBINE_HIDPI_IMAGES = YES;
641 | CURRENT_PROJECT_VERSION = 1;
642 | DEFINES_MODULE = YES;
643 | DEVELOPMENT_TEAM = 5SKD83S59G;
644 | DYLIB_COMPATIBILITY_VERSION = 1;
645 | DYLIB_CURRENT_VERSION = 1;
646 | DYLIB_INSTALL_NAME_BASE = "@rpath";
647 | INFOPLIST_FILE = iDevBoxFramework/Info.plist;
648 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
649 | LD_RUNPATH_SEARCH_PATHS = (
650 | "$(inherited)",
651 | "@executable_path/../Frameworks",
652 | "@loader_path/Frameworks",
653 | );
654 | PRODUCT_BUNDLE_IDENTIFIER = sh.lex.iDevBoxFramework;
655 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
656 | SKIP_INSTALL = YES;
657 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
658 | SWIFT_VERSION = 5.0;
659 | VERSIONING_SYSTEM = "apple-generic";
660 | VERSION_INFO_PREFIX = "";
661 | };
662 | name = Debug;
663 | };
664 | D769DEE424C2AF0E006438BA /* Release */ = {
665 | isa = XCBuildConfiguration;
666 | buildSettings = {
667 | CLANG_ENABLE_MODULES = YES;
668 | CODE_SIGN_STYLE = Automatic;
669 | COMBINE_HIDPI_IMAGES = YES;
670 | CURRENT_PROJECT_VERSION = 1;
671 | DEFINES_MODULE = YES;
672 | DEVELOPMENT_TEAM = 5SKD83S59G;
673 | DYLIB_COMPATIBILITY_VERSION = 1;
674 | DYLIB_CURRENT_VERSION = 1;
675 | DYLIB_INSTALL_NAME_BASE = "@rpath";
676 | INFOPLIST_FILE = iDevBoxFramework/Info.plist;
677 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
678 | LD_RUNPATH_SEARCH_PATHS = (
679 | "$(inherited)",
680 | "@executable_path/../Frameworks",
681 | "@loader_path/Frameworks",
682 | );
683 | PRODUCT_BUNDLE_IDENTIFIER = sh.lex.iDevBoxFramework;
684 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
685 | SKIP_INSTALL = YES;
686 | SWIFT_VERSION = 5.0;
687 | VERSIONING_SYSTEM = "apple-generic";
688 | VERSION_INFO_PREFIX = "";
689 | };
690 | name = Release;
691 | };
692 | /* End XCBuildConfiguration section */
693 |
694 | /* Begin XCConfigurationList section */
695 | D7144F1F24BA0D83007FB6C1 /* Build configuration list for PBXProject "iDevBoxApp" */ = {
696 | isa = XCConfigurationList;
697 | buildConfigurations = (
698 | D7144F3524BA0D85007FB6C1 /* Debug */,
699 | D7144F3624BA0D85007FB6C1 /* Release */,
700 | );
701 | defaultConfigurationIsVisible = 0;
702 | defaultConfigurationName = Release;
703 | };
704 | D7144F3724BA0D85007FB6C1 /* Build configuration list for PBXNativeTarget "iDevBoxApp" */ = {
705 | isa = XCConfigurationList;
706 | buildConfigurations = (
707 | D7144F3824BA0D85007FB6C1 /* Debug */,
708 | D7144F3924BA0D85007FB6C1 /* Release */,
709 | );
710 | defaultConfigurationIsVisible = 0;
711 | defaultConfigurationName = Release;
712 | };
713 | D7144F4C24BA0E88007FB6C1 /* Build configuration list for PBXNativeTarget "iDevBox" */ = {
714 | isa = XCConfigurationList;
715 | buildConfigurations = (
716 | D7144F4D24BA0E88007FB6C1 /* Debug */,
717 | D7144F4E24BA0E88007FB6C1 /* Release */,
718 | );
719 | defaultConfigurationIsVisible = 0;
720 | defaultConfigurationName = Release;
721 | };
722 | D769DEE224C2AF0E006438BA /* Build configuration list for PBXNativeTarget "iDevBoxKit" */ = {
723 | isa = XCConfigurationList;
724 | buildConfigurations = (
725 | D769DEE324C2AF0E006438BA /* Debug */,
726 | D769DEE424C2AF0E006438BA /* Release */,
727 | );
728 | defaultConfigurationIsVisible = 0;
729 | defaultConfigurationName = Release;
730 | };
731 | /* End XCConfigurationList section */
732 |
733 | /* Begin XCRemoteSwiftPackageReference section */
734 | D769DED124C2AEA4006438BA /* XCRemoteSwiftPackageReference "SwiftyUserDefaults" */ = {
735 | isa = XCRemoteSwiftPackageReference;
736 | repositoryURL = "https://github.com/sunshinejr/SwiftyUserDefaults";
737 | requirement = {
738 | kind = upToNextMajorVersion;
739 | minimumVersion = 5.0.0;
740 | };
741 | };
742 | /* End XCRemoteSwiftPackageReference section */
743 |
744 | /* Begin XCSwiftPackageProductDependency section */
745 | D78C45AD24C5E469009521D8 /* SwiftyUserDefaults */ = {
746 | isa = XCSwiftPackageProductDependency;
747 | package = D769DED124C2AEA4006438BA /* XCRemoteSwiftPackageReference "SwiftyUserDefaults" */;
748 | productName = SwiftyUserDefaults;
749 | };
750 | /* End XCSwiftPackageProductDependency section */
751 | };
752 | rootObject = D7144F1C24BA0D83007FB6C1 /* Project object */;
753 | }
754 |
--------------------------------------------------------------------------------
/iDevBox/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
--------------------------------------------------------------------------------