Skip to content

Commit df10355

Browse files
committed
fix: make code compatible with iOS.
1 parent 5494c14 commit df10355

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import PackageDescription
66
let package = Package(
77
name: "CodeMirror",
88
platforms: [
9-
.iOS(.v14),
9+
.iOS(.v17),
1010
.macOS(.v14),
1111
],
1212
products: [

Sources/CodeMirror/CodeMirrorVM.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
// Created by 王楚江 on 8/11/25.
66
//
77

8-
import AppKit
8+
#if canImport(AppKit)
9+
import AppKit // macOS
10+
#endif
11+
12+
#if canImport(UIKit)
13+
import UIKit // iOS / iPadOS
14+
#endif
915

1016
@MainActor
1117
public class CodeMirrorVM: ObservableObject {

0 commit comments

Comments
 (0)