🪞 Swift wrapper for CodeMirror 6

Overview
You might also like...
Thin wrapper around NSURLSession in swift. Simplifies HTTP requests.

SwiftHTTP SwiftHTTP is a thin wrapper around NSURLSession in Swift to simplify HTTP requests. Features Convenient Closure APIs Simple Queue Support Pa

SimplePDF is a wrapper of UIGraphics PDF context written in Swift.
SimplePDF is a wrapper of UIGraphics PDF context written in Swift.

SimplePDF is a wrapper of UIGraphics PDF context written in Swift. You can: add texts, images, spaces and lines, table set up page layout, adjust cont

A wrapper for Apple's Common Crypto library written in Swift.

IDZSwiftCommonCrypto A Swift wrapper for Apple's CommonCrypto library. IDZSwiftCommonCrypto works with both CocoaPods and Cathage. For more details on

Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.
Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.

KeychainAccess KeychainAccess is a simple Swift wrapper for Keychain that works on iOS and OS X. Makes using Keychain APIs extremely easy and much mor

A simple Swift Keychain Wrapper for iOS, watchOS, and OS X.

Latch A simple Swift 2.0 Keychain Wrapper for iOS, watchOS 2, and OS X. Usage A proper example of how to use Latch can be seen in the tests. import La

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.

SwiftKeychainWrapper A simple wrapper for the iOS / tvOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift. Prov

💡 A light Swift wrapper around Objective-C Runtime
💡 A light Swift wrapper around Objective-C Runtime

A light wrapper around Objective-C Runtime. What exactly is lumos? lumos as mentioned is a light wrapper around objective-c runtime functions to allow

UTIKit is an UTI (Uniform Type Identifier) wrapper for Swift.

UTIKit UTIKit is an UTI (Uniform Type Identifier) wrapper for Swift. Features UTIKit is a full featured library including entire UTI functions. Conver

A Swift wrapper for the FFmpeg API

SwiftFFmpeg A Swift wrapper for the FFmpeg API. Note: SwiftFFmpeg is still in development, and the API is not guaranteed to be stable. It's subject to

A simple Swift wrapper for libgd

SwiftGD This is a simple Swift wrapper for libgd, allowing for basic graphic rendering on server-side Swift where Core Graphics is not available. Alth

A Swift wrapper around the CoreSymbolication private framework on macOS.

CoreSymbolication provides a very powerful system for looking up and extracting symbolic information from mach-o executables, dyld shared caches, and dSYMs.

A Swift wrapper for forward and reverse geocoding of OpenStreetMap data

Nominatim NominatimKit is a Swift wrapper for forward and reverse geocoding of OpenStreetMap data. Why? Geocoding location data on iOS requires the us

Http Request wrapper written in Swift

Net Net is a HttpRequest wrapper written in Swift Features GET, POST, PUT, DELETE method Powerful request params: nested params, number, string, dic,

A wrapper of Grand Central Dispatch written in Swift

GCD A wrapper of Grand Central Dispatch written in Swift. Examples gcd // submit your code for asynchronous execution on a global queue with high prio

A WIP Swift wrapper for Discord's Bot API.

Quickcord Quickcord is a WIP Swift wrapper for Discord's Bot API. Features (As of right now) Connecting the the gateway and identifying. Literally eve

Demonstration code for a simple Swift property-wrapper, keypath-based dependency injection system. The keypaths ensure compile-time safety for all injectable services.

Injectable Demo Preliminary musings and demonstration code for a simple Swift property-wrapper, keypath-based dependency injection system. The keypath

Swift wrapper for custom ViewController presentations on iOS
Swift wrapper for custom ViewController presentations on iOS

Presentr is a simple customizable wrapper for the Custom View Controller Presentation API introduced in iOS 8. About iOS let's you modally present any

CoreData/Realm sweet wrapper written in Swift
CoreData/Realm sweet wrapper written in Swift

What is SugarRecord? SugarRecord is a persistence wrapper designed to make working with persistence solutions like CoreData in a much easier way. Than

Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.
Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.

KeychainAccess KeychainAccess is a simple Swift wrapper for Keychain that works on iOS and OS X. Makes using Keychain APIs extremely easy and much mor

Comments
  • Minor Issues Affecting Compilation (Solutions Provided)

    Minor Issues Affecting Compilation (Solutions Provided)

    Thanks for putting this package together!

    I've run into a couple of issues I wanted to make you aware of. [I considered opening a separate issue for the compilation issues, vs. the SPM package search issue - you will probably want to track them separately. But I don't want to clutter your issues list.]

    Ambiguous Package Name

    When I try loading your package Xcode points to a different package than the url you provided, my guess is that both these packages are being searched for in a non-case-specific way, so they look the same. (CodeMirror-Swift vs codemirror-swift)

    I specify https://github.com/khoi/codemirror-swift, but this link appears in Xcode https://github.com/ProxymanApp/CodeMirror-Swift - which does not use CodeMirror 6.0

    Compilation Errors

    I tried using your url inside a Package.swift file in a local package instead [this worked], and the package doesn’t compile due to these errors:

    CodeMirrorWebView.swift:39:43: error: cannot find type 'NSRect' in scope and CodeMirrorWebView.swift:39:21: error: initializer does not override a designated initializer from its superclass

    It looks like these two lines need to conditionally compile based on when using AppKit, vs using UIKit/SwiftUI.

    Something like this would solve that:

    #if os(OSX)
        import AppKit
        public typealias NativeRect = NSRect
    #elseif os(iOS)
        import UIKit
        public typealias NativeRect = CGRect
    #endif
    

    There's a third issue with the main module, which I haven't researched/resolved, so I'm using a workaround:

    CodeMirrorWebView.swift:98:17: error: value of type 'WKWebView' has no member 'allowsMagnification'

    Since WKWebView does not have an allowsMagnification property, I commented it out.

    With these errors corrected, the test module fails:

    codemirror-swift-main/Tests/CodeMirrorTests/CodeMirrorTests.swift:10:24: error: cannot call value of non-function type 'module<CodeMirror>'
            XCTAssertEqual(CodeMirror().text, "Hello, World!")
    

    By commenting out the assertion I did get a successful compile. This is not a final solution but it allows me to try to actually use your package.

    I'll let you know how I make out when I swap in your package to my existing app (which uses CodeMirror 5.x).

    After making those 3 changes the package successfully compiles

    opened by Mozahler 3
Owner
khoi
khoi
Vim runtime files for Swift

Swift.vim Syntax and indent files for Swift If you don't have a preferred installation method check out vim-plug. Examples Syntastic Integration swift

Keith Smiley 787 Dec 1, 2022
A modern Swift (5.6) syntax definition for Sublime Text 4

Swift for Sublime This is a WIP version of a modern Swift (5.6) syntax for Sublime Text 4. It uses the latest features of the Sublime Text syntax engi

Will Bond 13 Dec 5, 2022
🪞 Swift wrapper for CodeMirror 6

?? Swift wrapper for CodeMirror 6

khoi 4 Jan 3, 2023
Swift-ndi - Swift wrapper around NewTek's NDI SDK

swift-ndi Swift wrapper around NewTek's NDI SDK. Make sure you extracted latest

Alessio Nossa 12 Dec 29, 2022
Swift Reddit API Wrapper

reddift reddift is Swift Reddit API Wrapper framework, and includes a browser is developed using the framework. Supports OAuth2(is not supported on tv

sonson 236 Dec 28, 2022
A stand-alone Swift wrapper around the mongo-c client library, enabling access to MongoDB servers.

This package is deprecated in favour of the official Mongo Swift Driver. We advise users to switch to that pack

PerfectlySoft Inc. 54 Jul 9, 2022
Perfect - a Swift wrapper around the MySQL client library, enabling access to MySQL database servers.

Perfect - MySQL Connector This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers. This packa

PerfectlySoft Inc. 119 Dec 16, 2022
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

Perfect - PostgreSQL Connector This project provides a Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. This pack

PerfectlySoft Inc. 51 Nov 19, 2022
SQLiteDB is a simple and lightweight SQLite wrapper for Swift

Basic SQLite wrapper for Swift 4.x and lightweight ORM for accessing underlying tables in an SQLite database

Fahim Farook 559 Jan 4, 2023