-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
117 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"originHash" : "cc5c8fd0002bb367887e77c3546d22b9a24af4298dae9781fb5085dc16409e10", | ||
"pins" : [ | ||
{ | ||
"identity" : "capacitor-swift-pm", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/ionic-team/capacitor-swift-pm.git", | ||
"state" : { | ||
"branch" : "main", | ||
"revision" : "8a46dff3a8292761df1bded13a508da1c85859e8" | ||
} | ||
} | ||
], | ||
"version" : 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// | ||
// Use this file to import your target's public headers that you would like to expose to Swift. | ||
// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// EchoPlugin.m | ||
// App | ||
// | ||
// Created by Anton Begehr on 16.04.24. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <Capacitor/Capacitor.h> | ||
|
||
CAP_PLUGIN(EchoPlugin, "Echo", | ||
CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise); | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// EchoPlugin.swift | ||
// App | ||
// | ||
// Created by Anton Begehr on 16.04.24. | ||
// | ||
|
||
import Capacitor | ||
|
||
@objc(EchoPlugin) | ||
public class EchoPlugin: CAPPlugin { | ||
@objc override public func load() { | ||
debugPrint("EchoPlugin.load()") | ||
} | ||
|
||
@objc func echo(_ call: CAPPluginCall) { | ||
debugPrint("EchoPlugin.echo()") | ||
let value = call.getString("value") ?? "" | ||
debugPrint("EchoPlugin.echo - value: \(value)") | ||
call.resolve(["value": value]) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { registerPlugin } from "@capacitor/core"; | ||
|
||
const Echo = registerPlugin("Echo"); | ||
|
||
export default Echo; |