capacitor-launch-native 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
10
10
  s.homepage = package['repository']['url']
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
- s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
13
+ s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '13.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
package/Package.swift ADDED
@@ -0,0 +1,28 @@
1
+ // swift-tools-version: 5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "CapacitorLaunchNative",
6
+ platforms: [.iOS(.v13)],
7
+ products: [
8
+ .library(
9
+ name: "CapacitorLaunchNative",
10
+ targets: ["LaunchNativePlugin"])
11
+ ],
12
+ dependencies: [
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "6.0.0")
14
+ ],
15
+ targets: [
16
+ .target(
17
+ name: "LaunchNativePlugin",
18
+ dependencies: [
19
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
+ .product(name: "Cordova", package: "capacitor-swift-pm")
21
+ ],
22
+ path: "ios/Sources/LaunchNativePlugin"),
23
+ .testTarget(
24
+ name: "LaunchNativePluginTests",
25
+ dependencies: ["LaunchNativePlugin"],
26
+ path: "ios/Tests/LaunchNativePluginTests")
27
+ ]
28
+ )
@@ -6,7 +6,12 @@ import Capacitor
6
6
  * here: https://capacitorjs.com/docs/plugins/ios
7
7
  */
8
8
  @objc(LaunchNativePlugin)
9
- public class LaunchNativePlugin: CAPPlugin {
9
+ public class LaunchNativePlugin: CAPPlugin, CAPBridgedPlugin {
10
+ public let identifier = "LaunchNativePlugin"
11
+ public let jsName = "LaunchNative"
12
+ public let pluginMethods: [CAPPluginMethod] = [
13
+ CAPPluginMethod(name: "attempt", returnType: CAPPluginReturnPromise),
14
+ ]
10
15
  @objc func attempt(_ call: CAPPluginCall) {
11
16
  let url = call.getString("url") ?? ""
12
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-launch-native",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Launch an app natively, if it exists",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,7 +10,8 @@
10
10
  "android/src/main/",
11
11
  "android/build.gradle",
12
12
  "dist/",
13
- "ios/Plugin/",
13
+ "ios/Sources/",
14
+ "Package.swift",
14
15
  "CapacitorLaunchNative.podspec"
15
16
  ],
16
17
  "author": "",
@@ -1,10 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
-
3
- //! Project version number for Plugin.
4
- FOUNDATION_EXPORT double PluginVersionNumber;
5
-
6
- //! Project version string for Plugin.
7
- FOUNDATION_EXPORT const unsigned char PluginVersionString[];
8
-
9
- // In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
10
-
@@ -1,8 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import <Capacitor/Capacitor.h>
3
-
4
- // Define the plugin using the CAP_PLUGIN Macro, and
5
- // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
- CAP_PLUGIN(LaunchNativePlugin, "LaunchNative",
7
- CAP_PLUGIN_METHOD(attempt, CAPPluginReturnPromise);
8
- )