├── PlainEdit ├── AppDelegate.swift ├── WindowController.swift ├── Utilities.swift ├── Info.plist ├── TextViewController.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Document.swift └── Base.lproj │ └── Main.storyboard ├── PlainEdit.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcshareddata │ └── xcschemes │ │ └── PlainEdit.xcscheme └── project.pbxproj ├── README.md ├── .gitignore └── LICENSE /PlainEdit/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // PlainEdit 4 | // 5 | // Created by 1024jp on 2016/09/26. 6 | // © 2016-2022 1024jp 7 | // 8 | 9 | import Cocoa 10 | 11 | @main 12 | final class AppDelegate: NSObject, NSApplicationDelegate { } 13 | -------------------------------------------------------------------------------- /PlainEdit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PlainEdit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | PlainEdit 3 | ============================= 4 | 5 | Super plain text editor for macOS to test foundamental Cocoa behaviors. 6 | 7 | 8 | License 9 | ----------------------------- 10 | © 2016-2022 1024jp. 11 | 12 | The source code is distributed under the terms of the __MIT License__. See the bundled "[LICENSE](LICENSE)" for details. 13 | -------------------------------------------------------------------------------- /PlainEdit/WindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WindowController.swift 3 | // PlainEdit 4 | // 5 | // Created by 1024jp on 2016/10/06. 6 | // © 2016-2018 1024jp 7 | // 8 | 9 | import Cocoa 10 | 11 | final class WindowController: NSWindowController { 12 | 13 | override func windowDidLoad() { 14 | 15 | super.windowDidLoad() 16 | 17 | self.shouldCascadeWindows = true 18 | self.windowFrameAutosaveName = "document" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /PlainEdit/Utilities.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utilities.swift 3 | // PlainEdit 4 | // 5 | // Created by 1024jp on 2016/09/26. 6 | // © 2016 1024jp 7 | // 8 | 9 | import Foundation 10 | 11 | /// debug friendly print with a dog/cow. 12 | func moof(_ items: Any?..., function: String = #function) { 13 | 14 | let icon = Thread.isMainThread ? "🐕" : "🐄" 15 | 16 | Swift.print(icon + " \(function) ", terminator: "") 17 | if items.isEmpty { 18 | Swift.print("") 19 | } else { 20 | Swift.debugPrint(items) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PlainEdit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDocumentTypes 6 | 7 | 8 | CFBundleTypeRole 9 | Editor 10 | LSItemContentTypes 11 | 12 | public.plain-text 13 | 14 | NSDocumentClass 15 | $(PRODUCT_MODULE_NAME).Document 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /PlainEdit/TextViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextViewController.swift 3 | // PlainEdit 4 | // 5 | // Created by 1024jp on 2016/09/26. 6 | // © 2016-2023 1024jp 7 | // 8 | 9 | import Cocoa 10 | 11 | final class TextViewController: NSViewController { 12 | 13 | @IBOutlet private var textView: NSTextView! 14 | 15 | private var document: Document? { 16 | self.view.window?.windowController?.document as? Document 17 | } 18 | 19 | 20 | // MARK: - 21 | 22 | override func viewWillAppear() { 23 | 24 | super.viewWillAppear() 25 | 26 | self.textView.textContentStorage?.textStorage = self.document!.textStorage 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # macOS 2 | .DS_Store 3 | 4 | # Xcode 5 | # 6 | # cf. https://github.com/github/gitignore/blob/master/Swift.gitignore 7 | 8 | ## Build generated 9 | build/ 10 | DerivedData/ 11 | 12 | ## Various settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | xcuserdata/ 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Other 26 | *.moved-aside 27 | *.xcuserstate 28 | 29 | ## Obj-C/Swift specific 30 | *.hmap 31 | *.ipa 32 | *.dSYM.zip 33 | *.dSYM 34 | 35 | ## Playgrounds 36 | timeline.xctimeline 37 | playground.xcworkspace 38 | 39 | # Swift Package Manager 40 | # 41 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 42 | # Packages/ 43 | .build/ 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2016-2020 1024jp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /PlainEdit/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /PlainEdit/Document.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Document.swift 3 | // PlainEdit 4 | // 5 | // Created by 1024jp on 2016/09/26. 6 | // © 2016-2023 1024jp 7 | // 8 | 9 | import Cocoa 10 | 11 | final class Document: NSDocument { 12 | 13 | let textStorage = NSTextStorage() 14 | private var encoding: String.Encoding = .utf8 15 | 16 | 17 | // MARK: - 18 | 19 | override class var autosavesInPlace: Bool { 20 | 21 | true 22 | } 23 | 24 | 25 | override class func canConcurrentlyReadDocuments(ofType: String) -> Bool { 26 | 27 | true 28 | } 29 | 30 | 31 | override func canAsynchronouslyWrite(to url: URL, ofType typeName: String, for saveOperation: NSDocument.SaveOperationType) -> Bool { 32 | 33 | true 34 | } 35 | 36 | 37 | override func makeWindowControllers() { 38 | 39 | let storyboard = NSStoryboard.main! 40 | let windowController = storyboard.instantiateController(withIdentifier: "Document Window Controller") as! NSWindowController 41 | 42 | self.addWindowController(windowController) 43 | } 44 | 45 | 46 | override func data(ofType typeName: String) throws -> Data { 47 | 48 | let string = self.textStorage.string 49 | let encoding = self.encoding 50 | 51 | self.unblockUserInteraction() 52 | 53 | guard let data = string.data(using: encoding) else { 54 | throw CocoaError(.fileWriteInapplicableStringEncoding, 55 | userInfo: [NSStringEncodingErrorKey: encoding.rawValue]) 56 | } 57 | 58 | return data 59 | } 60 | 61 | 62 | override func read(from url: URL, ofType typeName: String) throws { 63 | 64 | let string = try String(contentsOf: url, usedEncoding: &self.encoding) 65 | let range = NSRange(.. 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 | -------------------------------------------------------------------------------- /PlainEdit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 53; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2A2EBF8F1D98873000745704 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A2EBF8E1D98873000745704 /* AppDelegate.swift */; }; 11 | 2A2EBF911D98873000745704 /* TextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A2EBF901D98873000745704 /* TextViewController.swift */; }; 12 | 2A2EBF931D98873000745704 /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A2EBF921D98873000745704 /* Document.swift */; }; 13 | 2A2EBF951D98873000745704 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A2EBF941D98873000745704 /* Assets.xcassets */; }; 14 | 2A2EBF981D98873000745704 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2A2EBF961D98873000745704 /* Main.storyboard */; }; 15 | 2A401FEE1D9D804300ACE036 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A401FED1D9D804300ACE036 /* Utilities.swift */; }; 16 | 2A8427DD27B8BDB200E4AEB8 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 2A8427DC27B8BDB200E4AEB8 /* README.md */; }; 17 | 2ACF62EE1DA661630063D684 /* WindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2ACF62ED1DA661630063D684 /* WindowController.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 2A2EBF8B1D98873000745704 /* PlainEdit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlainEdit.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 2A2EBF8E1D98873000745704 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 2A2EBF901D98873000745704 /* TextViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewController.swift; sourceTree = ""; }; 24 | 2A2EBF921D98873000745704 /* Document.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Document.swift; sourceTree = ""; }; 25 | 2A2EBF941D98873000745704 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 2A2EBF971D98873000745704 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 27 | 2A2EBF991D98873000745704 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28 | 2A401FED1D9D804300ACE036 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; 29 | 2A8427DC27B8BDB200E4AEB8 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 30 | 2ACF62ED1DA661630063D684 /* WindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WindowController.swift; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXGroup section */ 34 | 2A2EBF821D98873000745704 = { 35 | isa = PBXGroup; 36 | children = ( 37 | 2A8427DC27B8BDB200E4AEB8 /* README.md */, 38 | 2A2EBF8D1D98873000745704 /* PlainTextEditor */, 39 | 2A2EBF8C1D98873000745704 /* Products */, 40 | ); 41 | sourceTree = ""; 42 | }; 43 | 2A2EBF8C1D98873000745704 /* Products */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 2A2EBF8B1D98873000745704 /* PlainEdit.app */, 47 | ); 48 | name = Products; 49 | sourceTree = ""; 50 | }; 51 | 2A2EBF8D1D98873000745704 /* PlainTextEditor */ = { 52 | isa = PBXGroup; 53 | children = ( 54 | 2A2EBF8E1D98873000745704 /* AppDelegate.swift */, 55 | 2A2EBF921D98873000745704 /* Document.swift */, 56 | 2ACF62ED1DA661630063D684 /* WindowController.swift */, 57 | 2A2EBF901D98873000745704 /* TextViewController.swift */, 58 | 2A401FED1D9D804300ACE036 /* Utilities.swift */, 59 | 2A2EBF941D98873000745704 /* Assets.xcassets */, 60 | 2A2EBF961D98873000745704 /* Main.storyboard */, 61 | 2A2EBF991D98873000745704 /* Info.plist */, 62 | ); 63 | name = PlainTextEditor; 64 | path = PlainEdit; 65 | sourceTree = ""; 66 | }; 67 | /* End PBXGroup section */ 68 | 69 | /* Begin PBXNativeTarget section */ 70 | 2A2EBF8A1D98873000745704 /* PlainEdit */ = { 71 | isa = PBXNativeTarget; 72 | buildConfigurationList = 2A2EBF9C1D98873000745704 /* Build configuration list for PBXNativeTarget "PlainEdit" */; 73 | buildPhases = ( 74 | 2A2EBF871D98873000745704 /* Sources */, 75 | 2A2EBF891D98873000745704 /* Resources */, 76 | ); 77 | buildRules = ( 78 | ); 79 | dependencies = ( 80 | ); 81 | name = PlainEdit; 82 | productName = PlainTextEditor; 83 | productReference = 2A2EBF8B1D98873000745704 /* PlainEdit.app */; 84 | productType = "com.apple.product-type.application"; 85 | }; 86 | /* End PBXNativeTarget section */ 87 | 88 | /* Begin PBXProject section */ 89 | 2A2EBF831D98873000745704 /* Project object */ = { 90 | isa = PBXProject; 91 | attributes = { 92 | LastSwiftUpdateCheck = 0800; 93 | LastUpgradeCheck = 1420; 94 | ORGANIZATIONNAME = 1024jp; 95 | TargetAttributes = { 96 | 2A2EBF8A1D98873000745704 = { 97 | CreatedOnToolsVersion = 8.0; 98 | LastSwiftMigration = 1020; 99 | ProvisioningStyle = Automatic; 100 | }; 101 | }; 102 | }; 103 | buildConfigurationList = 2A2EBF861D98873000745704 /* Build configuration list for PBXProject "PlainEdit" */; 104 | compatibilityVersion = "Xcode 11.4"; 105 | developmentRegion = en; 106 | hasScannedForEncodings = 0; 107 | knownRegions = ( 108 | en, 109 | Base, 110 | ); 111 | mainGroup = 2A2EBF821D98873000745704; 112 | productRefGroup = 2A2EBF8C1D98873000745704 /* Products */; 113 | projectDirPath = ""; 114 | projectRoot = ""; 115 | targets = ( 116 | 2A2EBF8A1D98873000745704 /* PlainEdit */, 117 | ); 118 | }; 119 | /* End PBXProject section */ 120 | 121 | /* Begin PBXResourcesBuildPhase section */ 122 | 2A2EBF891D98873000745704 /* Resources */ = { 123 | isa = PBXResourcesBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | 2A8427DD27B8BDB200E4AEB8 /* README.md in Resources */, 127 | 2A2EBF951D98873000745704 /* Assets.xcassets in Resources */, 128 | 2A2EBF981D98873000745704 /* Main.storyboard in Resources */, 129 | ); 130 | runOnlyForDeploymentPostprocessing = 0; 131 | }; 132 | /* End PBXResourcesBuildPhase section */ 133 | 134 | /* Begin PBXSourcesBuildPhase section */ 135 | 2A2EBF871D98873000745704 /* Sources */ = { 136 | isa = PBXSourcesBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | 2A401FEE1D9D804300ACE036 /* Utilities.swift in Sources */, 140 | 2ACF62EE1DA661630063D684 /* WindowController.swift in Sources */, 141 | 2A2EBF911D98873000745704 /* TextViewController.swift in Sources */, 142 | 2A2EBF8F1D98873000745704 /* AppDelegate.swift in Sources */, 143 | 2A2EBF931D98873000745704 /* Document.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin PBXVariantGroup section */ 150 | 2A2EBF961D98873000745704 /* Main.storyboard */ = { 151 | isa = PBXVariantGroup; 152 | children = ( 153 | 2A2EBF971D98873000745704 /* Base */, 154 | ); 155 | name = Main.storyboard; 156 | sourceTree = ""; 157 | }; 158 | /* End PBXVariantGroup section */ 159 | 160 | /* Begin XCBuildConfiguration section */ 161 | 2A2EBF9A1D98873000745704 /* Debug */ = { 162 | isa = XCBuildConfiguration; 163 | buildSettings = { 164 | ALWAYS_SEARCH_USER_PATHS = NO; 165 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 166 | CLANG_ANALYZER_NONNULL = YES; 167 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 168 | CLANG_CXX_LIBRARY = "libc++"; 169 | CLANG_ENABLE_MODULES = YES; 170 | CLANG_ENABLE_OBJC_ARC = YES; 171 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 172 | CLANG_WARN_BOOL_CONVERSION = YES; 173 | CLANG_WARN_COMMA = YES; 174 | CLANG_WARN_CONSTANT_CONVERSION = YES; 175 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 176 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 177 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 178 | CLANG_WARN_EMPTY_BODY = YES; 179 | CLANG_WARN_ENUM_CONVERSION = YES; 180 | CLANG_WARN_INFINITE_RECURSION = YES; 181 | CLANG_WARN_INT_CONVERSION = YES; 182 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 183 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 184 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 185 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 186 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 187 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 188 | CLANG_WARN_STRICT_PROTOTYPES = YES; 189 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 190 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 191 | CLANG_WARN_UNREACHABLE_CODE = YES; 192 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 193 | CODE_SIGN_IDENTITY = "-"; 194 | COMBINE_HIDPI_IMAGES = YES; 195 | COPY_PHASE_STRIP = NO; 196 | DEAD_CODE_STRIPPING = YES; 197 | DEBUG_INFORMATION_FORMAT = dwarf; 198 | ENABLE_HARDENED_RUNTIME = YES; 199 | ENABLE_STRICT_OBJC_MSGSEND = YES; 200 | ENABLE_TESTABILITY = YES; 201 | GCC_C_LANGUAGE_STANDARD = gnu99; 202 | GCC_DYNAMIC_NO_PIC = NO; 203 | GCC_NO_COMMON_BLOCKS = YES; 204 | GCC_OPTIMIZATION_LEVEL = 0; 205 | GCC_PREPROCESSOR_DEFINITIONS = ( 206 | "DEBUG=1", 207 | "$(inherited)", 208 | ); 209 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 210 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 211 | GCC_WARN_UNDECLARED_SELECTOR = YES; 212 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 213 | GCC_WARN_UNUSED_FUNCTION = YES; 214 | GCC_WARN_UNUSED_VARIABLE = YES; 215 | LD_RUNPATH_SEARCH_PATHS = ( 216 | "$(inherited)", 217 | "@executable_path/../Frameworks", 218 | ); 219 | MACOSX_DEPLOYMENT_TARGET = 13.0; 220 | MTL_ENABLE_DEBUG_INFO = YES; 221 | ONLY_ACTIVE_ARCH = YES; 222 | SDKROOT = macosx; 223 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 224 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 225 | SWIFT_VERSION = 5.0; 226 | }; 227 | name = Debug; 228 | }; 229 | 2A2EBF9B1D98873000745704 /* Release */ = { 230 | isa = XCBuildConfiguration; 231 | buildSettings = { 232 | ALWAYS_SEARCH_USER_PATHS = NO; 233 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 234 | CLANG_ANALYZER_NONNULL = YES; 235 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 236 | CLANG_CXX_LIBRARY = "libc++"; 237 | CLANG_ENABLE_MODULES = YES; 238 | CLANG_ENABLE_OBJC_ARC = YES; 239 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 240 | CLANG_WARN_BOOL_CONVERSION = YES; 241 | CLANG_WARN_COMMA = YES; 242 | CLANG_WARN_CONSTANT_CONVERSION = YES; 243 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 244 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 245 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 246 | CLANG_WARN_EMPTY_BODY = YES; 247 | CLANG_WARN_ENUM_CONVERSION = YES; 248 | CLANG_WARN_INFINITE_RECURSION = YES; 249 | CLANG_WARN_INT_CONVERSION = YES; 250 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 251 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 252 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 253 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 254 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 255 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 256 | CLANG_WARN_STRICT_PROTOTYPES = YES; 257 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 258 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 259 | CLANG_WARN_UNREACHABLE_CODE = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | CODE_SIGN_IDENTITY = "-"; 262 | COMBINE_HIDPI_IMAGES = YES; 263 | COPY_PHASE_STRIP = NO; 264 | DEAD_CODE_STRIPPING = YES; 265 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 266 | ENABLE_HARDENED_RUNTIME = YES; 267 | ENABLE_NS_ASSERTIONS = NO; 268 | ENABLE_STRICT_OBJC_MSGSEND = YES; 269 | GCC_C_LANGUAGE_STANDARD = gnu99; 270 | GCC_NO_COMMON_BLOCKS = YES; 271 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 272 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 273 | GCC_WARN_UNDECLARED_SELECTOR = YES; 274 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 275 | GCC_WARN_UNUSED_FUNCTION = YES; 276 | GCC_WARN_UNUSED_VARIABLE = YES; 277 | LD_RUNPATH_SEARCH_PATHS = ( 278 | "$(inherited)", 279 | "@executable_path/../Frameworks", 280 | ); 281 | MACOSX_DEPLOYMENT_TARGET = 13.0; 282 | MTL_ENABLE_DEBUG_INFO = NO; 283 | SDKROOT = macosx; 284 | SWIFT_COMPILATION_MODE = wholemodule; 285 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 286 | SWIFT_VERSION = 5.0; 287 | }; 288 | name = Release; 289 | }; 290 | 2A2EBF9D1D98873000745704 /* Debug */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 294 | CODE_SIGN_IDENTITY = "-"; 295 | CURRENT_PROJECT_VERSION = 3; 296 | DEAD_CODE_STRIPPING = YES; 297 | GENERATE_INFOPLIST_FILE = YES; 298 | INFOPLIST_FILE = PlainEdit/Info.plist; 299 | INFOPLIST_KEY_NSHumanReadableCopyright = "© 2016-2022 1024jp"; 300 | INFOPLIST_KEY_NSMainStoryboardFile = Main; 301 | MARKETING_VERSION = 1.0.1; 302 | PRODUCT_BUNDLE_IDENTIFIER = com.wolfrosch.PlainEdit; 303 | PRODUCT_NAME = "$(TARGET_NAME)"; 304 | }; 305 | name = Debug; 306 | }; 307 | 2A2EBF9E1D98873000745704 /* Release */ = { 308 | isa = XCBuildConfiguration; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CODE_SIGN_IDENTITY = "-"; 312 | CURRENT_PROJECT_VERSION = 3; 313 | DEAD_CODE_STRIPPING = YES; 314 | GENERATE_INFOPLIST_FILE = YES; 315 | INFOPLIST_FILE = PlainEdit/Info.plist; 316 | INFOPLIST_KEY_NSHumanReadableCopyright = "© 2016-2022 1024jp"; 317 | INFOPLIST_KEY_NSMainStoryboardFile = Main; 318 | MARKETING_VERSION = 1.0.1; 319 | PRODUCT_BUNDLE_IDENTIFIER = com.wolfrosch.PlainEdit; 320 | PRODUCT_NAME = "$(TARGET_NAME)"; 321 | }; 322 | name = Release; 323 | }; 324 | /* End XCBuildConfiguration section */ 325 | 326 | /* Begin XCConfigurationList section */ 327 | 2A2EBF861D98873000745704 /* Build configuration list for PBXProject "PlainEdit" */ = { 328 | isa = XCConfigurationList; 329 | buildConfigurations = ( 330 | 2A2EBF9A1D98873000745704 /* Debug */, 331 | 2A2EBF9B1D98873000745704 /* Release */, 332 | ); 333 | defaultConfigurationIsVisible = 0; 334 | defaultConfigurationName = Release; 335 | }; 336 | 2A2EBF9C1D98873000745704 /* Build configuration list for PBXNativeTarget "PlainEdit" */ = { 337 | isa = XCConfigurationList; 338 | buildConfigurations = ( 339 | 2A2EBF9D1D98873000745704 /* Debug */, 340 | 2A2EBF9E1D98873000745704 /* Release */, 341 | ); 342 | defaultConfigurationIsVisible = 0; 343 | defaultConfigurationName = Release; 344 | }; 345 | /* End XCConfigurationList section */ 346 | }; 347 | rootObject = 2A2EBF831D98873000745704 /* Project object */; 348 | } 349 | -------------------------------------------------------------------------------- /PlainEdit/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 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 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | Default 510 | 511 | 512 | 513 | 514 | 515 | 516 | Left to Right 517 | 518 | 519 | 520 | 521 | 522 | 523 | Right to Left 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | Default 535 | 536 | 537 | 538 | 539 | 540 | 541 | Left to Right 542 | 543 | 544 | 545 | 546 | 547 | 548 | Right to Left 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | --------------------------------------------------------------------------------