mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix(capacitor): ios projects
This commit is contained in:
File diff suppressed because it is too large
Load Diff
15
ios/App/App/AppViewController.swift
Normal file
15
ios/App/App/AppViewController.swift
Normal 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())
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
29
ios/App/App/UILocalPlugin.swift
Normal file
29
ios/App/App/UILocalPlugin.swift
Normal 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")
|
||||
}
|
||||
}
|
||||
@@ -109,4 +109,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: df64fb8749b799fc4571323f5341b09f84c86b69
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
COCOAPODS: 1.11.2
|
||||
|
||||
Reference in New Issue
Block a user