├── CodeEditorDemo ├── Packages │ └── RealityKitContent │ │ ├── README.md │ │ ├── Sources │ │ └── RealityKitContent │ │ │ ├── RealityKitContent.swift │ │ │ └── RealityKitContent.rkassets │ │ │ ├── Scene.usda │ │ │ └── Materials │ │ │ └── GridMaterial.usda │ │ ├── Package.realitycomposerpro │ │ ├── WorkspaceData │ │ │ ├── Settings.rcprojectdata │ │ │ └── SceneMetadataList.json │ │ └── ProjectData │ │ │ └── main.json │ │ └── Package.swift ├── Shared │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── CodeEditorDemoApp.swift │ ├── CodeEditorDemoDocument.swift │ └── ContentView.swift ├── visionOS │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.solidimagestack │ │ │ ├── Back.solidimagestacklayer │ │ │ ├── Contents.json │ │ │ └── Content.imageset │ │ │ │ └── Contents.json │ │ │ ├── Front.solidimagestacklayer │ │ │ ├── Contents.json │ │ │ └── Content.imageset │ │ │ │ └── Contents.json │ │ │ ├── Middle.solidimagestacklayer │ │ │ ├── Contents.json │ │ │ └── Content.imageset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ └── Info.plist ├── CodeEditorDemo.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── CodeEditorDemo (iOS).xcscheme │ │ │ └── CodeEditorDemo (visionOS).xcscheme │ └── project.pbxproj ├── macOS │ ├── macOS.entitlements │ └── Info.plist └── iOS │ └── Info.plist ├── README.md ├── .gitignore └── LICENSE /CodeEditorDemo/Packages/RealityKitContent/README.md: -------------------------------------------------------------------------------- 1 | # RealityKitContent 2 | 3 | A description of this package. -------------------------------------------------------------------------------- /CodeEditorDemo/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This is the demo app for CodeEditorView 2 | 3 | Have a look at [CodeEditorView](https://github.com/mchakravarty/CodeEditorView) —a SwiftUI code editor view for iOS and macOS— for more details. 4 | -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Bundle for the RealityKitContent project 4 | public let realityKitContentBundle = Bundle.module 5 | -------------------------------------------------------------------------------- /CodeEditorDemo/CodeEditorDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CodeEditorDemo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "vision", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "vision", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "vision", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /CodeEditorDemo/CodeEditorDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CodeEditorDemo/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-write 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "layers" : [ 7 | { 8 | "filename" : "Front.solidimagestacklayer" 9 | }, 10 | { 11 | "filename" : "Middle.solidimagestacklayer" 12 | }, 13 | { 14 | "filename" : "Back.solidimagestacklayer" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/Settings.rcprojectdata: -------------------------------------------------------------------------------- 1 | { 2 | "cameraPresets" : { 3 | 4 | }, 5 | "secondaryToolbarData" : { 6 | "isGridVisible" : true, 7 | "sceneReverbPreset" : -1 8 | }, 9 | "unitDefaults" : { 10 | "°" : "°", 11 | "kg" : "g", 12 | "m" : "cm", 13 | "m\/s" : "m\/s", 14 | "m\/s²" : "m\/s²", 15 | "s" : "s" 16 | } 17 | } -------------------------------------------------------------------------------- /CodeEditorDemo/Shared/CodeEditorDemoApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CodeEditorDemoApp.swift 3 | // Shared 4 | // 5 | // Created by Manuel M T Chakravarty on 21/05/2021. 6 | // 7 | 8 | import SwiftUI 9 | 10 | import CodeEditorView 11 | 12 | 13 | @main 14 | struct CodeEditorDemoApp: App { 15 | 16 | var body: some Scene { 17 | 18 | DocumentGroup(newDocument: CodeEditorDemoDocument()) { file in 19 | ContentView(document: file.$document) 20 | } 21 | .commands { 22 | CodeEditingCommands() 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /CodeEditorDemo/CodeEditorDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "codeeditorview", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/mchakravarty/CodeEditorView.git", 7 | "state" : { 8 | "branch" : "main", 9 | "revision" : "345be67046eef74cd424855c01942db06627a9b6" 10 | } 11 | }, 12 | { 13 | "identity" : "rearrange", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/ChimeHQ/Rearrange.git", 16 | "state" : { 17 | "revision" : "5ff7f3363f7a08f77e0d761e38e6add31c2136e1", 18 | "version" : "1.8.1" 19 | } 20 | } 21 | ], 22 | "version" : 2 23 | } 24 | -------------------------------------------------------------------------------- /CodeEditorDemo/Shared/CodeEditorDemoDocument.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CodeEditorDemoDocument.swift 3 | // Shared 4 | // 5 | // Created by Manuel M T Chakravarty on 21/05/2021. 6 | // 7 | 8 | import SwiftUI 9 | import UniformTypeIdentifiers 10 | 11 | extension UTType { 12 | static var swiftSource: UTType { 13 | UTType(importedAs: "public.swift-source") 14 | } 15 | } 16 | 17 | struct CodeEditorDemoDocument: FileDocument { 18 | var text: String 19 | 20 | init(text: String = "") { 21 | self.text = text 22 | } 23 | 24 | static var readableContentTypes: [UTType] { [.swiftSource] } 25 | 26 | init(configuration: ReadConfiguration) throws { 27 | guard let data = configuration.file.regularFileContents, 28 | let string = String(data: data, encoding: .utf8) 29 | else { 30 | throw CocoaError(.fileReadCorruptFile) 31 | } 32 | text = string 33 | } 34 | 35 | func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper { 36 | let data = text.data(using: .utf8)! 37 | return .init(regularFileWithContents: data) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.9 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "RealityKitContent", 8 | products: [ 9 | // Products define the executables and libraries a package produces, and make them visible to other packages. 10 | .library( 11 | name: "RealityKitContent", 12 | targets: ["RealityKitContent"]), 13 | ], 14 | dependencies: [ 15 | // Dependencies declare other packages that this package depends on. 16 | // .package(url: /* package url */, from: "1.0.0"), 17 | ], 18 | targets: [ 19 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 20 | // Targets can depend on other targets in this package, and on products in packages this package depends on. 21 | .target( 22 | name: "RealityKitContent", 23 | dependencies: []), 24 | ] 25 | ) -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Package.realitycomposerpro/ProjectData/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "pathsToIds" : { 3 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/GridMaterial.usda" : "440DE5B4-E4E4-459B-AABF-9ACE96319272", 4 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/procedural_sphere_grid.usda" : "34C460AE-CA1B-4348-BD05-621ACBDFFE97", 5 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Scene.usda" : "0A9B4653-B11E-4D6A-850E-C6FCB621626C", 6 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Untitled Scene.usda" : "03E02005-EFA6-48D6-8A76-05B2822A74E9", 7 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/GridMaterial.usda" : "FBD8436F-6B8B-4B82-99B5-995D538B4704", 8 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/procedural_sphere_grid.usda" : "1CBF3893-ABFD-408C-8B91-045BFD257808", 9 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Scene.usda" : "26DBAE76-5DD8-47B6-A085-1B4ADA111097" 10 | } 11 | } -------------------------------------------------------------------------------- /CodeEditorDemo/visionOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDocumentTypes 6 | 7 | 8 | CFBundleTypeName 9 | Swift Source 10 | LSHandlerRank 11 | Default 12 | LSItemContentTypes 13 | 14 | public.swift-source 15 | 16 | 17 | 18 | UIApplicationSceneManifest 19 | 20 | UIApplicationPreferredDefaultSceneSessionRole 21 | UIWindowSceneSessionRoleApplication 22 | UIApplicationSupportsMultipleScenes 23 | 24 | UISceneConfigurations 25 | 26 | 27 | UTImportedTypeDeclarations 28 | 29 | 30 | UTTypeConformsTo 31 | 32 | public.plain-text 33 | 34 | UTTypeDescription 35 | Swift Source 36 | UTTypeIconFiles 37 | 38 | UTTypeIdentifier 39 | public.swift-source 40 | UTTypeTagSpecification 41 | 42 | public.filename-extension 43 | 44 | swift 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Scene.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | defaultPrim = "Root" 4 | metersPerUnit = 1 5 | upAxis = "Y" 6 | ) 7 | 8 | def Xform "Root" 9 | { 10 | reorder nameChildren = ["GridMaterial", "Sphere"] 11 | rel material:binding = None ( 12 | bindMaterialAs = "weakerThanDescendants" 13 | ) 14 | 15 | def Sphere "Sphere" ( 16 | active = true 17 | prepend apiSchemas = ["MaterialBindingAPI"] 18 | ) 19 | { 20 | rel material:binding = ( 21 | bindMaterialAs = "weakerThanDescendants" 22 | ) 23 | double radius = 0.05 24 | quatf xformOp:orient = (1, 0, 0, 0) 25 | float3 xformOp:scale = (1, 1, 1) 26 | float3 xformOp:translate = (0, 0, 0.0004) 27 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 28 | 29 | def RealityKitComponent "Collider" 30 | { 31 | uint group = 1 32 | uniform token info:id = "RealityKit.Collider" 33 | uint mask = 4294967295 34 | token type = "Default" 35 | 36 | def RealityKitStruct "Shape" 37 | { 38 | float3 extent = (0.2, 0.2, 0.2) 39 | float radius = 0.05 40 | token shapeType = "Sphere" 41 | } 42 | } 43 | 44 | def RealityKitComponent "InputTarget" 45 | { 46 | uniform token info:id = "RealityKit.InputTarget" 47 | } 48 | } 49 | 50 | def "GridMaterial" ( 51 | active = true 52 | prepend references = @Materials/GridMaterial.usda@ 53 | ) 54 | { 55 | float3 xformOp:scale = (1, 1, 1) 56 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /CodeEditorDemo/macOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeName 11 | Swift Source 12 | CFBundleTypeRole 13 | Editor 14 | LSHandlerRank 15 | Alternate 16 | LSItemContentTypes 17 | 18 | public.swift-source 19 | 20 | NSUbiquitousDocumentUserActivityType 21 | $(PRODUCT_BUNDLE_IDENTIFIER).swift 22 | 23 | 24 | CFBundleExecutable 25 | $(EXECUTABLE_NAME) 26 | CFBundleIconFile 27 | 28 | CFBundleIdentifier 29 | $(PRODUCT_BUNDLE_IDENTIFIER) 30 | CFBundleInfoDictionaryVersion 31 | 6.0 32 | CFBundleName 33 | $(PRODUCT_NAME) 34 | CFBundlePackageType 35 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 36 | CFBundleShortVersionString 37 | 1.0 38 | CFBundleVersion 39 | 1 40 | LSMinimumSystemVersion 41 | $(MACOSX_DEPLOYMENT_TARGET) 42 | UTImportedTypeDeclarations 43 | 44 | 45 | UTTypeConformsTo 46 | 47 | public.plain-text 48 | 49 | UTTypeDescription 50 | Swift Source 51 | UTTypeIcons 52 | 53 | UTTypeIdentifier 54 | public.swift-source 55 | UTTypeTagSpecification 56 | 57 | public.filename-extension 58 | 59 | swift 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /CodeEditorDemo/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeName 11 | Swift Source 12 | LSHandlerRank 13 | Alternate 14 | LSItemContentTypes 15 | 16 | public.swift-source 17 | 18 | NSUbiquitousDocumentUserActivityType 19 | $(PRODUCT_BUNDLE_IDENTIFIER).swift 20 | 21 | 22 | CFBundleExecutable 23 | $(EXECUTABLE_NAME) 24 | CFBundleIdentifier 25 | $(PRODUCT_BUNDLE_IDENTIFIER) 26 | CFBundleInfoDictionaryVersion 27 | 6.0 28 | CFBundleName 29 | $(PRODUCT_NAME) 30 | CFBundlePackageType 31 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 32 | CFBundleShortVersionString 33 | 1.0 34 | CFBundleVersion 35 | 1 36 | LSRequiresIPhoneOS 37 | 38 | LSSupportsOpeningDocumentsInPlace 39 | 40 | UIApplicationSceneManifest 41 | 42 | UIApplicationSupportsMultipleScenes 43 | 44 | 45 | UIApplicationSupportsIndirectInputEvents 46 | 47 | UILaunchScreen 48 | 49 | UIRequiredDeviceCapabilities 50 | 51 | armv7 52 | 53 | UISupportedInterfaceOrientations 54 | 55 | UIInterfaceOrientationPortrait 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | UISupportedInterfaceOrientations~ipad 60 | 61 | UIInterfaceOrientationPortrait 62 | UIInterfaceOrientationPortraitUpsideDown 63 | UIInterfaceOrientationLandscapeLeft 64 | UIInterfaceOrientationLandscapeRight 65 | 66 | UISupportsDocumentBrowser 67 | 68 | UTImportedTypeDeclarations 69 | 70 | 71 | UTTypeConformsTo 72 | 73 | public.plain-text 74 | 75 | UTTypeDescription 76 | Swift Source 77 | UTTypeIconFiles 78 | 79 | UTTypeIdentifier 80 | public.swift-source 81 | UTTypeTagSpecification 82 | 83 | public.filename-extension 84 | 85 | swift 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /CodeEditorDemo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | }, 93 | { 94 | "idiom" : "mac", 95 | "scale" : "1x", 96 | "size" : "16x16" 97 | }, 98 | { 99 | "idiom" : "mac", 100 | "scale" : "2x", 101 | "size" : "16x16" 102 | }, 103 | { 104 | "idiom" : "mac", 105 | "scale" : "1x", 106 | "size" : "32x32" 107 | }, 108 | { 109 | "idiom" : "mac", 110 | "scale" : "2x", 111 | "size" : "32x32" 112 | }, 113 | { 114 | "idiom" : "mac", 115 | "scale" : "1x", 116 | "size" : "128x128" 117 | }, 118 | { 119 | "idiom" : "mac", 120 | "scale" : "2x", 121 | "size" : "128x128" 122 | }, 123 | { 124 | "idiom" : "mac", 125 | "scale" : "1x", 126 | "size" : "256x256" 127 | }, 128 | { 129 | "idiom" : "mac", 130 | "scale" : "2x", 131 | "size" : "256x256" 132 | }, 133 | { 134 | "idiom" : "mac", 135 | "scale" : "1x", 136 | "size" : "512x512" 137 | }, 138 | { 139 | "idiom" : "mac", 140 | "scale" : "2x", 141 | "size" : "512x512" 142 | } 143 | ], 144 | "info" : { 145 | "author" : "xcode", 146 | "version" : 1 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /CodeEditorDemo/CodeEditorDemo.xcodeproj/xcshareddata/xcschemes/CodeEditorDemo (iOS).xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 42 | 44 | 50 | 51 | 52 | 53 | 59 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /CodeEditorDemo/CodeEditorDemo.xcodeproj/xcshareddata/xcschemes/CodeEditorDemo (visionOS).xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 35 | 41 | 42 | 43 | 44 | 45 | 55 | 57 | 63 | 64 | 65 | 66 | 72 | 74 | 80 | 81 | 82 | 83 | 85 | 86 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json: -------------------------------------------------------------------------------- 1 | { 2 | "0A9B4653-B11E-4D6A-850E-C6FCB621626C" : { 3 | "cameraTransform" : [ 4 | 0.9807314, 5 | -1.9820146e-10, 6 | -0.195361, 7 | 0, 8 | -0.10051192, 9 | 0.85749435, 10 | -0.5045798, 11 | 0, 12 | 0.16752096, 13 | 0.51449335, 14 | 0.84097165, 15 | 0, 16 | 0.09084191, 17 | 0.05849296, 18 | 0.13903293, 19 | 1 20 | ], 21 | "objectMetadataList" : [ 22 | [ 23 | "0A9B4653-B11E-4D6A-850E-C6FCB621626C", 24 | "Root" 25 | ], 26 | { 27 | "isExpanded" : true, 28 | "isLocked" : false 29 | }, 30 | [ 31 | "0A9B4653-B11E-4D6A-850E-C6FCB621626C", 32 | "Root", 33 | "GridMaterial" 34 | ], 35 | { 36 | "isExpanded" : true, 37 | "isLocked" : false 38 | }, 39 | [ 40 | "0A9B4653-B11E-4D6A-850E-C6FCB621626C", 41 | "Root", 42 | "Sphere" 43 | ], 44 | { 45 | "isExpanded" : true, 46 | "isLocked" : false 47 | } 48 | ] 49 | }, 50 | "1CBF3893-ABFD-408C-8B91-045BFD257808" : { 51 | "cameraTransform" : [ 52 | 0.99999994, 53 | 0, 54 | -0, 55 | 0, 56 | -0, 57 | 0.8660255, 58 | -0.49999988, 59 | 0, 60 | 0, 61 | 0.49999988, 62 | 0.8660255, 63 | 0, 64 | 0, 65 | 0.27093542, 66 | 0.46927398, 67 | 1 68 | ], 69 | "objectMetadataList" : [ 70 | 71 | ] 72 | }, 73 | "03E02005-EFA6-48D6-8A76-05B2822A74E9" : { 74 | "cameraTransform" : [ 75 | 0.99999994, 76 | 0, 77 | -0, 78 | 0, 79 | -0, 80 | 0.8660254, 81 | -0.49999994, 82 | 0, 83 | 0, 84 | 0.49999994, 85 | 0.8660254, 86 | 0, 87 | 0, 88 | 0.5981957, 89 | 1.0361054, 90 | 1 91 | ], 92 | "objectMetadataList" : [ 93 | 94 | ] 95 | }, 96 | "26DBAE76-5DD8-47B6-A085-1B4ADA111097" : { 97 | "cameraTransform" : [ 98 | 1, 99 | 0, 100 | -0, 101 | 0, 102 | -0, 103 | 0.7071069, 104 | -0.7071067, 105 | 0, 106 | 0, 107 | 0.7071067, 108 | 0.7071069, 109 | 0, 110 | 0, 111 | 0.2681068, 112 | 0.26850593, 113 | 1 114 | ], 115 | "objectMetadataList" : [ 116 | [ 117 | "26DBAE76-5DD8-47B6-A085-1B4ADA111097", 118 | "Root" 119 | ], 120 | { 121 | "isExpanded" : true, 122 | "isLocked" : false 123 | } 124 | ] 125 | }, 126 | "34C460AE-CA1B-4348-BD05-621ACBDFFE97" : { 127 | "cameraTransform" : [ 128 | 0.99999994, 129 | 0, 130 | -0, 131 | 0, 132 | -0, 133 | 0.8660255, 134 | -0.49999988, 135 | 0, 136 | 0, 137 | 0.49999988, 138 | 0.8660255, 139 | 0, 140 | 0, 141 | 0.27093542, 142 | 0.46927398, 143 | 1 144 | ], 145 | "objectMetadataList" : [ 146 | 147 | ] 148 | }, 149 | "440DE5B4-E4E4-459B-AABF-9ACE96319272" : { 150 | "cameraTransform" : [ 151 | 0.99999994, 152 | 0, 153 | -0, 154 | 0, 155 | -0, 156 | 0.8660254, 157 | -0.49999994, 158 | 0, 159 | 0, 160 | 0.49999994, 161 | 0.8660254, 162 | 0, 163 | 0, 164 | 0.5981957, 165 | 1.0361054, 166 | 1 167 | ], 168 | "objectMetadataList" : [ 169 | [ 170 | "440DE5B4-E4E4-459B-AABF-9ACE96319272", 171 | "Root" 172 | ], 173 | { 174 | "isExpanded" : true, 175 | "isLocked" : false 176 | } 177 | ] 178 | }, 179 | "FBD8436F-6B8B-4B82-99B5-995D538B4704" : { 180 | "cameraTransform" : [ 181 | 0.99999994, 182 | 0, 183 | -0, 184 | 0, 185 | -0, 186 | 0.8660254, 187 | -0.49999994, 188 | 0, 189 | 0, 190 | 0.49999994, 191 | 0.8660254, 192 | 0, 193 | 0, 194 | 0.5981957, 195 | 1.0361054, 196 | 1 197 | ], 198 | "objectMetadataList" : [ 199 | [ 200 | "FBD8436F-6B8B-4B82-99B5-995D538B4704", 201 | "Root" 202 | ], 203 | { 204 | "isExpanded" : true, 205 | "isLocked" : false 206 | } 207 | ] 208 | } 209 | } -------------------------------------------------------------------------------- /CodeEditorDemo/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Materials/GridMaterial.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | defaultPrim = "Root" 4 | metersPerUnit = 1 5 | upAxis = "Y" 6 | ) 7 | 8 | def Xform "Root" 9 | { 10 | def Material "GridMaterial" 11 | { 12 | reorder nameChildren = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "DefaultSurfaceShader", "MaterialXPreviewSurface", "Texcoord", "Add", "Multiply", "Fractional", "LineCounts", "Multiply_1", "Separate2", "Separate2_1", "Ifgreater", "Ifgreater_1", "Max", "Background_Color"] 13 | token outputs:mtlx:surface.connect = 14 | token outputs:realitykit:vertex 15 | token outputs:surface 16 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (2222, 300.5) 17 | float2 ui:nodegraph:realitykit:subgraphOutputs:size = (182, 89) 18 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 749 19 | 20 | def Shader "DefaultSurfaceShader" 21 | { 22 | uniform token info:id = "UsdPreviewSurface" 23 | color3f inputs:diffuseColor = (1, 1, 1) 24 | float inputs:roughness = 0.75 25 | token outputs:surface 26 | } 27 | 28 | def Shader "MaterialXPreviewSurface" 29 | { 30 | uniform token info:id = "ND_UsdPreviewSurface_surfaceshader" 31 | float inputs:clearcoat 32 | float inputs:clearcoatRoughness 33 | color3f inputs:diffuseColor.connect = 34 | color3f inputs:emissiveColor 35 | float inputs:ior 36 | float inputs:metallic = 0.15 37 | float3 inputs:normal 38 | float inputs:occlusion 39 | float inputs:opacity 40 | float inputs:opacityThreshold 41 | float inputs:roughness = 0.5 42 | token outputs:out 43 | float2 ui:nodegraph:node:pos = (1967, 300.5) 44 | float2 ui:nodegraph:node:size = (208, 297) 45 | int ui:nodegraph:node:stackingOrder = 870 46 | string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["Advanced"] 47 | } 48 | 49 | def Shader "Texcoord" 50 | { 51 | uniform token info:id = "ND_texcoord_vector2" 52 | float2 outputs:out 53 | float2 ui:nodegraph:node:pos = (94.14453, 35.29297) 54 | float2 ui:nodegraph:node:size = (182, 43) 55 | int ui:nodegraph:node:stackingOrder = 1358 56 | } 57 | 58 | def Shader "Multiply" 59 | { 60 | uniform token info:id = "ND_multiply_vector2" 61 | float2 inputs:in1.connect = 62 | float2 inputs:in2 = (32, 15) 63 | float2 inputs:in2.connect = 64 | float2 outputs:out 65 | float2 ui:nodegraph:node:pos = (275.64453, 47.29297) 66 | float2 ui:nodegraph:node:size = (61, 36) 67 | int ui:nodegraph:node:stackingOrder = 1348 68 | string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["inputs:in2"] 69 | } 70 | 71 | def Shader "Fractional" 72 | { 73 | uniform token info:id = "ND_realitykit_fractional_vector2" 74 | float2 inputs:in.connect = 75 | float2 outputs:out 76 | float2 ui:nodegraph:node:pos = (440.5, 49.5) 77 | float2 ui:nodegraph:node:size = (155, 99) 78 | int ui:nodegraph:node:stackingOrder = 1345 79 | } 80 | 81 | def Shader "BaseColor" 82 | { 83 | uniform token info:id = "ND_constant_color3" 84 | color3f inputs:value = (0.89737034, 0.89737034, 0.89737034) ( 85 | colorSpace = "Input - Texture - sRGB - sRGB" 86 | ) 87 | color3f inputs:value.connect = None 88 | color3f outputs:out 89 | float2 ui:nodegraph:node:pos = (1537.5977, 363.07812) 90 | float2 ui:nodegraph:node:size = (150, 43) 91 | int ui:nodegraph:node:stackingOrder = 1353 92 | } 93 | 94 | def Shader "LineColor" 95 | { 96 | uniform token info:id = "ND_constant_color3" 97 | color3f inputs:value = (0.55945957, 0.55945957, 0.55945957) ( 98 | colorSpace = "Input - Texture - sRGB - sRGB" 99 | ) 100 | color3f inputs:value.connect = None 101 | color3f outputs:out 102 | float2 ui:nodegraph:node:pos = (1536.9844, 287.86328) 103 | float2 ui:nodegraph:node:size = (146, 43) 104 | int ui:nodegraph:node:stackingOrder = 1355 105 | } 106 | 107 | def Shader "LineWidths" 108 | { 109 | uniform token info:id = "ND_combine2_vector2" 110 | float inputs:in1 = 0.1 111 | float inputs:in2 = 0.1 112 | float2 outputs:out 113 | float2 ui:nodegraph:node:pos = (443.64453, 233.79297) 114 | float2 ui:nodegraph:node:size = (151, 43) 115 | int ui:nodegraph:node:stackingOrder = 1361 116 | } 117 | 118 | def Shader "LineCounts" 119 | { 120 | uniform token info:id = "ND_combine2_vector2" 121 | float inputs:in1 = 24 122 | float inputs:in2 = 12 123 | float2 outputs:out 124 | float2 ui:nodegraph:node:pos = (94.14453, 138.29297) 125 | float2 ui:nodegraph:node:size = (153, 43) 126 | int ui:nodegraph:node:stackingOrder = 1359 127 | } 128 | 129 | def Shader "Remap" 130 | { 131 | uniform token info:id = "ND_remap_color3" 132 | color3f inputs:in.connect = 133 | color3f inputs:inhigh.connect = None 134 | color3f inputs:inlow.connect = None 135 | color3f inputs:outhigh.connect = 136 | color3f inputs:outlow.connect = 137 | color3f outputs:out 138 | float2 ui:nodegraph:node:pos = (1755.5, 300.5) 139 | float2 ui:nodegraph:node:size = (95, 171) 140 | int ui:nodegraph:node:stackingOrder = 1282 141 | string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["inputs:outlow"] 142 | } 143 | 144 | def Shader "Separate2" 145 | { 146 | uniform token info:id = "ND_separate2_vector2" 147 | float2 inputs:in.connect = 148 | float outputs:outx 149 | float outputs:outy 150 | float2 ui:nodegraph:node:pos = (1212.6445, 128.91797) 151 | float2 ui:nodegraph:node:size = (116, 117) 152 | int ui:nodegraph:node:stackingOrder = 1363 153 | } 154 | 155 | def Shader "Combine3" 156 | { 157 | uniform token info:id = "ND_combine3_color3" 158 | float inputs:in1.connect = 159 | float inputs:in2.connect = 160 | float inputs:in3.connect = 161 | color3f outputs:out 162 | float2 ui:nodegraph:node:pos = (1578.1445, 128.91797) 163 | float2 ui:nodegraph:node:size = (146, 54) 164 | int ui:nodegraph:node:stackingOrder = 1348 165 | } 166 | 167 | def Shader "Range" 168 | { 169 | uniform token info:id = "ND_range_vector2" 170 | bool inputs:doclamp = 1 171 | float2 inputs:gamma = (2, 2) 172 | float2 inputs:in.connect = 173 | float2 inputs:inhigh.connect = 174 | float2 inputs:inlow = (0.02, 0.02) 175 | float2 inputs:outhigh 176 | float2 inputs:outlow 177 | float2 outputs:out 178 | float2 ui:nodegraph:node:pos = (990.64453, 128.91797) 179 | float2 ui:nodegraph:node:size = (98, 207) 180 | int ui:nodegraph:node:stackingOrder = 1364 181 | } 182 | 183 | def Shader "Subtract" 184 | { 185 | uniform token info:id = "ND_subtract_vector2" 186 | float2 inputs:in1.connect = 187 | float2 inputs:in2.connect = 188 | float2 outputs:out 189 | float2 ui:nodegraph:node:pos = (612.64453, 87.04297) 190 | float2 ui:nodegraph:node:size = (63, 36) 191 | int ui:nodegraph:node:stackingOrder = 1348 192 | } 193 | 194 | def Shader "Absval" 195 | { 196 | uniform token info:id = "ND_absval_vector2" 197 | float2 inputs:in.connect = 198 | float2 outputs:out 199 | float2 ui:nodegraph:node:pos = (765.64453, 87.04297) 200 | float2 ui:nodegraph:node:size = (123, 43) 201 | int ui:nodegraph:node:stackingOrder = 1348 202 | } 203 | 204 | def Shader "Min" 205 | { 206 | uniform token info:id = "ND_min_float" 207 | float inputs:in1.connect = 208 | float inputs:in2.connect = 209 | float outputs:out 210 | float2 ui:nodegraph:node:pos = (1388.1445, 128.91797) 211 | float2 ui:nodegraph:node:size = (114, 36) 212 | int ui:nodegraph:node:stackingOrder = 1363 213 | } 214 | } 215 | } 216 | 217 | -------------------------------------------------------------------------------- /CodeEditorDemo/Shared/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Shared 4 | // 5 | // Created by Manuel M T Chakravarty on 21/05/2021. 6 | // 7 | 8 | import SwiftUI 9 | 10 | import LanguageSupport 11 | import CodeEditorView 12 | 13 | 14 | struct MessageEntry: View { 15 | @Binding var messages: Set> 16 | 17 | @Environment(\.presentationMode) private var presentationMode 18 | 19 | @State private var category: Message.Category = .error 20 | @State private var summary: String = "" 21 | @State private var lineStr: String = "" 22 | @State private var columnStr: String = "" 23 | @State private var message: String = "" 24 | 25 | var body: some View { 26 | VStack(spacing: 16) { 27 | 28 | Text("Enter a message to display in the code view") 29 | 30 | Form { 31 | 32 | Section(header: Text("Essentials")) { 33 | 34 | Picker("", selection: $category) { 35 | Text("Live").tag(Message.Category.live) 36 | Text("Error").tag(Message.Category.error) 37 | Text("Warning").tag(Message.Category.warning) 38 | Text("Informational").tag(Message.Category.informational) 39 | } 40 | .padding([.top, .bottom], 4) 41 | 42 | TextField("Summary", text: $summary) 43 | 44 | #if os(iOS) || os(visionOS) 45 | HStack { 46 | TextField("Line", text: $lineStr) 47 | TextField("Column", text: $columnStr) 48 | } 49 | #elseif os(macOS) 50 | TextField("Line", text: $lineStr) 51 | TextField("Column", text: $columnStr) 52 | #endif 53 | Text("Line and column numbers start at 1.") 54 | .font(.system(.footnote)) 55 | #if os(macOS) 56 | .padding([.bottom], 8) 57 | #endif 58 | 59 | } 60 | 61 | Section(header: Text("Detailed message")) { 62 | TextEditor(text: $message) 63 | .frame(height: 100) 64 | } 65 | 66 | } 67 | HStack { 68 | 69 | Button("Cancel"){ presentationMode.wrappedValue.dismiss() } 70 | .keyboardShortcut(.cancelAction) 71 | 72 | Spacer() 73 | 74 | Button("Submit message"){ 75 | 76 | let finalSummary = summary.isEmpty ? "Summary" : summary, 77 | line = Int(lineStr) ?? 1, 78 | column = Int(columnStr) ?? 1 79 | messages.insert(TextLocated(location: TextLocation(oneBasedLine: line, column: column), 80 | entity: Message(category: category, 81 | length: 1, 82 | summary: finalSummary, 83 | description: AttributedString(message)))) 84 | presentationMode.wrappedValue.dismiss() 85 | 86 | } 87 | .keyboardShortcut(.defaultAction) 88 | 89 | } 90 | } 91 | .padding(10) 92 | } 93 | } 94 | 95 | enum Language: Hashable { 96 | case swift 97 | case haskell 98 | 99 | var configuration: LanguageConfiguration { 100 | switch self { 101 | case .swift: .swift() 102 | case .haskell: .haskell() 103 | } 104 | } 105 | } 106 | 107 | struct ContentView: View { 108 | @Binding var document: CodeEditorDemoDocument 109 | 110 | @Environment(\.colorScheme) private var colorScheme: ColorScheme 111 | 112 | // NB: Writes to a @SceneStorage backed variable are somestimes (always?) not availabe in the update cycle where 113 | // the update occurs, but only one cycle later. That can lead to back and forth bouncing values and other 114 | // problems in views that take multiple bindings as arguments. 115 | @State private var editPosition: CodeEditor.Position = .init() 116 | 117 | @SceneStorage("editPosition") private var editPositionStorage: CodeEditor.Position? 118 | 119 | @State private var messages: Set> = Set () 120 | @State private var language: Language = .swift 121 | @State private var theme: ColorScheme? = nil 122 | @State private var showMessageEntry: Bool = false 123 | @State private var showMinimap: Bool = true 124 | @State private var wrapText: Bool = true 125 | @State private var indentPreference: CodeEditor.IndentationConfiguration.Preference = .preferSpaces 126 | @State private var tabWidth: Int = 2 127 | @State private var indentWidth: Int = 2 128 | @State private var tabKey: CodeEditor.IndentationConfiguration.TabKey = .identsInWhitespace 129 | @State private var indentOnReturn: Bool = true 130 | 131 | @FocusState private var editorIsFocused: Bool 132 | 133 | var body: some View { 134 | VStack(spacing: 0) { 135 | 136 | CodeEditor(text: $document.text, 137 | position: $editPosition, 138 | messages: $messages, 139 | language: language.configuration) 140 | .environment(\.codeEditorTheme, 141 | (theme ?? colorScheme) == .dark ? Theme.defaultDark : Theme.defaultLight) 142 | .environment(\.codeEditorLayoutConfiguration, 143 | CodeEditor.LayoutConfiguration(showMinimap: showMinimap, wrapText: wrapText)) 144 | .environment(\.codeEditorIndentationConfiguration, 145 | CodeEditor.IndentationConfiguration(preference: indentPreference, 146 | tabWidth: tabWidth, 147 | indentWidth: indentWidth, 148 | tabKey: tabKey, 149 | indentOnReturn: indentOnReturn)) 150 | .focused($editorIsFocused) 151 | 152 | VStack(alignment: .leading, spacing: 0) { 153 | 154 | HStack { 155 | 156 | Button("Add Message") { showMessageEntry = true } 157 | .sheet(isPresented: $showMessageEntry){ MessageEntry(messages: $messages) } 158 | 159 | Spacer() 160 | 161 | Picker("", selection: $language) { 162 | Text("Swift").tag(Language.swift) 163 | Text("Haskell").tag(Language.haskell) 164 | } 165 | .fixedSize() 166 | .padding() 167 | 168 | Picker("", selection: $theme) { 169 | Text("Default").tag(nil as ColorScheme?) 170 | Text("Light").tag(ColorScheme.light as ColorScheme?) 171 | Text("Dark").tag(ColorScheme.dark as ColorScheme?) 172 | } 173 | .fixedSize() 174 | .padding() 175 | 176 | Toggle("Show Minimap", isOn: $showMinimap) 177 | #if os(macOS) 178 | .toggleStyle(.checkbox) 179 | #else 180 | .toggleStyle(.button) 181 | #endif 182 | .padding() 183 | 184 | Toggle("Wrap Text", isOn: $wrapText) 185 | #if os(macOS) 186 | .toggleStyle(.checkbox) 187 | #else 188 | .toggleStyle(.button) 189 | #endif 190 | .padding() 191 | 192 | } 193 | 194 | HStack { 195 | 196 | Picker("", selection: $indentPreference) { 197 | Text("Prefer Spaces").tag(CodeEditor.IndentationConfiguration.Preference.preferSpaces) 198 | Text("Prefer Tabs").tag(CodeEditor.IndentationConfiguration.Preference.preferTabs) 199 | } 200 | .fixedSize() 201 | .padding() 202 | 203 | LabeledContent { 204 | TextField("", value: $tabWidth, format: .number) 205 | .frame(width: 30) 206 | } label: { 207 | Text("Tab Width:") 208 | } 209 | 210 | LabeledContent { 211 | TextField("", value: $indentWidth, format: .number) 212 | .frame(width: 30) 213 | } label: { 214 | Text("Indent Width:") 215 | } 216 | 217 | Picker("", selection: $tabKey) { 218 | Text("Indents in leading whitespace").tag(CodeEditor.IndentationConfiguration.TabKey.identsInWhitespace) 219 | Text("Indents always").tag(CodeEditor.IndentationConfiguration.TabKey.indentsAlways) 220 | Text("Inserts tab character").tag(CodeEditor.IndentationConfiguration.TabKey.insertsTab) 221 | } 222 | .fixedSize() 223 | .padding() 224 | 225 | Toggle("Indent after return", isOn: $indentOnReturn) 226 | #if os(macOS) 227 | .toggleStyle(.checkbox) 228 | #else 229 | .toggleStyle(.button) 230 | #endif 231 | .padding() 232 | 233 | 234 | } 235 | } 236 | .padding(EdgeInsets(top: 0, leading: 32, bottom: 8, trailing: 32)) 237 | .onAppear{ editorIsFocused = true } 238 | } 239 | .onChange(of: editPositionStorage == nil, initial: true) { 240 | if let editPositionStorage { 241 | editPosition = editPositionStorage 242 | } 243 | } 244 | .onChange(of: editPosition) { 245 | editPositionStorage = editPosition 246 | } 247 | 248 | } 249 | } 250 | 251 | // Mark: - 252 | // Mark: Previews 253 | 254 | struct MessageEntry_Previews: PreviewProvider { 255 | 256 | struct Container: View { 257 | @State var messages: Set> = Set() 258 | 259 | var body: some View { 260 | MessageEntry(messages: $messages) 261 | .preferredColorScheme(.dark) 262 | } 263 | } 264 | 265 | static var previews: some View { Container() } 266 | } 267 | 268 | struct ContentView_Previews: PreviewProvider { 269 | static var previews: some View { 270 | ContentView(document: .constant(CodeEditorDemoDocument(text: "var x = 5"))) 271 | .preferredColorScheme(.dark) 272 | } 273 | } 274 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /CodeEditorDemo/CodeEditorDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E72B9CB829BE2BBC00FA6B91 /* LanguageSupport in Frameworks */ = {isa = PBXBuildFile; productRef = E72B9CB729BE2BBC00FA6B91 /* LanguageSupport */; }; 11 | E78E16CF2B71288F003484F5 /* RealityKitContent in Frameworks */ = {isa = PBXBuildFile; productRef = E78E16CE2B71288F003484F5 /* RealityKitContent */; }; 12 | E78E16D82B712890003484F5 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E78E16D72B712890003484F5 /* Preview Assets.xcassets */; }; 13 | E78E16EB2B7128BC003484F5 /* CodeEditorView in Frameworks */ = {isa = PBXBuildFile; productRef = E78E16EA2B7128BC003484F5 /* CodeEditorView */; }; 14 | E78E16ED2B7128C2003484F5 /* LanguageSupport in Frameworks */ = {isa = PBXBuildFile; productRef = E78E16EC2B7128C2003484F5 /* LanguageSupport */; }; 15 | E78E16F22B7129F5003484F5 /* CodeEditorDemoDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F352658450A0026A5AE /* CodeEditorDemoDocument.swift */; }; 16 | E78E16F42B7130A5003484F5 /* CodeEditorDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F342658450A0026A5AE /* CodeEditorDemoApp.swift */; }; 17 | E78E16F52B7130A9003484F5 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F362658450A0026A5AE /* ContentView.swift */; }; 18 | E78E16F62B71312B003484F5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E7C36F372658450B0026A5AE /* Assets.xcassets */; }; 19 | E7C36F482658450B0026A5AE /* CodeEditorDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F342658450A0026A5AE /* CodeEditorDemoApp.swift */; }; 20 | E7C36F492658450B0026A5AE /* CodeEditorDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F342658450A0026A5AE /* CodeEditorDemoApp.swift */; }; 21 | E7C36F4A2658450B0026A5AE /* CodeEditorDemoDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F352658450A0026A5AE /* CodeEditorDemoDocument.swift */; }; 22 | E7C36F4B2658450B0026A5AE /* CodeEditorDemoDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F352658450A0026A5AE /* CodeEditorDemoDocument.swift */; }; 23 | E7C36F4C2658450B0026A5AE /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F362658450A0026A5AE /* ContentView.swift */; }; 24 | E7C36F4D2658450B0026A5AE /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7C36F362658450A0026A5AE /* ContentView.swift */; }; 25 | E7C36F4E2658450B0026A5AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E7C36F372658450B0026A5AE /* Assets.xcassets */; }; 26 | E7C36F4F2658450B0026A5AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E7C36F372658450B0026A5AE /* Assets.xcassets */; }; 27 | E7C36F5A265845370026A5AE /* CodeEditorView in Frameworks */ = {isa = PBXBuildFile; productRef = E7C36F59265845370026A5AE /* CodeEditorView */; }; 28 | E7C36F5D265845430026A5AE /* CodeEditorView in Frameworks */ = {isa = PBXBuildFile; productRef = E7C36F5C265845430026A5AE /* CodeEditorView */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | E78E16CA2B71288F003484F5 /* CodeEditorDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeEditorDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | E78E16CD2B71288F003484F5 /* RealityKitContent */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = RealityKitContent; sourceTree = ""; }; 34 | E78E16D42B712890003484F5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 35 | E78E16D72B712890003484F5 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 36 | E78E16D92B712890003484F5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | E7C36F342658450A0026A5AE /* CodeEditorDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeEditorDemoApp.swift; sourceTree = ""; }; 38 | E7C36F352658450A0026A5AE /* CodeEditorDemoDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeEditorDemoDocument.swift; sourceTree = ""; }; 39 | E7C36F362658450A0026A5AE /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 40 | E7C36F372658450B0026A5AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 41 | E7C36F3C2658450B0026A5AE /* CodeEditorDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeEditorDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | E7C36F3F2658450B0026A5AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | E7C36F442658450B0026A5AE /* CodeEditorDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeEditorDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | E7C36F462658450B0026A5AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | E7C36F472658450B0026A5AE /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | E78E16C72B71288F003484F5 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | E78E16CF2B71288F003484F5 /* RealityKitContent in Frameworks */, 54 | E78E16ED2B7128C2003484F5 /* LanguageSupport in Frameworks */, 55 | E78E16EB2B7128BC003484F5 /* CodeEditorView in Frameworks */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | E7C36F392658450B0026A5AE /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | E72B9CB829BE2BBC00FA6B91 /* LanguageSupport in Frameworks */, 64 | E7C36F5A265845370026A5AE /* CodeEditorView in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | E7C36F412658450B0026A5AE /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | E7C36F5D265845430026A5AE /* CodeEditorView in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | E78E16CB2B71288F003484F5 /* visionOS */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | E78E16D42B712890003484F5 /* Assets.xcassets */, 83 | E78E16D92B712890003484F5 /* Info.plist */, 84 | E78E16D62B712890003484F5 /* Preview Content */, 85 | ); 86 | path = visionOS; 87 | sourceTree = ""; 88 | }; 89 | E78E16CC2B71288F003484F5 /* Packages */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | E78E16CD2B71288F003484F5 /* RealityKitContent */, 93 | ); 94 | path = Packages; 95 | sourceTree = ""; 96 | }; 97 | E78E16D62B712890003484F5 /* Preview Content */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | E78E16D72B712890003484F5 /* Preview Assets.xcassets */, 101 | ); 102 | path = "Preview Content"; 103 | sourceTree = ""; 104 | }; 105 | E7C36F2E2658450A0026A5AE = { 106 | isa = PBXGroup; 107 | children = ( 108 | E7C36F332658450A0026A5AE /* Shared */, 109 | E7C36F3E2658450B0026A5AE /* iOS */, 110 | E7C36F452658450B0026A5AE /* macOS */, 111 | E78E16CB2B71288F003484F5 /* visionOS */, 112 | E78E16CC2B71288F003484F5 /* Packages */, 113 | E7C36F3D2658450B0026A5AE /* Products */, 114 | E7C36F5B265845430026A5AE /* Frameworks */, 115 | ); 116 | sourceTree = ""; 117 | }; 118 | E7C36F332658450A0026A5AE /* Shared */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | E7C36F342658450A0026A5AE /* CodeEditorDemoApp.swift */, 122 | E7C36F352658450A0026A5AE /* CodeEditorDemoDocument.swift */, 123 | E7C36F362658450A0026A5AE /* ContentView.swift */, 124 | E7C36F372658450B0026A5AE /* Assets.xcassets */, 125 | ); 126 | path = Shared; 127 | sourceTree = ""; 128 | }; 129 | E7C36F3D2658450B0026A5AE /* Products */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | E7C36F3C2658450B0026A5AE /* CodeEditorDemo.app */, 133 | E7C36F442658450B0026A5AE /* CodeEditorDemo.app */, 134 | E78E16CA2B71288F003484F5 /* CodeEditorDemo.app */, 135 | ); 136 | name = Products; 137 | sourceTree = ""; 138 | }; 139 | E7C36F3E2658450B0026A5AE /* iOS */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | E7C36F3F2658450B0026A5AE /* Info.plist */, 143 | ); 144 | path = iOS; 145 | sourceTree = ""; 146 | }; 147 | E7C36F452658450B0026A5AE /* macOS */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | E7C36F462658450B0026A5AE /* Info.plist */, 151 | E7C36F472658450B0026A5AE /* macOS.entitlements */, 152 | ); 153 | path = macOS; 154 | sourceTree = ""; 155 | }; 156 | E7C36F5B265845430026A5AE /* Frameworks */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | ); 160 | name = Frameworks; 161 | sourceTree = ""; 162 | }; 163 | /* End PBXGroup section */ 164 | 165 | /* Begin PBXNativeTarget section */ 166 | E78E16C92B71288F003484F5 /* CodeEditorDemo (visionOS) */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = E78E16E82B712890003484F5 /* Build configuration list for PBXNativeTarget "CodeEditorDemo (visionOS)" */; 169 | buildPhases = ( 170 | E78E16C62B71288F003484F5 /* Sources */, 171 | E78E16C72B71288F003484F5 /* Frameworks */, 172 | E78E16C82B71288F003484F5 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | E78E16F12B7129B1003484F5 /* PBXTargetDependency */, 178 | E78E16EF2B7129AA003484F5 /* PBXTargetDependency */, 179 | ); 180 | name = "CodeEditorDemo (visionOS)"; 181 | packageProductDependencies = ( 182 | E78E16CE2B71288F003484F5 /* RealityKitContent */, 183 | E78E16EA2B7128BC003484F5 /* CodeEditorView */, 184 | E78E16EC2B7128C2003484F5 /* LanguageSupport */, 185 | ); 186 | productName = CodeEditorDemo; 187 | productReference = E78E16CA2B71288F003484F5 /* CodeEditorDemo.app */; 188 | productType = "com.apple.product-type.application"; 189 | }; 190 | E7C36F3B2658450B0026A5AE /* CodeEditorDemo (iOS) */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = E7C36F522658450B0026A5AE /* Build configuration list for PBXNativeTarget "CodeEditorDemo (iOS)" */; 193 | buildPhases = ( 194 | E7C36F382658450B0026A5AE /* Sources */, 195 | E7C36F392658450B0026A5AE /* Frameworks */, 196 | E7C36F3A2658450B0026A5AE /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | E72B9CBE29BE32C100FA6B91 /* PBXTargetDependency */, 202 | E72B9CBC29BE32BB00FA6B91 /* PBXTargetDependency */, 203 | ); 204 | name = "CodeEditorDemo (iOS)"; 205 | packageProductDependencies = ( 206 | E7C36F59265845370026A5AE /* CodeEditorView */, 207 | E72B9CB729BE2BBC00FA6B91 /* LanguageSupport */, 208 | ); 209 | productName = "CodeEditorDemo (iOS)"; 210 | productReference = E7C36F3C2658450B0026A5AE /* CodeEditorDemo.app */; 211 | productType = "com.apple.product-type.application"; 212 | }; 213 | E7C36F432658450B0026A5AE /* CodeEditorDemo (macOS) */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = E7C36F552658450B0026A5AE /* Build configuration list for PBXNativeTarget "CodeEditorDemo (macOS)" */; 216 | buildPhases = ( 217 | E7C36F402658450B0026A5AE /* Sources */, 218 | E7C36F412658450B0026A5AE /* Frameworks */, 219 | E7C36F422658450B0026A5AE /* Resources */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | E72B9CC229BE32D800FA6B91 /* PBXTargetDependency */, 225 | E72B9CC029BE32D300FA6B91 /* PBXTargetDependency */, 226 | ); 227 | name = "CodeEditorDemo (macOS)"; 228 | packageProductDependencies = ( 229 | E7C36F5C265845430026A5AE /* CodeEditorView */, 230 | ); 231 | productName = "CodeEditorDemo (macOS)"; 232 | productReference = E7C36F442658450B0026A5AE /* CodeEditorDemo.app */; 233 | productType = "com.apple.product-type.application"; 234 | }; 235 | /* End PBXNativeTarget section */ 236 | 237 | /* Begin PBXProject section */ 238 | E7C36F2F2658450A0026A5AE /* Project object */ = { 239 | isa = PBXProject; 240 | attributes = { 241 | BuildIndependentTargetsInParallel = YES; 242 | LastSwiftUpdateCheck = 1520; 243 | LastUpgradeCheck = 1500; 244 | TargetAttributes = { 245 | E78E16C92B71288F003484F5 = { 246 | CreatedOnToolsVersion = 15.2; 247 | }; 248 | E7C36F3B2658450B0026A5AE = { 249 | CreatedOnToolsVersion = 12.5; 250 | }; 251 | E7C36F432658450B0026A5AE = { 252 | CreatedOnToolsVersion = 12.5; 253 | }; 254 | }; 255 | }; 256 | buildConfigurationList = E7C36F322658450A0026A5AE /* Build configuration list for PBXProject "CodeEditorDemo" */; 257 | compatibilityVersion = "Xcode 9.3"; 258 | developmentRegion = en; 259 | hasScannedForEncodings = 0; 260 | knownRegions = ( 261 | en, 262 | Base, 263 | ); 264 | mainGroup = E7C36F2E2658450A0026A5AE; 265 | packageReferences = ( 266 | E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */, 267 | ); 268 | productRefGroup = E7C36F3D2658450B0026A5AE /* Products */; 269 | projectDirPath = ""; 270 | projectRoot = ""; 271 | targets = ( 272 | E7C36F3B2658450B0026A5AE /* CodeEditorDemo (iOS) */, 273 | E7C36F432658450B0026A5AE /* CodeEditorDemo (macOS) */, 274 | E78E16C92B71288F003484F5 /* CodeEditorDemo (visionOS) */, 275 | ); 276 | }; 277 | /* End PBXProject section */ 278 | 279 | /* Begin PBXResourcesBuildPhase section */ 280 | E78E16C82B71288F003484F5 /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | E78E16F62B71312B003484F5 /* Assets.xcassets in Resources */, 285 | E78E16D82B712890003484F5 /* Preview Assets.xcassets in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | E7C36F3A2658450B0026A5AE /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | E7C36F4E2658450B0026A5AE /* Assets.xcassets in Resources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | E7C36F422658450B0026A5AE /* Resources */ = { 298 | isa = PBXResourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | E7C36F4F2658450B0026A5AE /* Assets.xcassets in Resources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | /* End PBXResourcesBuildPhase section */ 306 | 307 | /* Begin PBXSourcesBuildPhase section */ 308 | E78E16C62B71288F003484F5 /* Sources */ = { 309 | isa = PBXSourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | E78E16F52B7130A9003484F5 /* ContentView.swift in Sources */, 313 | E78E16F42B7130A5003484F5 /* CodeEditorDemoApp.swift in Sources */, 314 | E78E16F22B7129F5003484F5 /* CodeEditorDemoDocument.swift in Sources */, 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | E7C36F382658450B0026A5AE /* Sources */ = { 319 | isa = PBXSourcesBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | E7C36F482658450B0026A5AE /* CodeEditorDemoApp.swift in Sources */, 323 | E7C36F4A2658450B0026A5AE /* CodeEditorDemoDocument.swift in Sources */, 324 | E7C36F4C2658450B0026A5AE /* ContentView.swift in Sources */, 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | E7C36F402658450B0026A5AE /* Sources */ = { 329 | isa = PBXSourcesBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | E7C36F492658450B0026A5AE /* CodeEditorDemoApp.swift in Sources */, 333 | E7C36F4B2658450B0026A5AE /* CodeEditorDemoDocument.swift in Sources */, 334 | E7C36F4D2658450B0026A5AE /* ContentView.swift in Sources */, 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | }; 338 | /* End PBXSourcesBuildPhase section */ 339 | 340 | /* Begin PBXTargetDependency section */ 341 | E72B9CBC29BE32BB00FA6B91 /* PBXTargetDependency */ = { 342 | isa = PBXTargetDependency; 343 | productRef = E72B9CBB29BE32BB00FA6B91 /* LanguageSupport */; 344 | }; 345 | E72B9CBE29BE32C100FA6B91 /* PBXTargetDependency */ = { 346 | isa = PBXTargetDependency; 347 | productRef = E72B9CBD29BE32C100FA6B91 /* CodeEditorView */; 348 | }; 349 | E72B9CC029BE32D300FA6B91 /* PBXTargetDependency */ = { 350 | isa = PBXTargetDependency; 351 | productRef = E72B9CBF29BE32D300FA6B91 /* CodeEditorView */; 352 | }; 353 | E72B9CC229BE32D800FA6B91 /* PBXTargetDependency */ = { 354 | isa = PBXTargetDependency; 355 | productRef = E72B9CC129BE32D800FA6B91 /* LanguageSupport */; 356 | }; 357 | E78E16EF2B7129AA003484F5 /* PBXTargetDependency */ = { 358 | isa = PBXTargetDependency; 359 | productRef = E78E16EE2B7129AA003484F5 /* CodeEditorView */; 360 | }; 361 | E78E16F12B7129B1003484F5 /* PBXTargetDependency */ = { 362 | isa = PBXTargetDependency; 363 | productRef = E78E16F02B7129B1003484F5 /* LanguageSupport */; 364 | }; 365 | /* End PBXTargetDependency section */ 366 | 367 | /* Begin XCBuildConfiguration section */ 368 | E78E16E42B712890003484F5 /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 373 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 374 | CODE_SIGN_STYLE = Automatic; 375 | CURRENT_PROJECT_VERSION = 1; 376 | DEVELOPMENT_ASSET_PATHS = "\"visionOS/Preview Content\""; 377 | DEVELOPMENT_TEAM = CW7SX798PS; 378 | ENABLE_PREVIEWS = YES; 379 | GCC_C_LANGUAGE_STANDARD = gnu17; 380 | GENERATE_INFOPLIST_FILE = YES; 381 | INFOPLIST_FILE = visionOS/Info.plist; 382 | LD_RUNPATH_SEARCH_PATHS = ( 383 | "$(inherited)", 384 | "@executable_path/Frameworks", 385 | ); 386 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 387 | MARKETING_VERSION = 1.0; 388 | PRODUCT_BUNDLE_IDENTIFIER = co.applicative.CodeEditorDemo; 389 | PRODUCT_NAME = CodeEditorDemo; 390 | SDKROOT = xros; 391 | SUPPORTED_PLATFORMS = "xros xrsimulator"; 392 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 393 | SWIFT_EMIT_LOC_STRINGS = YES; 394 | SWIFT_VERSION = 5.0; 395 | TARGETED_DEVICE_FAMILY = "1,2,7"; 396 | XROS_DEPLOYMENT_TARGET = 1.0; 397 | }; 398 | name = Debug; 399 | }; 400 | E78E16E52B712890003484F5 /* Release */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 404 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 405 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 406 | CODE_SIGN_STYLE = Automatic; 407 | CURRENT_PROJECT_VERSION = 1; 408 | DEVELOPMENT_ASSET_PATHS = "\"visionOS/Preview Content\""; 409 | DEVELOPMENT_TEAM = CW7SX798PS; 410 | ENABLE_PREVIEWS = YES; 411 | GCC_C_LANGUAGE_STANDARD = gnu17; 412 | GENERATE_INFOPLIST_FILE = YES; 413 | INFOPLIST_FILE = visionOS/Info.plist; 414 | LD_RUNPATH_SEARCH_PATHS = ( 415 | "$(inherited)", 416 | "@executable_path/Frameworks", 417 | ); 418 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 419 | MARKETING_VERSION = 1.0; 420 | PRODUCT_BUNDLE_IDENTIFIER = co.applicative.CodeEditorDemo; 421 | PRODUCT_NAME = CodeEditorDemo; 422 | SDKROOT = xros; 423 | SUPPORTED_PLATFORMS = "xros xrsimulator"; 424 | SWIFT_EMIT_LOC_STRINGS = YES; 425 | SWIFT_VERSION = 5.0; 426 | TARGETED_DEVICE_FAMILY = "1,2,7"; 427 | VALIDATE_PRODUCT = YES; 428 | XROS_DEPLOYMENT_TARGET = 1.0; 429 | }; 430 | name = Release; 431 | }; 432 | E7C36F502658450B0026A5AE /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 437 | CLANG_ANALYZER_NONNULL = YES; 438 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 439 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 440 | CLANG_CXX_LIBRARY = "libc++"; 441 | CLANG_ENABLE_MODULES = YES; 442 | CLANG_ENABLE_OBJC_ARC = YES; 443 | CLANG_ENABLE_OBJC_WEAK = YES; 444 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 445 | CLANG_WARN_BOOL_CONVERSION = YES; 446 | CLANG_WARN_COMMA = YES; 447 | CLANG_WARN_CONSTANT_CONVERSION = YES; 448 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 449 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 450 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 451 | CLANG_WARN_EMPTY_BODY = YES; 452 | CLANG_WARN_ENUM_CONVERSION = YES; 453 | CLANG_WARN_INFINITE_RECURSION = YES; 454 | CLANG_WARN_INT_CONVERSION = YES; 455 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 456 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 457 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 458 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 459 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 460 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 461 | CLANG_WARN_STRICT_PROTOTYPES = YES; 462 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 463 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 464 | CLANG_WARN_UNREACHABLE_CODE = YES; 465 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 466 | COPY_PHASE_STRIP = NO; 467 | DEAD_CODE_STRIPPING = YES; 468 | DEBUG_INFORMATION_FORMAT = dwarf; 469 | ENABLE_STRICT_OBJC_MSGSEND = YES; 470 | ENABLE_TESTABILITY = YES; 471 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 472 | GCC_C_LANGUAGE_STANDARD = gnu11; 473 | GCC_DYNAMIC_NO_PIC = NO; 474 | GCC_NO_COMMON_BLOCKS = YES; 475 | GCC_OPTIMIZATION_LEVEL = 0; 476 | GCC_PREPROCESSOR_DEFINITIONS = ( 477 | "DEBUG=1", 478 | "$(inherited)", 479 | ); 480 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 481 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 482 | GCC_WARN_UNDECLARED_SELECTOR = YES; 483 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 484 | GCC_WARN_UNUSED_FUNCTION = YES; 485 | GCC_WARN_UNUSED_VARIABLE = YES; 486 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 487 | MTL_FAST_MATH = YES; 488 | ONLY_ACTIVE_ARCH = YES; 489 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 490 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 491 | }; 492 | name = Debug; 493 | }; 494 | E7C36F512658450B0026A5AE /* Release */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | ALWAYS_SEARCH_USER_PATHS = NO; 498 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 499 | CLANG_ANALYZER_NONNULL = YES; 500 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 501 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 502 | CLANG_CXX_LIBRARY = "libc++"; 503 | CLANG_ENABLE_MODULES = YES; 504 | CLANG_ENABLE_OBJC_ARC = YES; 505 | CLANG_ENABLE_OBJC_WEAK = YES; 506 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 507 | CLANG_WARN_BOOL_CONVERSION = YES; 508 | CLANG_WARN_COMMA = YES; 509 | CLANG_WARN_CONSTANT_CONVERSION = YES; 510 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 511 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 512 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 513 | CLANG_WARN_EMPTY_BODY = YES; 514 | CLANG_WARN_ENUM_CONVERSION = YES; 515 | CLANG_WARN_INFINITE_RECURSION = YES; 516 | CLANG_WARN_INT_CONVERSION = YES; 517 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 518 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 519 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 520 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 521 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 522 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 523 | CLANG_WARN_STRICT_PROTOTYPES = YES; 524 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 525 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 526 | CLANG_WARN_UNREACHABLE_CODE = YES; 527 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 528 | COPY_PHASE_STRIP = NO; 529 | DEAD_CODE_STRIPPING = YES; 530 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 531 | ENABLE_NS_ASSERTIONS = NO; 532 | ENABLE_STRICT_OBJC_MSGSEND = YES; 533 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 534 | GCC_C_LANGUAGE_STANDARD = gnu11; 535 | GCC_NO_COMMON_BLOCKS = YES; 536 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 537 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 538 | GCC_WARN_UNDECLARED_SELECTOR = YES; 539 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 540 | GCC_WARN_UNUSED_FUNCTION = YES; 541 | GCC_WARN_UNUSED_VARIABLE = YES; 542 | MTL_ENABLE_DEBUG_INFO = NO; 543 | MTL_FAST_MATH = YES; 544 | SWIFT_COMPILATION_MODE = wholemodule; 545 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 546 | }; 547 | name = Release; 548 | }; 549 | E7C36F532658450B0026A5AE /* Debug */ = { 550 | isa = XCBuildConfiguration; 551 | buildSettings = { 552 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 553 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 554 | CODE_SIGN_STYLE = Automatic; 555 | DEVELOPMENT_TEAM = CW7SX798PS; 556 | ENABLE_PREVIEWS = YES; 557 | INFOPLIST_FILE = iOS/Info.plist; 558 | IPHONEOS_DEPLOYMENT_TARGET = 17.0; 559 | LD_RUNPATH_SEARCH_PATHS = ( 560 | "$(inherited)", 561 | "@executable_path/Frameworks", 562 | ); 563 | PRODUCT_BUNDLE_IDENTIFIER = co.applicative.CodeEditorDemo; 564 | PRODUCT_NAME = CodeEditorDemo; 565 | SDKROOT = iphoneos; 566 | SWIFT_VERSION = 5.0; 567 | TARGETED_DEVICE_FAMILY = "1,2"; 568 | }; 569 | name = Debug; 570 | }; 571 | E7C36F542658450B0026A5AE /* Release */ = { 572 | isa = XCBuildConfiguration; 573 | buildSettings = { 574 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 575 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 576 | CODE_SIGN_STYLE = Automatic; 577 | DEVELOPMENT_TEAM = CW7SX798PS; 578 | ENABLE_PREVIEWS = YES; 579 | INFOPLIST_FILE = iOS/Info.plist; 580 | IPHONEOS_DEPLOYMENT_TARGET = 17.0; 581 | LD_RUNPATH_SEARCH_PATHS = ( 582 | "$(inherited)", 583 | "@executable_path/Frameworks", 584 | ); 585 | PRODUCT_BUNDLE_IDENTIFIER = co.applicative.CodeEditorDemo; 586 | PRODUCT_NAME = CodeEditorDemo; 587 | SDKROOT = iphoneos; 588 | SWIFT_VERSION = 5.0; 589 | TARGETED_DEVICE_FAMILY = "1,2"; 590 | VALIDATE_PRODUCT = YES; 591 | }; 592 | name = Release; 593 | }; 594 | E7C36F562658450B0026A5AE /* Debug */ = { 595 | isa = XCBuildConfiguration; 596 | buildSettings = { 597 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 598 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 599 | CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements; 600 | CODE_SIGN_IDENTITY = "-"; 601 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; 602 | CODE_SIGN_STYLE = Automatic; 603 | COMBINE_HIDPI_IMAGES = YES; 604 | DEAD_CODE_STRIPPING = YES; 605 | DEVELOPMENT_TEAM = CW7SX798PS; 606 | ENABLE_HARDENED_RUNTIME = YES; 607 | ENABLE_PREVIEWS = YES; 608 | INFOPLIST_FILE = macOS/Info.plist; 609 | LD_RUNPATH_SEARCH_PATHS = ( 610 | "$(inherited)", 611 | "@executable_path/../Frameworks", 612 | ); 613 | MACOSX_DEPLOYMENT_TARGET = 14.0; 614 | PRODUCT_BUNDLE_IDENTIFIER = co.applicative.CodeEditorDemo; 615 | PRODUCT_NAME = CodeEditorDemo; 616 | SDKROOT = macosx; 617 | SWIFT_VERSION = 5.0; 618 | }; 619 | name = Debug; 620 | }; 621 | E7C36F572658450B0026A5AE /* Release */ = { 622 | isa = XCBuildConfiguration; 623 | buildSettings = { 624 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 625 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 626 | CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements; 627 | CODE_SIGN_IDENTITY = "-"; 628 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; 629 | CODE_SIGN_STYLE = Automatic; 630 | COMBINE_HIDPI_IMAGES = YES; 631 | DEAD_CODE_STRIPPING = YES; 632 | DEVELOPMENT_TEAM = CW7SX798PS; 633 | ENABLE_HARDENED_RUNTIME = YES; 634 | ENABLE_PREVIEWS = YES; 635 | INFOPLIST_FILE = macOS/Info.plist; 636 | LD_RUNPATH_SEARCH_PATHS = ( 637 | "$(inherited)", 638 | "@executable_path/../Frameworks", 639 | ); 640 | MACOSX_DEPLOYMENT_TARGET = 14.0; 641 | PRODUCT_BUNDLE_IDENTIFIER = co.applicative.CodeEditorDemo; 642 | PRODUCT_NAME = CodeEditorDemo; 643 | SDKROOT = macosx; 644 | SWIFT_VERSION = 5.0; 645 | }; 646 | name = Release; 647 | }; 648 | /* End XCBuildConfiguration section */ 649 | 650 | /* Begin XCConfigurationList section */ 651 | E78E16E82B712890003484F5 /* Build configuration list for PBXNativeTarget "CodeEditorDemo (visionOS)" */ = { 652 | isa = XCConfigurationList; 653 | buildConfigurations = ( 654 | E78E16E42B712890003484F5 /* Debug */, 655 | E78E16E52B712890003484F5 /* Release */, 656 | ); 657 | defaultConfigurationIsVisible = 0; 658 | defaultConfigurationName = Release; 659 | }; 660 | E7C36F322658450A0026A5AE /* Build configuration list for PBXProject "CodeEditorDemo" */ = { 661 | isa = XCConfigurationList; 662 | buildConfigurations = ( 663 | E7C36F502658450B0026A5AE /* Debug */, 664 | E7C36F512658450B0026A5AE /* Release */, 665 | ); 666 | defaultConfigurationIsVisible = 0; 667 | defaultConfigurationName = Release; 668 | }; 669 | E7C36F522658450B0026A5AE /* Build configuration list for PBXNativeTarget "CodeEditorDemo (iOS)" */ = { 670 | isa = XCConfigurationList; 671 | buildConfigurations = ( 672 | E7C36F532658450B0026A5AE /* Debug */, 673 | E7C36F542658450B0026A5AE /* Release */, 674 | ); 675 | defaultConfigurationIsVisible = 0; 676 | defaultConfigurationName = Release; 677 | }; 678 | E7C36F552658450B0026A5AE /* Build configuration list for PBXNativeTarget "CodeEditorDemo (macOS)" */ = { 679 | isa = XCConfigurationList; 680 | buildConfigurations = ( 681 | E7C36F562658450B0026A5AE /* Debug */, 682 | E7C36F572658450B0026A5AE /* Release */, 683 | ); 684 | defaultConfigurationIsVisible = 0; 685 | defaultConfigurationName = Release; 686 | }; 687 | /* End XCConfigurationList section */ 688 | 689 | /* Begin XCRemoteSwiftPackageReference section */ 690 | E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */ = { 691 | isa = XCRemoteSwiftPackageReference; 692 | repositoryURL = "https://github.com/mchakravarty/CodeEditorView.git"; 693 | requirement = { 694 | branch = main; 695 | kind = branch; 696 | }; 697 | }; 698 | /* End XCRemoteSwiftPackageReference section */ 699 | 700 | /* Begin XCSwiftPackageProductDependency section */ 701 | E72B9CB729BE2BBC00FA6B91 /* LanguageSupport */ = { 702 | isa = XCSwiftPackageProductDependency; 703 | package = E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */; 704 | productName = LanguageSupport; 705 | }; 706 | E72B9CBB29BE32BB00FA6B91 /* LanguageSupport */ = { 707 | isa = XCSwiftPackageProductDependency; 708 | productName = LanguageSupport; 709 | }; 710 | E72B9CBD29BE32C100FA6B91 /* CodeEditorView */ = { 711 | isa = XCSwiftPackageProductDependency; 712 | productName = CodeEditorView; 713 | }; 714 | E72B9CBF29BE32D300FA6B91 /* CodeEditorView */ = { 715 | isa = XCSwiftPackageProductDependency; 716 | productName = CodeEditorView; 717 | }; 718 | E72B9CC129BE32D800FA6B91 /* LanguageSupport */ = { 719 | isa = XCSwiftPackageProductDependency; 720 | productName = LanguageSupport; 721 | }; 722 | E78E16CE2B71288F003484F5 /* RealityKitContent */ = { 723 | isa = XCSwiftPackageProductDependency; 724 | productName = RealityKitContent; 725 | }; 726 | E78E16EA2B7128BC003484F5 /* CodeEditorView */ = { 727 | isa = XCSwiftPackageProductDependency; 728 | productName = CodeEditorView; 729 | }; 730 | E78E16EC2B7128C2003484F5 /* LanguageSupport */ = { 731 | isa = XCSwiftPackageProductDependency; 732 | productName = LanguageSupport; 733 | }; 734 | E78E16EE2B7129AA003484F5 /* CodeEditorView */ = { 735 | isa = XCSwiftPackageProductDependency; 736 | package = E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */; 737 | productName = CodeEditorView; 738 | }; 739 | E78E16F02B7129B1003484F5 /* LanguageSupport */ = { 740 | isa = XCSwiftPackageProductDependency; 741 | package = E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */; 742 | productName = LanguageSupport; 743 | }; 744 | E7C36F59265845370026A5AE /* CodeEditorView */ = { 745 | isa = XCSwiftPackageProductDependency; 746 | package = E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */; 747 | productName = CodeEditorView; 748 | }; 749 | E7C36F5C265845430026A5AE /* CodeEditorView */ = { 750 | isa = XCSwiftPackageProductDependency; 751 | package = E7C36F58265845370026A5AE /* XCRemoteSwiftPackageReference "CodeEditorView" */; 752 | productName = CodeEditorView; 753 | }; 754 | /* End XCSwiftPackageProductDependency section */ 755 | }; 756 | rootObject = E7C36F2F2658450A0026A5AE /* Project object */; 757 | } 758 | --------------------------------------------------------------------------------