fix(capacitor): ios projects

This commit is contained in:
charlie
2025-05-30 11:39:52 +08:00
parent b740d80c35
commit ac84062f5e
5 changed files with 656 additions and 605 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
//
// AppViewController.swift
// Logseq
//
// Created by Charlie on 2025/5/30.
//
import Foundation
import Capacitor
@objc public class AppViewController: CAPBridgeViewController {
override public func capacitorDidLoad() {
bridge?.registerPluginInstance(UILocalPlugin())
}
}

View File

@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
</dependencies>
<scenes>
<!--Bridge View Controller-->
<!--App View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
<viewController id="BYZ-38-t0r" customClass="AppViewController" customModule="Logseq" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="44" y="-2"/>
</scene>
</scenes>
</document>

View File

@@ -0,0 +1,29 @@
//
// UILocal.swift
// App
//
// Created by Charlie on 2025/5/29.
//
import Foundation
import Capacitor
@objc(UILocalPlugin)
public class UILocalPlugin: CAPPlugin, CAPBridgedPlugin {
public let identifier = "UILocalPlugin"
public let jsName = "UILocal"
public let pluginMethods: [CAPPluginMethod] = [
CAPPluginMethod(name: "showDatePicker", returnType: CAPPluginReturnPromise)
]
@objc func showDatePicker(_ call: CAPPluginCall) {
call.resolve(["msg": "TOOD show datepicker"])
}
override public func load () {
print("🔅 UILocalPlugin loaded")
}
}

View File

@@ -109,4 +109,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: df64fb8749b799fc4571323f5341b09f84c86b69
COCOAPODS: 1.16.2
COCOAPODS: 1.11.2