From b49a703bd204807f1a77671eaa2b30fa858b364d Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Thu, 2 Nov 2023 11:09:28 -0500 Subject: [PATCH 01/15] Starting on App conversion --- .../Plugin.xcodeproj/project.pbxproj | 8 -- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/xcschemes/Plugin.xcscheme | 0 .../xcschemes/PluginTests.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 app/{ios => ios-old}/Plugin/AppPlugin.swift | 12 +- app/{ios => ios-old}/Plugin/Info.plist | 0 .../PluginTests/AppPluginTests.swift | 0 app/{ios => ios-old}/PluginTests/Info.plist | 0 app/{ios => ios-old}/Podfile | 0 app/ios/.gitignore | 8 ++ app/ios/Package.swift | 27 ++++ app/ios/Plugin/AppPlugin.h | 10 -- app/ios/Plugin/AppPlugin.m | 13 -- app/ios/Sources/AppPlugin/AppPlugin.swift | 117 ++++++++++++++++++ .../Tests/AppPluginTests/AppPluginTests.swift | 12 ++ 18 files changed, 175 insertions(+), 32 deletions(-) rename app/{ios => ios-old}/Plugin.xcodeproj/project.pbxproj (96%) rename app/{ios => ios-old}/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename app/{ios => ios-old}/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename app/{ios => ios-old}/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme (100%) rename app/{ios => ios-old}/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme (100%) rename app/{ios => ios-old}/Plugin.xcworkspace/contents.xcworkspacedata (100%) rename app/{ios => ios-old}/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename app/{ios => ios-old}/Plugin/AppPlugin.swift (85%) rename app/{ios => ios-old}/Plugin/Info.plist (100%) rename app/{ios => ios-old}/PluginTests/AppPluginTests.swift (100%) rename app/{ios => ios-old}/PluginTests/Info.plist (100%) rename app/{ios => ios-old}/Podfile (100%) create mode 100644 app/ios/.gitignore create mode 100644 app/ios/Package.swift delete mode 100644 app/ios/Plugin/AppPlugin.h delete mode 100644 app/ios/Plugin/AppPlugin.m create mode 100644 app/ios/Sources/AppPlugin/AppPlugin.swift create mode 100644 app/ios/Tests/AppPluginTests/AppPluginTests.swift diff --git a/app/ios/Plugin.xcodeproj/project.pbxproj b/app/ios-old/Plugin.xcodeproj/project.pbxproj similarity index 96% rename from app/ios/Plugin.xcodeproj/project.pbxproj rename to app/ios-old/Plugin.xcodeproj/project.pbxproj index 6be1cfd8c..5994aea8b 100644 --- a/app/ios/Plugin.xcodeproj/project.pbxproj +++ b/app/ios-old/Plugin.xcodeproj/project.pbxproj @@ -11,9 +11,7 @@ 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; }; 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; 50ADFF97201F53D600D50D53 /* AppPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* AppPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* AppPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* AppPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* AppPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* AppPlugin.m */; }; 50E1A94820377CB70090CE1A /* AppPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* AppPlugin.swift */; }; /* End PBXBuildFile section */ @@ -30,13 +28,11 @@ /* Begin PBXFileReference section */ 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF8B201F53D600D50D53 /* AppPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppPlugin.h; sourceTree = ""; }; 50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50ADFF96201F53D600D50D53 /* AppPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPluginTests.swift; sourceTree = ""; }; 50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFFA72020EE4F00D50D53 /* AppPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppPlugin.m; sourceTree = ""; }; 50E1A94720377CB70090CE1A /* AppPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppPlugin.swift; sourceTree = ""; }; 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = ""; }; 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = ""; }; @@ -91,8 +87,6 @@ isa = PBXGroup; children = ( 50E1A94720377CB70090CE1A /* AppPlugin.swift */, - 50ADFF8B201F53D600D50D53 /* AppPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* AppPlugin.m */, 50ADFF8C201F53D600D50D53 /* Info.plist */, ); path = Plugin; @@ -135,7 +129,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 50ADFF99201F53D600D50D53 /* AppPlugin.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -304,7 +297,6 @@ buildActionMask = 2147483647; files = ( 50E1A94820377CB70090CE1A /* AppPlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* AppPlugin.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/app/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/app/ios-old/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from app/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to app/ios-old/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/app/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios-old/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from app/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to app/ios-old/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/app/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme similarity index 100% rename from app/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme rename to app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme diff --git a/app/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme similarity index 100% rename from app/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme rename to app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme diff --git a/app/ios/Plugin.xcworkspace/contents.xcworkspacedata b/app/ios-old/Plugin.xcworkspace/contents.xcworkspacedata similarity index 100% rename from app/ios/Plugin.xcworkspace/contents.xcworkspacedata rename to app/ios-old/Plugin.xcworkspace/contents.xcworkspacedata diff --git a/app/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios-old/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from app/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to app/ios-old/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/app/ios/Plugin/AppPlugin.swift b/app/ios-old/Plugin/AppPlugin.swift similarity index 85% rename from app/ios/Plugin/AppPlugin.swift rename to app/ios-old/Plugin/AppPlugin.swift index e97412711..22f7fa71d 100644 --- a/app/ios/Plugin/AppPlugin.swift +++ b/app/ios-old/Plugin/AppPlugin.swift @@ -2,7 +2,17 @@ import Foundation import Capacitor @objc(AppPlugin) -public class AppPlugin: CAPPlugin { +public class AppPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "AppPlugin" + public let jsName = "App" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "exitApp", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getLaunchUrl", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getState", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "minimizeApp", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "removeAllListeners", returnType: CAPPluginReturnPromise), + ] private var observers: [NSObjectProtocol] = [] override public func load() { diff --git a/app/ios/Plugin/Info.plist b/app/ios-old/Plugin/Info.plist similarity index 100% rename from app/ios/Plugin/Info.plist rename to app/ios-old/Plugin/Info.plist diff --git a/app/ios/PluginTests/AppPluginTests.swift b/app/ios-old/PluginTests/AppPluginTests.swift similarity index 100% rename from app/ios/PluginTests/AppPluginTests.swift rename to app/ios-old/PluginTests/AppPluginTests.swift diff --git a/app/ios/PluginTests/Info.plist b/app/ios-old/PluginTests/Info.plist similarity index 100% rename from app/ios/PluginTests/Info.plist rename to app/ios-old/PluginTests/Info.plist diff --git a/app/ios/Podfile b/app/ios-old/Podfile similarity index 100% rename from app/ios/Podfile rename to app/ios-old/Podfile diff --git a/app/ios/.gitignore b/app/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/app/ios/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/app/ios/Package.swift b/app/ios/Package.swift new file mode 100644 index 000000000..36f3920f3 --- /dev/null +++ b/app/ios/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "CapacitorAppPlugin", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "AppPlugin", + targets: ["AppPlugin"]), + ], + dependencies: [ + .package(name: "Capacitor", path: "../../node_modules/@capacitor/ios"), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "AppPlugin", + dependencies: [.product(name: "Capacitor", package: "Capacitor")]), + .testTarget( + name: "AppPluginTests", + dependencies: ["AppPlugin"]), + ] +) diff --git a/app/ios/Plugin/AppPlugin.h b/app/ios/Plugin/AppPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/app/ios/Plugin/AppPlugin.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -//! Project version number for Plugin. -FOUNDATION_EXPORT double PluginVersionNumber; - -//! Project version string for Plugin. -FOUNDATION_EXPORT const unsigned char PluginVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - diff --git a/app/ios/Plugin/AppPlugin.m b/app/ios/Plugin/AppPlugin.m deleted file mode 100644 index e18f8ee39..000000000 --- a/app/ios/Plugin/AppPlugin.m +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import - -// Define the plugin using the CAP_PLUGIN Macro, and -// each method the plugin supports using the CAP_PLUGIN_METHOD macro. -CAP_PLUGIN(AppPlugin, "App", - CAP_PLUGIN_METHOD(exitApp, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getInfo, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getLaunchUrl, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getState, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(minimizeApp, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnPromise); -) diff --git a/app/ios/Sources/AppPlugin/AppPlugin.swift b/app/ios/Sources/AppPlugin/AppPlugin.swift new file mode 100644 index 000000000..22f7fa71d --- /dev/null +++ b/app/ios/Sources/AppPlugin/AppPlugin.swift @@ -0,0 +1,117 @@ +import Foundation +import Capacitor + +@objc(AppPlugin) +public class AppPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "AppPlugin" + public let jsName = "App" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "exitApp", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getLaunchUrl", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getState", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "minimizeApp", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "removeAllListeners", returnType: CAPPluginReturnPromise), + ] + private var observers: [NSObjectProtocol] = [] + + override public func load() { + NotificationCenter.default.addObserver(self, selector: #selector(self.handleUrlOpened(notification:)), name: Notification.Name.capacitorOpenURL, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(self.handleUniversalLink(notification:)), name: Notification.Name.capacitorOpenUniversalLink, object: nil) + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("appStateChange", data: [ + "isActive": true + ]) + }) + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.willResignActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("appStateChange", data: [ + "isActive": false + ]) + }) + + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("pause", data: nil) + }) + + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("resume", data: nil) + }) + + } + + deinit { + NotificationCenter.default.removeObserver(self) + for observer in observers { + NotificationCenter.default.removeObserver(observer) + } + } + + @objc func handleUrlOpened(notification: NSNotification) { + guard let object = notification.object as? [String: Any?] else { + return + } + + notifyListeners("appUrlOpen", data: makeUrlOpenObject(object), retainUntilConsumed: true) + } + + @objc func handleUniversalLink(notification: NSNotification) { + guard let object = notification.object as? [String: Any?] else { + return + } + + notifyListeners("appUrlOpen", data: makeUrlOpenObject(object), retainUntilConsumed: true) + } + + func makeUrlOpenObject(_ object: [String: Any?]) -> JSObject { + guard let url = object["url"] as? NSURL else { + return [:] + } + + let options = object["options"] as? [String: Any?] ?? [:] + return [ + "url": url.absoluteString ?? "", + "iosSourceApplication": options[UIApplication.OpenURLOptionsKey.sourceApplication.rawValue] as? String ?? "", + "iosOpenInPlace": options[UIApplication.OpenURLOptionsKey.openInPlace.rawValue] as? String ?? "" + ] + } + + @objc func exitApp(_ call: CAPPluginCall) { + call.unimplemented() + } + + @objc func getInfo(_ call: CAPPluginCall) { + if let info = Bundle.main.infoDictionary { + call.resolve([ + "name": info["CFBundleDisplayName"] as? String ?? "", + "id": info["CFBundleIdentifier"] as? String ?? "", + "build": info["CFBundleVersion"] as? String ?? "", + "version": info["CFBundleShortVersionString"] as? String ?? "" + ]) + } else { + call.reject("Unable to get App Info") + } + + } + + @objc func getLaunchUrl(_ call: CAPPluginCall) { + if let lastUrl = ApplicationDelegateProxy.shared.lastURL { + let urlValue = lastUrl.absoluteString + call.resolve([ + "url": urlValue + ]) + } + call.resolve() + } + + @objc func getState(_ call: CAPPluginCall) { + DispatchQueue.main.async { + call.resolve([ + "isActive": UIApplication.shared.applicationState == UIApplication.State.active + ]) + } + } + + @objc func minimizeApp(_ call: CAPPluginCall) { + call.unimplemented() + } +} diff --git a/app/ios/Tests/AppPluginTests/AppPluginTests.swift b/app/ios/Tests/AppPluginTests/AppPluginTests.swift new file mode 100644 index 000000000..7d0d646ec --- /dev/null +++ b/app/ios/Tests/AppPluginTests/AppPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import AppPlugin + +final class AppPluginTests: XCTestCase { + func testExample() throws { + // XCTest Documentation + // https://developer.apple.com/documentation/xctest + + // Defining Test Cases and Test Methods + // https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods + } +} From 726051882e55867fed18e77c82290beafc0c2c53 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Fri, 3 Nov 2023 11:39:58 -0500 Subject: [PATCH 02/15] removing old --- app/ios-old/Plugin.xcodeproj/project.pbxproj | 559 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 --- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - app/ios-old/Plugin/AppPlugin.swift | 117 ---- app/ios-old/Plugin/Info.plist | 24 - app/ios-old/PluginTests/AppPluginTests.swift | 14 - app/ios-old/PluginTests/Info.plist | 22 - app/ios-old/Podfile | 16 - app/ios/Package.swift | 27 - 13 files changed, 957 deletions(-) delete mode 100644 app/ios-old/Plugin.xcodeproj/project.pbxproj delete mode 100644 app/ios-old/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 app/ios-old/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 app/ios-old/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 app/ios-old/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 app/ios-old/Plugin/AppPlugin.swift delete mode 100644 app/ios-old/Plugin/Info.plist delete mode 100644 app/ios-old/PluginTests/AppPluginTests.swift delete mode 100644 app/ios-old/PluginTests/Info.plist delete mode 100644 app/ios-old/Podfile delete mode 100644 app/ios/Package.swift diff --git a/app/ios-old/Plugin.xcodeproj/project.pbxproj b/app/ios-old/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 5994aea8b..000000000 --- a/app/ios-old/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,559 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; }; - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* AppPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* AppPluginTests.swift */; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50E1A94820377CB70090CE1A /* AppPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* AppPlugin.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 50ADFF7F201F53D600D50D53 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 50ADFF87201F53D600D50D53; - remoteInfo = Plugin; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF96201F53D600D50D53 /* AppPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPluginTests.swift; sourceTree = ""; }; - 50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50E1A94720377CB70090CE1A /* AppPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppPlugin.swift; sourceTree = ""; }; - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = ""; }; - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = ""; }; - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig"; sourceTree = ""; }; - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig"; sourceTree = ""; }; - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PluginTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 50ADFF84201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */, - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8E201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */, - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 50ADFF7E201F53D600D50D53 = { - isa = PBXGroup; - children = ( - 50ADFF8A201F53D600D50D53 /* Plugin */, - 50ADFF95201F53D600D50D53 /* PluginTests */, - 50ADFF89201F53D600D50D53 /* Products */, - 8C8E7744173064A9F6D438E3 /* Pods */, - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */, - ); - sourceTree = ""; - }; - 50ADFF89201F53D600D50D53 /* Products */ = { - isa = PBXGroup; - children = ( - 50ADFF88201F53D600D50D53 /* Plugin.framework */, - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 50ADFF8A201F53D600D50D53 /* Plugin */ = { - isa = PBXGroup; - children = ( - 50E1A94720377CB70090CE1A /* AppPlugin.swift */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* AppPluginTests.swift */, - 50ADFF98201F53D600D50D53 /* Info.plist */, - ); - path = PluginTests; - sourceTree = ""; - }; - 8C8E7744173064A9F6D438E3 /* Pods */ = { - isa = PBXGroup; - children = ( - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */, - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */, - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */, - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 50ADFFA52020D75100D50D53 /* Capacitor.framework */, - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */, - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 50ADFF85201F53D600D50D53 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 50ADFF87201F53D600D50D53 /* Plugin */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */; - buildPhases = ( - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */, - 50ADFF83201F53D600D50D53 /* Sources */, - 50ADFF84201F53D600D50D53 /* Frameworks */, - 50ADFF85201F53D600D50D53 /* Headers */, - 50ADFF86201F53D600D50D53 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Plugin; - productName = Plugin; - productReference = 50ADFF88201F53D600D50D53 /* Plugin.framework */; - productType = "com.apple.product-type.framework"; - }; - 50ADFF90201F53D600D50D53 /* PluginTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */; - buildPhases = ( - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */, - 50ADFF8D201F53D600D50D53 /* Sources */, - 50ADFF8E201F53D600D50D53 /* Frameworks */, - 50ADFF8F201F53D600D50D53 /* Resources */, - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */, - ); - name = PluginTests; - productName = PluginTests; - productReference = 50ADFF91201F53D600D50D53 /* PluginTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 50ADFF7F201F53D600D50D53 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1160; - ORGANIZATIONNAME = "Max Lynch"; - TargetAttributes = { - 50ADFF87201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - 50ADFF90201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 50ADFF7E201F53D600D50D53; - productRefGroup = 50ADFF89201F53D600D50D53 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 50ADFF87201F53D600D50D53 /* Plugin */, - 50ADFF90201F53D600D50D53 /* PluginTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 50ADFF86201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8F201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PluginTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework", - "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Plugin-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 50ADFF83201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50E1A94820377CB70090CE1A /* AppPlugin.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* AppPluginTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 50ADFF87201F53D600D50D53 /* Plugin */; - targetProxy = 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 50ADFF9A201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 50ADFF9B201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 50ADFF9D201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFF9E201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 50ADFFA0201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFFA1201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9A201F53D600D50D53 /* Debug */, - 50ADFF9B201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9D201F53D600D50D53 /* Debug */, - 50ADFF9E201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFFA0201F53D600D50D53 /* Debug */, - 50ADFFA1201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 50ADFF7F201F53D600D50D53 /* Project object */; -} diff --git a/app/ios-old/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/app/ios-old/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/app/ios-old/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/app/ios-old/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios-old/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/app/ios-old/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/app/ios-old/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/ios-old/Plugin.xcworkspace/contents.xcworkspacedata b/app/ios-old/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/app/ios-old/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/app/ios-old/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios-old/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/app/ios-old/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/app/ios-old/Plugin/AppPlugin.swift b/app/ios-old/Plugin/AppPlugin.swift deleted file mode 100644 index 22f7fa71d..000000000 --- a/app/ios-old/Plugin/AppPlugin.swift +++ /dev/null @@ -1,117 +0,0 @@ -import Foundation -import Capacitor - -@objc(AppPlugin) -public class AppPlugin: CAPPlugin, CAPBridgedPlugin { - public let identifier = "AppPlugin" - public let jsName = "App" - public let pluginMethods: [CAPPluginMethod] = [ - CAPPluginMethod(name: "exitApp", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "getLaunchUrl", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "getState", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "minimizeApp", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "removeAllListeners", returnType: CAPPluginReturnPromise), - ] - private var observers: [NSObjectProtocol] = [] - - override public func load() { - NotificationCenter.default.addObserver(self, selector: #selector(self.handleUrlOpened(notification:)), name: Notification.Name.capacitorOpenURL, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(self.handleUniversalLink(notification:)), name: Notification.Name.capacitorOpenUniversalLink, object: nil) - observers.append(NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in - self?.notifyListeners("appStateChange", data: [ - "isActive": true - ]) - }) - observers.append(NotificationCenter.default.addObserver(forName: UIApplication.willResignActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in - self?.notifyListeners("appStateChange", data: [ - "isActive": false - ]) - }) - - observers.append(NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in - self?.notifyListeners("pause", data: nil) - }) - - observers.append(NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in - self?.notifyListeners("resume", data: nil) - }) - - } - - deinit { - NotificationCenter.default.removeObserver(self) - for observer in observers { - NotificationCenter.default.removeObserver(observer) - } - } - - @objc func handleUrlOpened(notification: NSNotification) { - guard let object = notification.object as? [String: Any?] else { - return - } - - notifyListeners("appUrlOpen", data: makeUrlOpenObject(object), retainUntilConsumed: true) - } - - @objc func handleUniversalLink(notification: NSNotification) { - guard let object = notification.object as? [String: Any?] else { - return - } - - notifyListeners("appUrlOpen", data: makeUrlOpenObject(object), retainUntilConsumed: true) - } - - func makeUrlOpenObject(_ object: [String: Any?]) -> JSObject { - guard let url = object["url"] as? NSURL else { - return [:] - } - - let options = object["options"] as? [String: Any?] ?? [:] - return [ - "url": url.absoluteString ?? "", - "iosSourceApplication": options[UIApplication.OpenURLOptionsKey.sourceApplication.rawValue] as? String ?? "", - "iosOpenInPlace": options[UIApplication.OpenURLOptionsKey.openInPlace.rawValue] as? String ?? "" - ] - } - - @objc func exitApp(_ call: CAPPluginCall) { - call.unimplemented() - } - - @objc func getInfo(_ call: CAPPluginCall) { - if let info = Bundle.main.infoDictionary { - call.resolve([ - "name": info["CFBundleDisplayName"] as? String ?? "", - "id": info["CFBundleIdentifier"] as? String ?? "", - "build": info["CFBundleVersion"] as? String ?? "", - "version": info["CFBundleShortVersionString"] as? String ?? "" - ]) - } else { - call.reject("Unable to get App Info") - } - - } - - @objc func getLaunchUrl(_ call: CAPPluginCall) { - if let lastUrl = ApplicationDelegateProxy.shared.lastURL { - let urlValue = lastUrl.absoluteString - call.resolve([ - "url": urlValue - ]) - } - call.resolve() - } - - @objc func getState(_ call: CAPPluginCall) { - DispatchQueue.main.async { - call.resolve([ - "isActive": UIApplication.shared.applicationState == UIApplication.State.active - ]) - } - } - - @objc func minimizeApp(_ call: CAPPluginCall) { - call.unimplemented() - } -} diff --git a/app/ios-old/Plugin/Info.plist b/app/ios-old/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/app/ios-old/Plugin/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/app/ios-old/PluginTests/AppPluginTests.swift b/app/ios-old/PluginTests/AppPluginTests.swift deleted file mode 100644 index 993034f2f..000000000 --- a/app/ios-old/PluginTests/AppPluginTests.swift +++ /dev/null @@ -1,14 +0,0 @@ -import XCTest -@testable import Plugin - -class AppTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } -} diff --git a/app/ios-old/PluginTests/Info.plist b/app/ios-old/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/app/ios-old/PluginTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/app/ios-old/Podfile b/app/ios-old/Podfile deleted file mode 100644 index dee40960f..000000000 --- a/app/ios-old/Podfile +++ /dev/null @@ -1,16 +0,0 @@ -platform :ios, '13.0' - -def capacitor_pods - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - pod 'Capacitor', :path => '../node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios' -end - -target 'Plugin' do - capacitor_pods -end - -target 'PluginTests' do - capacitor_pods -end diff --git a/app/ios/Package.swift b/app/ios/Package.swift deleted file mode 100644 index 36f3920f3..000000000 --- a/app/ios/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "CapacitorAppPlugin", - products: [ - // Products define the executables and libraries a package produces, making them visible to other packages. - .library( - name: "AppPlugin", - targets: ["AppPlugin"]), - ], - dependencies: [ - .package(name: "Capacitor", path: "../../node_modules/@capacitor/ios"), - ], - targets: [ - // Targets are the basic building blocks of a package, defining a module or a test suite. - // Targets can depend on other targets in this package and products from dependencies. - .target( - name: "AppPlugin", - dependencies: [.product(name: "Capacitor", package: "Capacitor")]), - .testTarget( - name: "AppPluginTests", - dependencies: ["AppPlugin"]), - ] -) From 50893ab8df1aa8b68b0871362835e03c0841a7c5 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Fri, 3 Nov 2023 11:42:39 -0500 Subject: [PATCH 03/15] Adding App plugin Package.swift --- app/CapacitorApp.podspec | 2 +- app/Package.swift | 29 +++++++++++++++++++++++++++++ app/package.json | 4 +++- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 app/Package.swift diff --git a/app/CapacitorApp.podspec b/app/CapacitorApp.podspec index 98787945d..2406e7fef 100644 --- a/app/CapacitorApp.podspec +++ b/app/CapacitorApp.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.homepage = 'https://capacitorjs.com' s.author = package['author'] s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'app/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'app/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '13.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/app/Package.swift b/app/Package.swift new file mode 100644 index 000000000..598482158 --- /dev/null +++ b/app/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorAppPlugin", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "AppPlugin", + targets: ["AppPlugin", "Capacitor", "Cordova"]), + ], + targets: [ + .target( + name: "AppPlugin", + dependencies: ["Capacitor", "Cordova"], + path: "ios/Sources/AppPlugin"), + .binaryTarget( + name: "Capacitor", + path: "../node_modules/@capacitor/ios/Frameworks/Capacitor.xcframework" + ), + .binaryTarget( + name: "Cordova", + path: "../node_modules/@capacitor/ios/Frameworks/Cordova.xcframework" + ), + .testTarget( + name: "AppPluginTests", + dependencies: ["AppPlugin"]), + ] +) diff --git a/app/package.json b/app/package.json index abc3059e1..45b1a25ef 100644 --- a/app/package.json +++ b/app/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorApp.podspec" ], "author": "Ionic ", From 2664014f1e176c7cd31894973c395f397a15a4e3 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Fri, 3 Nov 2023 11:43:40 -0500 Subject: [PATCH 04/15] updating gitignore --- app/.gitignore | 1 + app/ios/.gitignore | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/.gitignore b/app/.gitignore index 70ccbf713..312847d35 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -7,6 +7,7 @@ Pods Podfile.lock Build xcuserdata +ios/.build # macOS files .DS_Store diff --git a/app/ios/.gitignore b/app/ios/.gitignore index 0023a5340..144ca3b4f 100644 --- a/app/ios/.gitignore +++ b/app/ios/.gitignore @@ -1,5 +1,5 @@ .DS_Store -/.build +.build /Packages xcuserdata/ DerivedData/ From d30a8421db0e0bca4fb9fde1affa48eb6c039b76 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Fri, 3 Nov 2023 12:10:14 -0500 Subject: [PATCH 05/15] Converting Haptics plugin to SPM --- haptics/.gitignore | 8 + haptics/CapacitorHaptics.podspec | 2 +- haptics/Package.swift | 30 + haptics/ios/Plugin.xcodeproj/project.pbxproj | 571 ------------------ .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 --- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - haptics/ios/Plugin/HapticsPlugin.h | 10 - haptics/ios/Plugin/HapticsPlugin.m | 13 - haptics/ios/Plugin/Info.plist | 24 - haptics/ios/PluginTests/Info.plist | 22 - haptics/ios/PluginTests/PluginTests.swift | 16 - haptics/ios/Podfile | 16 - .../HapticsPlugin}/Haptics.swift | 0 .../HapticsPlugin}/HapticsPlugin.swift | 13 +- .../HapticsPluginTests.swift | 12 + haptics/package.json | 4 +- 19 files changed, 66 insertions(+), 846 deletions(-) create mode 100644 haptics/Package.swift delete mode 100644 haptics/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 haptics/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 haptics/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 haptics/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 haptics/ios/Plugin/HapticsPlugin.h delete mode 100644 haptics/ios/Plugin/HapticsPlugin.m delete mode 100644 haptics/ios/Plugin/Info.plist delete mode 100644 haptics/ios/PluginTests/Info.plist delete mode 100644 haptics/ios/PluginTests/PluginTests.swift delete mode 100644 haptics/ios/Podfile rename haptics/ios/{Plugin => Sources/HapticsPlugin}/Haptics.swift (100%) rename haptics/ios/{Plugin => Sources/HapticsPlugin}/HapticsPlugin.swift (74%) create mode 100644 haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift diff --git a/haptics/.gitignore b/haptics/.gitignore index 70ccbf713..420011878 100644 --- a/haptics/.gitignore +++ b/haptics/.gitignore @@ -7,6 +7,14 @@ Pods Podfile.lock Build xcuserdata +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc + # macOS files .DS_Store diff --git a/haptics/CapacitorHaptics.podspec b/haptics/CapacitorHaptics.podspec index 4b5032055..6adcd650a 100644 --- a/haptics/CapacitorHaptics.podspec +++ b/haptics/CapacitorHaptics.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.homepage = 'https://capacitorjs.com' s.author = package['author'] s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'haptics/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'haptics/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '13.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/haptics/Package.swift b/haptics/Package.swift new file mode 100644 index 000000000..21af79265 --- /dev/null +++ b/haptics/Package.swift @@ -0,0 +1,30 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorHapticsPlugin", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "HapticsPlugin", + targets: ["HapticsPlugin", "Capacitor", "Cordova"]), + ], + targets: [ + .target( + name: "HapticsPlugin", + dependencies: ["Capacitor", "Cordova"], + path: "ios/Sources/HapticsPlugin"), + .binaryTarget( + name: "Capacitor", + path: "../node_modules/@capacitor/ios/Frameworks/Capacitor.xcframework" + ), + .binaryTarget( + name: "Cordova", + path: "../node_modules/@capacitor/ios/Frameworks/Cordova.xcframework" + ), + .testTarget( + name: "HapticsPluginTests", + dependencies: ["HapticsPlugin"], + path: "ios/Tests/HapticsPluginTests"), + ] +) diff --git a/haptics/ios/Plugin.xcodeproj/project.pbxproj b/haptics/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 96d1a22da..000000000 --- a/haptics/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,571 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; }; - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; }; - 2F98D68224C9AAE500613A4C /* Haptics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* Haptics.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* HapticsPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* HapticsPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* HapticsPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* HapticsPlugin.m */; }; - 50E1A94820377CB70090CE1A /* HapticsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* HapticsPlugin.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 50ADFF7F201F53D600D50D53 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 50ADFF87201F53D600D50D53; - remoteInfo = Plugin; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 2F98D68124C9AAE400613A4C /* Haptics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Haptics.swift; sourceTree = ""; }; - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF8B201F53D600D50D53 /* HapticsPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HapticsPlugin.h; sourceTree = ""; }; - 50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF96201F53D600D50D53 /* PluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginTests.swift; sourceTree = ""; }; - 50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFFA72020EE4F00D50D53 /* HapticsPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HapticsPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* HapticsPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HapticsPlugin.swift; sourceTree = ""; }; - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = ""; }; - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = ""; }; - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig"; sourceTree = ""; }; - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig"; sourceTree = ""; }; - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PluginTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 50ADFF84201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */, - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8E201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */, - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 50ADFF7E201F53D600D50D53 = { - isa = PBXGroup; - children = ( - 50ADFF8A201F53D600D50D53 /* Plugin */, - 50ADFF95201F53D600D50D53 /* PluginTests */, - 50ADFF89201F53D600D50D53 /* Products */, - 8C8E7744173064A9F6D438E3 /* Pods */, - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */, - ); - sourceTree = ""; - }; - 50ADFF89201F53D600D50D53 /* Products */ = { - isa = PBXGroup; - children = ( - 50ADFF88201F53D600D50D53 /* Plugin.framework */, - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 50ADFF8A201F53D600D50D53 /* Plugin */ = { - isa = PBXGroup; - children = ( - 50E1A94720377CB70090CE1A /* HapticsPlugin.swift */, - 2F98D68124C9AAE400613A4C /* Haptics.swift */, - 50ADFF8B201F53D600D50D53 /* HapticsPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* HapticsPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* PluginTests.swift */, - 50ADFF98201F53D600D50D53 /* Info.plist */, - ); - path = PluginTests; - sourceTree = ""; - }; - 8C8E7744173064A9F6D438E3 /* Pods */ = { - isa = PBXGroup; - children = ( - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */, - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */, - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */, - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 50ADFFA52020D75100D50D53 /* Capacitor.framework */, - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */, - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 50ADFF85201F53D600D50D53 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF99201F53D600D50D53 /* HapticsPlugin.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 50ADFF87201F53D600D50D53 /* Plugin */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */; - buildPhases = ( - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */, - 50ADFF83201F53D600D50D53 /* Sources */, - 50ADFF84201F53D600D50D53 /* Frameworks */, - 50ADFF85201F53D600D50D53 /* Headers */, - 50ADFF86201F53D600D50D53 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Plugin; - productName = Plugin; - productReference = 50ADFF88201F53D600D50D53 /* Plugin.framework */; - productType = "com.apple.product-type.framework"; - }; - 50ADFF90201F53D600D50D53 /* PluginTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */; - buildPhases = ( - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */, - 50ADFF8D201F53D600D50D53 /* Sources */, - 50ADFF8E201F53D600D50D53 /* Frameworks */, - 50ADFF8F201F53D600D50D53 /* Resources */, - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */, - ); - name = PluginTests; - productName = PluginTests; - productReference = 50ADFF91201F53D600D50D53 /* PluginTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 50ADFF7F201F53D600D50D53 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1160; - ORGANIZATIONNAME = "Max Lynch"; - TargetAttributes = { - 50ADFF87201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - 50ADFF90201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 50ADFF7E201F53D600D50D53; - productRefGroup = 50ADFF89201F53D600D50D53 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 50ADFF87201F53D600D50D53 /* Plugin */, - 50ADFF90201F53D600D50D53 /* PluginTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 50ADFF86201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8F201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PluginTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework", - "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Plugin-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 50ADFF83201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50E1A94820377CB70090CE1A /* HapticsPlugin.swift in Sources */, - 2F98D68224C9AAE500613A4C /* Haptics.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* HapticsPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 50ADFF87201F53D600D50D53 /* Plugin */; - targetProxy = 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 50ADFF9A201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 50ADFF9B201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 50ADFF9D201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFF9E201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 50ADFFA0201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFFA1201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9A201F53D600D50D53 /* Debug */, - 50ADFF9B201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9D201F53D600D50D53 /* Debug */, - 50ADFF9E201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFFA0201F53D600D50D53 /* Debug */, - 50ADFFA1201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 50ADFF7F201F53D600D50D53 /* Project object */; -} diff --git a/haptics/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/haptics/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/haptics/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/haptics/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/haptics/ios/Plugin.xcworkspace/contents.xcworkspacedata b/haptics/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/haptics/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/haptics/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/haptics/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/haptics/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/haptics/ios/Plugin/HapticsPlugin.h b/haptics/ios/Plugin/HapticsPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/haptics/ios/Plugin/HapticsPlugin.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -//! Project version number for Plugin. -FOUNDATION_EXPORT double PluginVersionNumber; - -//! Project version string for Plugin. -FOUNDATION_EXPORT const unsigned char PluginVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - diff --git a/haptics/ios/Plugin/HapticsPlugin.m b/haptics/ios/Plugin/HapticsPlugin.m deleted file mode 100644 index f3641f3ec..000000000 --- a/haptics/ios/Plugin/HapticsPlugin.m +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import - -// Define the plugin using the CAP_PLUGIN Macro, and -// each method the plugin supports using the CAP_PLUGIN_METHOD macro. -CAP_PLUGIN(HapticsPlugin, "Haptics", - CAP_PLUGIN_METHOD(impact, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(notification, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(selectionStart, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(selectionChanged, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(selectionEnd, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(vibrate, CAPPluginReturnPromise); -) diff --git a/haptics/ios/Plugin/Info.plist b/haptics/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/haptics/ios/Plugin/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/haptics/ios/PluginTests/Info.plist b/haptics/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/haptics/ios/PluginTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/haptics/ios/PluginTests/PluginTests.swift b/haptics/ios/PluginTests/PluginTests.swift deleted file mode 100644 index 078838951..000000000 --- a/haptics/ios/PluginTests/PluginTests.swift +++ /dev/null @@ -1,16 +0,0 @@ -import XCTest -@testable import Plugin - -class HapticsTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - -} diff --git a/haptics/ios/Podfile b/haptics/ios/Podfile deleted file mode 100644 index dee40960f..000000000 --- a/haptics/ios/Podfile +++ /dev/null @@ -1,16 +0,0 @@ -platform :ios, '13.0' - -def capacitor_pods - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - pod 'Capacitor', :path => '../node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios' -end - -target 'Plugin' do - capacitor_pods -end - -target 'PluginTests' do - capacitor_pods -end diff --git a/haptics/ios/Plugin/Haptics.swift b/haptics/ios/Sources/HapticsPlugin/Haptics.swift similarity index 100% rename from haptics/ios/Plugin/Haptics.swift rename to haptics/ios/Sources/HapticsPlugin/Haptics.swift diff --git a/haptics/ios/Plugin/HapticsPlugin.swift b/haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift similarity index 74% rename from haptics/ios/Plugin/HapticsPlugin.swift rename to haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift index 7422da618..5be09314a 100644 --- a/haptics/ios/Plugin/HapticsPlugin.swift +++ b/haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift @@ -1,7 +1,17 @@ import Capacitor @objc(HapticsPlugin) -public class HapticsPlugin: CAPPlugin { +public class HapticsPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "HapticsPlugin" + public let jsName = "Haptics" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "impact", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "notification", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "selectionStart", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "selectionChanged", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "selectionEnd", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "vibrate", returnType: CAPPluginReturnPromise), + ] private let implementation = Haptics() @objc public func impact(_ call: CAPPluginCall) { @@ -63,3 +73,4 @@ public class HapticsPlugin: CAPPlugin { call.resolve() } } + diff --git a/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift b/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift new file mode 100644 index 000000000..a7eec495f --- /dev/null +++ b/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import HapticsPlugin + +final class iosTests: XCTestCase { + func testExample() throws { + // XCTest Documentation + // https://developer.apple.com/documentation/xctest + + // Defining Test Cases and Test Methods + // https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods + } +} diff --git a/haptics/package.json b/haptics/package.json index 783438fe3..a7720adb7 100644 --- a/haptics/package.json +++ b/haptics/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorHaptics.podspec" ], "author": "Ionic ", From 6b0e29dcc64f2f57a9ecb113db5630dd41b5ec49 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Mon, 6 Nov 2023 11:55:47 -0500 Subject: [PATCH 06/15] chore: add updated Package.swift --- app/Package.swift | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/Package.swift b/app/Package.swift index 598482158..cd14bf339 100644 --- a/app/Package.swift +++ b/app/Package.swift @@ -7,23 +7,22 @@ let package = Package( products: [ .library( name: "AppPlugin", - targets: ["AppPlugin", "Capacitor", "Cordova"]), + targets: ["AppPlugin"]), + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") ], targets: [ .target( - name: "AppPlugin", - dependencies: ["Capacitor", "Cordova"], + name: "AppPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], path: "ios/Sources/AppPlugin"), - .binaryTarget( - name: "Capacitor", - path: "../node_modules/@capacitor/ios/Frameworks/Capacitor.xcframework" - ), - .binaryTarget( - name: "Cordova", - path: "../node_modules/@capacitor/ios/Frameworks/Cordova.xcframework" - ), .testTarget( name: "AppPluginTests", dependencies: ["AppPlugin"]), ] ) + From 67d485df5225fd64a8d56ad50869c57f695e7eed Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Mon, 6 Nov 2023 11:23:10 -0600 Subject: [PATCH 07/15] Converting Keyboard to SPM --- keyboard/.gitignore | 7 + keyboard/CapacitorKeyboard.podspec | 2 +- keyboard/Package.resolved | 14 + keyboard/Package.swift | 30 + keyboard/ios/.gitignore | 8 + keyboard/ios/Plugin.xcodeproj/project.pbxproj | 571 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 --- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - keyboard/ios/Plugin/Info.plist | 24 - keyboard/ios/PluginTests/Info.plist | 22 - .../ios/PluginTests/KeyboardPluginTests.swift | 15 - keyboard/ios/Podfile | 16 - .../KeyboardPlugin}/Keyboard.m | 0 .../KeyboardPlugin}/KeyboardPlugin.m | 0 .../KeyboardPlugin/include}/Keyboard.h | 0 .../KeyboardPlugin/include}/KeyboardPlugin.h | 0 .../KeyboardPluginTests.swift | 12 + keyboard/package.json | 8 +- 22 files changed, 76 insertions(+), 831 deletions(-) create mode 100644 keyboard/Package.resolved create mode 100644 keyboard/Package.swift create mode 100644 keyboard/ios/.gitignore delete mode 100644 keyboard/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 keyboard/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 keyboard/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 keyboard/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 keyboard/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 keyboard/ios/Plugin/Info.plist delete mode 100644 keyboard/ios/PluginTests/Info.plist delete mode 100644 keyboard/ios/PluginTests/KeyboardPluginTests.swift delete mode 100644 keyboard/ios/Podfile rename keyboard/ios/{Plugin => Sources/KeyboardPlugin}/Keyboard.m (100%) rename keyboard/ios/{Plugin => Sources/KeyboardPlugin}/KeyboardPlugin.m (100%) rename keyboard/ios/{Plugin => Sources/KeyboardPlugin/include}/Keyboard.h (100%) rename keyboard/ios/{Plugin => Sources/KeyboardPlugin/include}/KeyboardPlugin.h (100%) create mode 100644 keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift diff --git a/keyboard/.gitignore b/keyboard/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/keyboard/.gitignore +++ b/keyboard/.gitignore @@ -7,6 +7,13 @@ Pods Podfile.lock Build xcuserdata +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc # macOS files .DS_Store diff --git a/keyboard/CapacitorKeyboard.podspec b/keyboard/CapacitorKeyboard.podspec index ef62c3c90..5c5fd977b 100644 --- a/keyboard/CapacitorKeyboard.podspec +++ b/keyboard/CapacitorKeyboard.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.homepage = 'https://capacitorjs.com' s.author = package['author'] s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'keyboard/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'keyboard/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '13.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/keyboard/Package.resolved b/keyboard/Package.resolved new file mode 100644 index 000000000..137eb1a40 --- /dev/null +++ b/keyboard/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "capacitor6-spm-test", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", + "state" : { + "branch" : "main", + "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + } + } + ], + "version" : 2 +} diff --git a/keyboard/Package.swift b/keyboard/Package.swift new file mode 100644 index 000000000..b9e6c723d --- /dev/null +++ b/keyboard/Package.swift @@ -0,0 +1,30 @@ +// swift-tools-version: 5.9 + +import PackageDescription + +let package = Package( + name: "CapacitorKeyboardPlugin", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "KeyboardPlugin", + targets: ["KeyboardPlugin"]), + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "KeyboardPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test")], + path: "ios/Sources/KeyboardPlugin", + publicHeadersPath: "include"), + .testTarget( + name: "KeyboardPluginTests", + dependencies: ["KeyboardPlugin"], + path: "ios/Tests/KeyboardPluginTests"), + ] +) + diff --git a/keyboard/ios/.gitignore b/keyboard/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/keyboard/ios/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/keyboard/ios/Plugin.xcodeproj/project.pbxproj b/keyboard/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 3bd18e004..000000000 --- a/keyboard/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,571 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; }; - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; }; - 2F96E8A825265C4B00AD6796 /* Keyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F96E8A625265C4B00AD6796 /* Keyboard.m */; }; - 2F96E8A925265C4B00AD6796 /* Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F96E8A725265C4B00AD6796 /* Keyboard.h */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* KeyboardPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* KeyboardPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* KeyboardPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* KeyboardPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* KeyboardPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* KeyboardPlugin.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 50ADFF7F201F53D600D50D53 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 50ADFF87201F53D600D50D53; - remoteInfo = Plugin; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 2F96E8A625265C4B00AD6796 /* Keyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Keyboard.m; sourceTree = ""; }; - 2F96E8A725265C4B00AD6796 /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Keyboard.h; sourceTree = ""; }; - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF8B201F53D600D50D53 /* KeyboardPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyboardPlugin.h; sourceTree = ""; }; - 50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF96201F53D600D50D53 /* KeyboardPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardPluginTests.swift; sourceTree = ""; }; - 50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFFA72020EE4F00D50D53 /* KeyboardPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyboardPlugin.m; sourceTree = ""; }; - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = ""; }; - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = ""; }; - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig"; sourceTree = ""; }; - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig"; sourceTree = ""; }; - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PluginTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 50ADFF84201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */, - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8E201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */, - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 50ADFF7E201F53D600D50D53 = { - isa = PBXGroup; - children = ( - 50ADFF8A201F53D600D50D53 /* Plugin */, - 50ADFF95201F53D600D50D53 /* PluginTests */, - 50ADFF89201F53D600D50D53 /* Products */, - 8C8E7744173064A9F6D438E3 /* Pods */, - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */, - ); - sourceTree = ""; - }; - 50ADFF89201F53D600D50D53 /* Products */ = { - isa = PBXGroup; - children = ( - 50ADFF88201F53D600D50D53 /* Plugin.framework */, - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 50ADFF8A201F53D600D50D53 /* Plugin */ = { - isa = PBXGroup; - children = ( - 2F96E8A725265C4B00AD6796 /* Keyboard.h */, - 2F96E8A625265C4B00AD6796 /* Keyboard.m */, - 50ADFF8B201F53D600D50D53 /* KeyboardPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* KeyboardPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* KeyboardPluginTests.swift */, - 50ADFF98201F53D600D50D53 /* Info.plist */, - ); - path = PluginTests; - sourceTree = ""; - }; - 8C8E7744173064A9F6D438E3 /* Pods */ = { - isa = PBXGroup; - children = ( - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */, - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */, - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */, - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 50ADFFA52020D75100D50D53 /* Capacitor.framework */, - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */, - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 50ADFF85201F53D600D50D53 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF99201F53D600D50D53 /* KeyboardPlugin.h in Headers */, - 2F96E8A925265C4B00AD6796 /* Keyboard.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 50ADFF87201F53D600D50D53 /* Plugin */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */; - buildPhases = ( - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */, - 50ADFF83201F53D600D50D53 /* Sources */, - 50ADFF84201F53D600D50D53 /* Frameworks */, - 50ADFF85201F53D600D50D53 /* Headers */, - 50ADFF86201F53D600D50D53 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Plugin; - productName = Plugin; - productReference = 50ADFF88201F53D600D50D53 /* Plugin.framework */; - productType = "com.apple.product-type.framework"; - }; - 50ADFF90201F53D600D50D53 /* PluginTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */; - buildPhases = ( - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */, - 50ADFF8D201F53D600D50D53 /* Sources */, - 50ADFF8E201F53D600D50D53 /* Frameworks */, - 50ADFF8F201F53D600D50D53 /* Resources */, - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */, - ); - name = PluginTests; - productName = PluginTests; - productReference = 50ADFF91201F53D600D50D53 /* PluginTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 50ADFF7F201F53D600D50D53 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1160; - ORGANIZATIONNAME = "Max Lynch"; - TargetAttributes = { - 50ADFF87201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - 50ADFF90201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 50ADFF7E201F53D600D50D53; - productRefGroup = 50ADFF89201F53D600D50D53 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 50ADFF87201F53D600D50D53 /* Plugin */, - 50ADFF90201F53D600D50D53 /* PluginTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 50ADFF86201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8F201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PluginTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework", - "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Plugin-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 50ADFF83201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2F96E8A825265C4B00AD6796 /* Keyboard.m in Sources */, - 50ADFFA82020EE4F00D50D53 /* KeyboardPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* KeyboardPluginTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 50ADFF87201F53D600D50D53 /* Plugin */; - targetProxy = 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 50ADFF9A201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 50ADFF9B201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 50ADFF9D201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFF9E201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 50ADFFA0201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFFA1201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9A201F53D600D50D53 /* Debug */, - 50ADFF9B201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9D201F53D600D50D53 /* Debug */, - 50ADFF9E201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFFA0201F53D600D50D53 /* Debug */, - 50ADFFA1201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 50ADFF7F201F53D600D50D53 /* Project object */; -} diff --git a/keyboard/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/keyboard/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/keyboard/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/keyboard/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/keyboard/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/keyboard/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/keyboard/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/keyboard/ios/Plugin.xcworkspace/contents.xcworkspacedata b/keyboard/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/keyboard/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/keyboard/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/keyboard/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/keyboard/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/keyboard/ios/Plugin/Info.plist b/keyboard/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/keyboard/ios/Plugin/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/keyboard/ios/PluginTests/Info.plist b/keyboard/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/keyboard/ios/PluginTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/keyboard/ios/PluginTests/KeyboardPluginTests.swift b/keyboard/ios/PluginTests/KeyboardPluginTests.swift deleted file mode 100644 index f14401bdd..000000000 --- a/keyboard/ios/PluginTests/KeyboardPluginTests.swift +++ /dev/null @@ -1,15 +0,0 @@ -import XCTest -@testable import Plugin - -class KeyboardTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - -} diff --git a/keyboard/ios/Podfile b/keyboard/ios/Podfile deleted file mode 100644 index dee40960f..000000000 --- a/keyboard/ios/Podfile +++ /dev/null @@ -1,16 +0,0 @@ -platform :ios, '13.0' - -def capacitor_pods - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - pod 'Capacitor', :path => '../node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios' -end - -target 'Plugin' do - capacitor_pods -end - -target 'PluginTests' do - capacitor_pods -end diff --git a/keyboard/ios/Plugin/Keyboard.m b/keyboard/ios/Sources/KeyboardPlugin/Keyboard.m similarity index 100% rename from keyboard/ios/Plugin/Keyboard.m rename to keyboard/ios/Sources/KeyboardPlugin/Keyboard.m diff --git a/keyboard/ios/Plugin/KeyboardPlugin.m b/keyboard/ios/Sources/KeyboardPlugin/KeyboardPlugin.m similarity index 100% rename from keyboard/ios/Plugin/KeyboardPlugin.m rename to keyboard/ios/Sources/KeyboardPlugin/KeyboardPlugin.m diff --git a/keyboard/ios/Plugin/Keyboard.h b/keyboard/ios/Sources/KeyboardPlugin/include/Keyboard.h similarity index 100% rename from keyboard/ios/Plugin/Keyboard.h rename to keyboard/ios/Sources/KeyboardPlugin/include/Keyboard.h diff --git a/keyboard/ios/Plugin/KeyboardPlugin.h b/keyboard/ios/Sources/KeyboardPlugin/include/KeyboardPlugin.h similarity index 100% rename from keyboard/ios/Plugin/KeyboardPlugin.h rename to keyboard/ios/Sources/KeyboardPlugin/include/KeyboardPlugin.h diff --git a/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift b/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift new file mode 100644 index 000000000..2a652910b --- /dev/null +++ b/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import KeyboardPlugin + +final class iosTests: XCTestCase { + func testExample() throws { + // XCTest Documentation + // https://developer.apple.com/documentation/xctest + + // Defining Test Cases and Test Methods + // https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods + } +} diff --git a/keyboard/package.json b/keyboard/package.json index 3e623c458..287a5ad5b 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -45,11 +45,11 @@ "publish:cocoapod": "pod trunk push ./CapacitorKeyboard.podspec --allow-warnings" }, "devDependencies": { - "@capacitor/android": "^5.0.0", - "@capacitor/cli": "^5.0.0", - "@capacitor/core": "^5.0.0", + "@capacitor/android": "file:../../capacitor/android", + "@capacitor/cli": "file:../../capacitor/cli", + "@capacitor/core": "file:../../capacitor/core", "@capacitor/docgen": "0.2.0", - "@capacitor/ios": "^5.0.0", + "@capacitor/ios": "file:../../capacitor/ios", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", From 5d480d3b631b50fa447418a4d6f57141db615b41 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Mon, 6 Nov 2023 11:26:25 -0600 Subject: [PATCH 08/15] Upating gitignore for App Plugin --- app/.gitignore | 14 +++++++++----- app/Package.resolved | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 app/Package.resolved diff --git a/app/.gitignore b/app/.gitignore index 312847d35..8f6c50761 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -3,11 +3,15 @@ dist node_modules # iOS files -Pods -Podfile.lock -Build -xcuserdata -ios/.build +.DS_Store +.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc + # macOS files .DS_Store diff --git a/app/Package.resolved b/app/Package.resolved new file mode 100644 index 000000000..137eb1a40 --- /dev/null +++ b/app/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "capacitor6-spm-test", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", + "state" : { + "branch" : "main", + "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + } + } + ], + "version" : 2 +} From 7f5bcdb60a78f1d2aaa9a74c05e766236158d491 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Mon, 6 Nov 2023 11:28:06 -0600 Subject: [PATCH 09/15] Updating haptics plugin to use remote dependency --- haptics/Package.resolved | 14 ++++++++++++++ haptics/Package.swift | 18 ++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 haptics/Package.resolved diff --git a/haptics/Package.resolved b/haptics/Package.resolved new file mode 100644 index 000000000..137eb1a40 --- /dev/null +++ b/haptics/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "capacitor6-spm-test", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", + "state" : { + "branch" : "main", + "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + } + } + ], + "version" : 2 +} diff --git a/haptics/Package.swift b/haptics/Package.swift index 21af79265..7c3e1e3f3 100644 --- a/haptics/Package.swift +++ b/haptics/Package.swift @@ -7,21 +7,19 @@ let package = Package( products: [ .library( name: "HapticsPlugin", - targets: ["HapticsPlugin", "Capacitor", "Cordova"]), + targets: ["HapticsPlugin"]), + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") ], targets: [ .target( name: "HapticsPlugin", - dependencies: ["Capacitor", "Cordova"], + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], path: "ios/Sources/HapticsPlugin"), - .binaryTarget( - name: "Capacitor", - path: "../node_modules/@capacitor/ios/Frameworks/Capacitor.xcframework" - ), - .binaryTarget( - name: "Cordova", - path: "../node_modules/@capacitor/ios/Frameworks/Cordova.xcframework" - ), .testTarget( name: "HapticsPluginTests", dependencies: ["HapticsPlugin"], From 23ad063053db293d40df1a4df5b273af8ee0f102 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Mon, 6 Nov 2023 12:14:06 -0600 Subject: [PATCH 10/15] Converting StatusBar to SPM --- status-bar/.gitignore | 7 + status-bar/CapacitorStatusBar.podspec | 2 +- status-bar/Package.resolved | 14 + status-bar/Package.swift | 29 + status-bar/ios/.gitignore | 8 + .../ios/Plugin.xcodeproj/project.pbxproj | 567 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 --- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - status-bar/ios/Plugin/Info.plist | 24 - status-bar/ios/Plugin/StatusBarPlugin.h | 10 - status-bar/ios/Plugin/StatusBarPlugin.m | 13 - status-bar/ios/PluginTests/Info.plist | 22 - .../PluginTests/StatusBarPluginTests.swift | 14 - status-bar/ios/Podfile | 16 - .../StatusBarPlugin}/StatusBarPlugin.swift | 13 +- .../StatusBarPluginTests.swift | 12 + status-bar/package.json | 4 +- 21 files changed, 86 insertions(+), 847 deletions(-) create mode 100644 status-bar/Package.resolved create mode 100644 status-bar/Package.swift create mode 100644 status-bar/ios/.gitignore delete mode 100644 status-bar/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 status-bar/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 status-bar/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 status-bar/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 status-bar/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 status-bar/ios/Plugin/Info.plist delete mode 100644 status-bar/ios/Plugin/StatusBarPlugin.h delete mode 100644 status-bar/ios/Plugin/StatusBarPlugin.m delete mode 100644 status-bar/ios/PluginTests/Info.plist delete mode 100644 status-bar/ios/PluginTests/StatusBarPluginTests.swift delete mode 100644 status-bar/ios/Podfile rename status-bar/ios/{Plugin => Sources/StatusBarPlugin}/StatusBarPlugin.swift (79%) create mode 100644 status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift diff --git a/status-bar/.gitignore b/status-bar/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/status-bar/.gitignore +++ b/status-bar/.gitignore @@ -7,6 +7,13 @@ Pods Podfile.lock Build xcuserdata +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc # macOS files .DS_Store diff --git a/status-bar/CapacitorStatusBar.podspec b/status-bar/CapacitorStatusBar.podspec index cc74bae37..bb7bdd57f 100644 --- a/status-bar/CapacitorStatusBar.podspec +++ b/status-bar/CapacitorStatusBar.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.homepage = 'https://capacitorjs.com' s.author = package['author'] s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'status-bar/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'status-bar/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '13.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/status-bar/Package.resolved b/status-bar/Package.resolved new file mode 100644 index 000000000..137eb1a40 --- /dev/null +++ b/status-bar/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "capacitor6-spm-test", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", + "state" : { + "branch" : "main", + "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + } + } + ], + "version" : 2 +} diff --git a/status-bar/Package.swift b/status-bar/Package.swift new file mode 100644 index 000000000..3b81bfef8 --- /dev/null +++ b/status-bar/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version: 5.9 + +import PackageDescription + +let package = Package( + name: "CapacitorStatusBarPlugin", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "StatusBarPlugin", + targets: ["StatusBarPlugin"]), + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "StatusBarPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test")], + path: "ios/Sources/StatusBarPlugin" + ), + .testTarget( + name: "StatusBarPluginTests", + dependencies: ["StatusBarPlugin"], + path: "ios/Tests/StatusBarPluginTests"), + ] +) diff --git a/status-bar/ios/.gitignore b/status-bar/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/status-bar/ios/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/status-bar/ios/Plugin.xcodeproj/project.pbxproj b/status-bar/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 25141e761..000000000 --- a/status-bar/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,567 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */; }; - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* StatusBarPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* StatusBarPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* StatusBarPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* StatusBarPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* StatusBarPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* StatusBarPlugin.m */; }; - 50E1A94820377CB70090CE1A /* StatusBarPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* StatusBarPlugin.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 50ADFF7F201F53D600D50D53 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 50ADFF87201F53D600D50D53; - remoteInfo = Plugin; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF88201F53D600D50D53 /* Plugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Plugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF8B201F53D600D50D53 /* StatusBarPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StatusBarPlugin.h; sourceTree = ""; }; - 50ADFF8C201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PluginTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFF96201F53D600D50D53 /* StatusBarPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusBarPluginTests.swift; sourceTree = ""; }; - 50ADFF98201F53D600D50D53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 50ADFFA52020D75100D50D53 /* Capacitor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Capacitor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 50ADFFA72020EE4F00D50D53 /* StatusBarPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusBarPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* StatusBarPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusBarPlugin.swift; sourceTree = ""; }; - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig"; sourceTree = ""; }; - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Plugin.release.xcconfig"; path = "Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig"; sourceTree = ""; }; - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig"; sourceTree = ""; }; - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PluginTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig"; sourceTree = ""; }; - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PluginTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 50ADFF84201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */, - 03FC29A292ACC40490383A1F /* Pods_Plugin.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8E201F53D600D50D53 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */, - 20C0B05DCFC8E3958A738AF2 /* Pods_PluginTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 50ADFF7E201F53D600D50D53 = { - isa = PBXGroup; - children = ( - 50ADFF8A201F53D600D50D53 /* Plugin */, - 50ADFF95201F53D600D50D53 /* PluginTests */, - 50ADFF89201F53D600D50D53 /* Products */, - 8C8E7744173064A9F6D438E3 /* Pods */, - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */, - ); - sourceTree = ""; - }; - 50ADFF89201F53D600D50D53 /* Products */ = { - isa = PBXGroup; - children = ( - 50ADFF88201F53D600D50D53 /* Plugin.framework */, - 50ADFF91201F53D600D50D53 /* PluginTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 50ADFF8A201F53D600D50D53 /* Plugin */ = { - isa = PBXGroup; - children = ( - 50E1A94720377CB70090CE1A /* StatusBarPlugin.swift */, - 50ADFF8B201F53D600D50D53 /* StatusBarPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* StatusBarPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* StatusBarPluginTests.swift */, - 50ADFF98201F53D600D50D53 /* Info.plist */, - ); - path = PluginTests; - sourceTree = ""; - }; - 8C8E7744173064A9F6D438E3 /* Pods */ = { - isa = PBXGroup; - children = ( - 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */, - 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */, - 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */, - F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - A797B9EFA3DCEFEA1FBB66A9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 50ADFFA52020D75100D50D53 /* Capacitor.framework */, - 3B2A61DA5A1F2DD4F959604D /* Pods_Plugin.framework */, - F6753A823D3815DB436415E3 /* Pods_PluginTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 50ADFF85201F53D600D50D53 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF99201F53D600D50D53 /* StatusBarPlugin.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 50ADFF87201F53D600D50D53 /* Plugin */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */; - buildPhases = ( - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */, - 50ADFF83201F53D600D50D53 /* Sources */, - 50ADFF84201F53D600D50D53 /* Frameworks */, - 50ADFF85201F53D600D50D53 /* Headers */, - 50ADFF86201F53D600D50D53 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Plugin; - productName = Plugin; - productReference = 50ADFF88201F53D600D50D53 /* Plugin.framework */; - productType = "com.apple.product-type.framework"; - }; - 50ADFF90201F53D600D50D53 /* PluginTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */; - buildPhases = ( - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */, - 50ADFF8D201F53D600D50D53 /* Sources */, - 50ADFF8E201F53D600D50D53 /* Frameworks */, - 50ADFF8F201F53D600D50D53 /* Resources */, - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */, - ); - name = PluginTests; - productName = PluginTests; - productReference = 50ADFF91201F53D600D50D53 /* PluginTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 50ADFF7F201F53D600D50D53 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1160; - ORGANIZATIONNAME = "Max Lynch"; - TargetAttributes = { - 50ADFF87201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - 50ADFF90201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 50ADFF7E201F53D600D50D53; - productRefGroup = 50ADFF89201F53D600D50D53 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 50ADFF87201F53D600D50D53 /* Plugin */, - 50ADFF90201F53D600D50D53 /* PluginTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 50ADFF86201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8F201F53D600D50D53 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0596884F929ED6F1DE134961 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PluginTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8E97F58B69A94C6503FC9C85 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework", - "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - AB5B3E54B4E897F32C2279DA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Plugin-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 50ADFF83201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50E1A94820377CB70090CE1A /* StatusBarPlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* StatusBarPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* StatusBarPluginTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 50ADFF94201F53D600D50D53 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 50ADFF87201F53D600D50D53 /* Plugin */; - targetProxy = 50ADFF93201F53D600D50D53 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 50ADFF9A201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 50ADFF9B201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"${BUILT_PRODUCTS_DIR}/Capacitor\"", - "\"${BUILT_PRODUCTS_DIR}/CapacitorCordova\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 50ADFF9D201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5E23F77F099397094342571A /* Pods-Plugin.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFF9E201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 91781294A431A2A7CC6EB714 /* Pods-Plugin.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Plugin/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; - ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 50ADFFA0201F53D600D50D53 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 96ED1B6440D6672E406C8D19 /* Pods-PluginTests.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 50ADFFA1201F53D600D50D53 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F65BB2953ECE002E1EF3E424 /* Pods-PluginTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PluginTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.PluginTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 50ADFF82201F53D600D50D53 /* Build configuration list for PBXProject "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9A201F53D600D50D53 /* Debug */, - 50ADFF9B201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9C201F53D600D50D53 /* Build configuration list for PBXNativeTarget "Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFF9D201F53D600D50D53 /* Debug */, - 50ADFF9E201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 50ADFF9F201F53D600D50D53 /* Build configuration list for PBXNativeTarget "PluginTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 50ADFFA0201F53D600D50D53 /* Debug */, - 50ADFFA1201F53D600D50D53 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 50ADFF7F201F53D600D50D53 /* Project object */; -} diff --git a/status-bar/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/status-bar/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/status-bar/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/status-bar/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/status-bar/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/status-bar/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/status-bar/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/status-bar/ios/Plugin.xcworkspace/contents.xcworkspacedata b/status-bar/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/status-bar/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/status-bar/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/status-bar/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/status-bar/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/status-bar/ios/Plugin/Info.plist b/status-bar/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/status-bar/ios/Plugin/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/status-bar/ios/Plugin/StatusBarPlugin.h b/status-bar/ios/Plugin/StatusBarPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/status-bar/ios/Plugin/StatusBarPlugin.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -//! Project version number for Plugin. -FOUNDATION_EXPORT double PluginVersionNumber; - -//! Project version string for Plugin. -FOUNDATION_EXPORT const unsigned char PluginVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - diff --git a/status-bar/ios/Plugin/StatusBarPlugin.m b/status-bar/ios/Plugin/StatusBarPlugin.m deleted file mode 100644 index 65d365409..000000000 --- a/status-bar/ios/Plugin/StatusBarPlugin.m +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import - -// Define the plugin using the CAP_PLUGIN Macro, and -// each method the plugin supports using the CAP_PLUGIN_METHOD macro. -CAP_PLUGIN(StatusBarPlugin, "StatusBar", - CAP_PLUGIN_METHOD(setStyle, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(setBackgroundColor, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(show, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(hide, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getInfo, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(setOverlaysWebView, CAPPluginReturnPromise); -) diff --git a/status-bar/ios/PluginTests/Info.plist b/status-bar/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/status-bar/ios/PluginTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/status-bar/ios/PluginTests/StatusBarPluginTests.swift b/status-bar/ios/PluginTests/StatusBarPluginTests.swift deleted file mode 100644 index 7ccae49f3..000000000 --- a/status-bar/ios/PluginTests/StatusBarPluginTests.swift +++ /dev/null @@ -1,14 +0,0 @@ -import XCTest -@testable import Plugin - -class StatusBarTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } -} diff --git a/status-bar/ios/Podfile b/status-bar/ios/Podfile deleted file mode 100644 index dee40960f..000000000 --- a/status-bar/ios/Podfile +++ /dev/null @@ -1,16 +0,0 @@ -platform :ios, '13.0' - -def capacitor_pods - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - pod 'Capacitor', :path => '../node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios' -end - -target 'Plugin' do - capacitor_pods -end - -target 'PluginTests' do - capacitor_pods -end diff --git a/status-bar/ios/Plugin/StatusBarPlugin.swift b/status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift similarity index 79% rename from status-bar/ios/Plugin/StatusBarPlugin.swift rename to status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift index 1ac166b09..19c99ff91 100644 --- a/status-bar/ios/Plugin/StatusBarPlugin.swift +++ b/status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift @@ -6,7 +6,17 @@ import Capacitor * be "YES" in Info.plist */ @objc(StatusBarPlugin) -public class StatusBarPlugin: CAPPlugin { +public class StatusBarPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "StatusBarPlugin" + public let jsName = "StatusBar" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "setStyle", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "setBackgroundColor", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "show", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "hide", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "setOverlaysWebView", returnType: CAPPluginReturnPromise), + ] private var observer: NSObjectProtocol? override public func load() { @@ -94,3 +104,4 @@ public class StatusBarPlugin: CAPPlugin { call.unimplemented() } } + diff --git a/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift b/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift new file mode 100644 index 000000000..59d10f7ce --- /dev/null +++ b/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import StatusBarPlugin + +final class iosTests: XCTestCase { + func testExample() throws { + // XCTest Documentation + // https://developer.apple.com/documentation/xctest + + // Defining Test Cases and Test Methods + // https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods + } +} diff --git a/status-bar/package.json b/status-bar/package.json index 5b14a0f24..73c274ea6 100644 --- a/status-bar/package.json +++ b/status-bar/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorStatusBar.podspec" ], "author": "Ionic ", From b3c5d8e3dec898e346e35cdbd07fe052d9c01ecc Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Mon, 6 Nov 2023 12:44:30 -0600 Subject: [PATCH 11/15] updating gitignore --- app/.gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/.gitignore b/app/.gitignore index 8f6c50761..420011878 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -3,8 +3,11 @@ dist node_modules # iOS files -.DS_Store -.build +Pods +Podfile.lock +Build +xcuserdata +/.build /Packages xcuserdata/ DerivedData/ From 06762a9fd935d8877247214857cd15d8e1b81120 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Tue, 7 Nov 2023 10:31:37 -0600 Subject: [PATCH 12/15] fmt --- app/Package.swift | 5 ++--- app/ios/Sources/AppPlugin/AppPlugin.swift | 8 ++++---- haptics/Package.swift | 10 +++++----- haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift | 9 ++++----- keyboard/Package.swift | 5 ++--- status-bar/Package.swift | 6 +++--- .../ios/Sources/StatusBarPlugin/StatusBarPlugin.swift | 9 ++++----- 7 files changed, 24 insertions(+), 28 deletions(-) diff --git a/app/Package.swift b/app/Package.swift index cd14bf339..c56662bf3 100644 --- a/app/Package.swift +++ b/app/Package.swift @@ -7,7 +7,7 @@ let package = Package( products: [ .library( name: "AppPlugin", - targets: ["AppPlugin"]), + targets: ["AppPlugin"]) ], dependencies: [ .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") @@ -22,7 +22,6 @@ let package = Package( path: "ios/Sources/AppPlugin"), .testTarget( name: "AppPluginTests", - dependencies: ["AppPlugin"]), + dependencies: ["AppPlugin"]) ] ) - diff --git a/app/ios/Sources/AppPlugin/AppPlugin.swift b/app/ios/Sources/AppPlugin/AppPlugin.swift index c28c90329..0f6086507 100644 --- a/app/ios/Sources/AppPlugin/AppPlugin.swift +++ b/app/ios/Sources/AppPlugin/AppPlugin.swift @@ -3,15 +3,15 @@ import Capacitor @objc(AppPlugin) public class AppPlugin: CAPPlugin, CAPBridgedPlugin { - public let identifier = "AppPlugin" - public let jsName = "App" + public let identifier = "AppPlugin" + public let jsName = "App" public let pluginMethods: [CAPPluginMethod] = [ CAPPluginMethod(name: "exitApp", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "getLaunchUrl", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "getState", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "minimizeApp", returnType: CAPPluginReturnPromise), - ] + CAPPluginMethod(name: "minimizeApp", returnType: CAPPluginReturnPromise) + ] private var observers: [NSObjectProtocol] = [] override public func load() { diff --git a/haptics/Package.swift b/haptics/Package.swift index 7c3e1e3f3..e4a5e7df9 100644 --- a/haptics/Package.swift +++ b/haptics/Package.swift @@ -7,15 +7,15 @@ let package = Package( products: [ .library( name: "HapticsPlugin", - targets: ["HapticsPlugin"]), + targets: ["HapticsPlugin"]) ], - dependencies: [ + dependencies: [ .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") ], targets: [ .target( - name: "HapticsPlugin", - dependencies: [ + name: "HapticsPlugin", + dependencies: [ .product(name: "Capacitor", package: "capacitor6-spm-test"), .product(name: "Cordova", package: "capacitor6-spm-test") ], @@ -23,6 +23,6 @@ let package = Package( .testTarget( name: "HapticsPluginTests", dependencies: ["HapticsPlugin"], - path: "ios/Tests/HapticsPluginTests"), + path: "ios/Tests/HapticsPluginTests") ] ) diff --git a/haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift b/haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift index 5be09314a..49f2229a6 100644 --- a/haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift +++ b/haptics/ios/Sources/HapticsPlugin/HapticsPlugin.swift @@ -2,16 +2,16 @@ import Capacitor @objc(HapticsPlugin) public class HapticsPlugin: CAPPlugin, CAPBridgedPlugin { - public let identifier = "HapticsPlugin" - public let jsName = "Haptics" + public let identifier = "HapticsPlugin" + public let jsName = "Haptics" public let pluginMethods: [CAPPluginMethod] = [ CAPPluginMethod(name: "impact", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "notification", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "selectionStart", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "selectionChanged", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "selectionEnd", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "vibrate", returnType: CAPPluginReturnPromise), - ] + CAPPluginMethod(name: "vibrate", returnType: CAPPluginReturnPromise) + ] private let implementation = Haptics() @objc public func impact(_ call: CAPPluginCall) { @@ -73,4 +73,3 @@ public class HapticsPlugin: CAPPlugin, CAPBridgedPlugin { call.resolve() } } - diff --git a/keyboard/Package.swift b/keyboard/Package.swift index b9e6c723d..5e30b2f2b 100644 --- a/keyboard/Package.swift +++ b/keyboard/Package.swift @@ -8,7 +8,7 @@ let package = Package( products: [ .library( name: "KeyboardPlugin", - targets: ["KeyboardPlugin"]), + targets: ["KeyboardPlugin"]) ], dependencies: [ .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") @@ -24,7 +24,6 @@ let package = Package( .testTarget( name: "KeyboardPluginTests", dependencies: ["KeyboardPlugin"], - path: "ios/Tests/KeyboardPluginTests"), + path: "ios/Tests/KeyboardPluginTests") ] ) - diff --git a/status-bar/Package.swift b/status-bar/Package.swift index 3b81bfef8..72f70093c 100644 --- a/status-bar/Package.swift +++ b/status-bar/Package.swift @@ -8,7 +8,7 @@ let package = Package( products: [ .library( name: "StatusBarPlugin", - targets: ["StatusBarPlugin"]), + targets: ["StatusBarPlugin"]) ], dependencies: [ .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") @@ -19,11 +19,11 @@ let package = Package( dependencies: [ .product(name: "Capacitor", package: "capacitor6-spm-test"), .product(name: "Cordova", package: "capacitor6-spm-test")], - path: "ios/Sources/StatusBarPlugin" + path: "ios/Sources/StatusBarPlugin" ), .testTarget( name: "StatusBarPluginTests", dependencies: ["StatusBarPlugin"], - path: "ios/Tests/StatusBarPluginTests"), + path: "ios/Tests/StatusBarPluginTests") ] ) diff --git a/status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift b/status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift index 19c99ff91..6634d064c 100644 --- a/status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift +++ b/status-bar/ios/Sources/StatusBarPlugin/StatusBarPlugin.swift @@ -7,16 +7,16 @@ import Capacitor */ @objc(StatusBarPlugin) public class StatusBarPlugin: CAPPlugin, CAPBridgedPlugin { - public let identifier = "StatusBarPlugin" - public let jsName = "StatusBar" + public let identifier = "StatusBarPlugin" + public let jsName = "StatusBar" public let pluginMethods: [CAPPluginMethod] = [ CAPPluginMethod(name: "setStyle", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "setBackgroundColor", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "show", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "hide", returnType: CAPPluginReturnPromise), CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), - CAPPluginMethod(name: "setOverlaysWebView", returnType: CAPPluginReturnPromise), - ] + CAPPluginMethod(name: "setOverlaysWebView", returnType: CAPPluginReturnPromise) + ] private var observer: NSObjectProtocol? override public func load() { @@ -104,4 +104,3 @@ public class StatusBarPlugin: CAPPlugin, CAPBridgedPlugin { call.unimplemented() } } - From 24554ef2974ac93256081122870791ea128fe7ac Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Tue, 7 Nov 2023 11:18:05 -0600 Subject: [PATCH 13/15] Removing local package.json references in keyboard --- keyboard/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboard/package.json b/keyboard/package.json index 287a5ad5b..3e623c458 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -45,11 +45,11 @@ "publish:cocoapod": "pod trunk push ./CapacitorKeyboard.podspec --allow-warnings" }, "devDependencies": { - "@capacitor/android": "file:../../capacitor/android", - "@capacitor/cli": "file:../../capacitor/cli", - "@capacitor/core": "file:../../capacitor/core", + "@capacitor/android": "^5.0.0", + "@capacitor/cli": "^5.0.0", + "@capacitor/core": "^5.0.0", "@capacitor/docgen": "0.2.0", - "@capacitor/ios": "file:../../capacitor/ios", + "@capacitor/ios": "^5.0.0", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", From fd80e16b8a4d1dd80f11aa75208962068311ceaf Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Tue, 7 Nov 2023 16:38:16 -0600 Subject: [PATCH 14/15] lint --- haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift | 2 +- .../ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift | 2 +- .../ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift b/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift index a7eec495f..7325c29f9 100644 --- a/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift +++ b/haptics/ios/Tests/HapticsPluginTests/HapticsPluginTests.swift @@ -1,7 +1,7 @@ import XCTest @testable import HapticsPlugin -final class iosTests: XCTestCase { +final class HapticsPluginTests: XCTestCase { func testExample() throws { // XCTest Documentation // https://developer.apple.com/documentation/xctest diff --git a/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift b/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift index 2a652910b..ec2bcde16 100644 --- a/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift +++ b/keyboard/ios/Tests/KeyboardPluginTests/KeyboardPluginTests.swift @@ -1,7 +1,7 @@ import XCTest @testable import KeyboardPlugin -final class iosTests: XCTestCase { +final class KeyboardPluginTests: XCTestCase { func testExample() throws { // XCTest Documentation // https://developer.apple.com/documentation/xctest diff --git a/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift b/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift index 59d10f7ce..97f6f2d5c 100644 --- a/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift +++ b/status-bar/ios/Tests/StatusBarPluginTests/StatusBarPluginTests.swift @@ -1,7 +1,7 @@ import XCTest @testable import StatusBarPlugin -final class iosTests: XCTestCase { +final class StatusBarPluginTests: XCTestCase { func testExample() throws { // XCTest Documentation // https://developer.apple.com/documentation/xctest From f6b0222d0e977f8bcdf99644cbdeae5370471001 Mon Sep 17 00:00:00 2001 From: Joseph Pender Date: Wed, 8 Nov 2023 09:07:58 -0600 Subject: [PATCH 15/15] Updating iOS verify NPM scripts for SPM plugins --- app/Package.resolved | 2 +- app/package.json | 2 +- haptics/Package.resolved | 2 +- haptics/package.json | 2 +- keyboard/Package.resolved | 2 +- keyboard/package.json | 2 +- status-bar/Package.resolved | 2 +- status-bar/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Package.resolved b/app/Package.resolved index 137eb1a40..2108f2833 100644 --- a/app/Package.resolved +++ b/app/Package.resolved @@ -6,7 +6,7 @@ "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", "state" : { "branch" : "main", - "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + "revision" : "b2e3d8d3ae3b421e5a0b22fd2a32347b40d1ed32" } } ], diff --git a/app/package.json b/app/package.json index 45b1a25ef..70c4b591b 100644 --- a/app/package.json +++ b/app/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", + "verify:ios": "xcodebuild build -scheme CapacitorAppPlugin -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/haptics/Package.resolved b/haptics/Package.resolved index 137eb1a40..2108f2833 100644 --- a/haptics/Package.resolved +++ b/haptics/Package.resolved @@ -6,7 +6,7 @@ "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", "state" : { "branch" : "main", - "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + "revision" : "b2e3d8d3ae3b421e5a0b22fd2a32347b40d1ed32" } } ], diff --git a/haptics/package.json b/haptics/package.json index a7720adb7..d73b31a8e 100644 --- a/haptics/package.json +++ b/haptics/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", + "verify:ios": "xcodebuild build -scheme CapacitorHapticsPlugin -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/keyboard/Package.resolved b/keyboard/Package.resolved index 137eb1a40..2108f2833 100644 --- a/keyboard/Package.resolved +++ b/keyboard/Package.resolved @@ -6,7 +6,7 @@ "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", "state" : { "branch" : "main", - "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + "revision" : "b2e3d8d3ae3b421e5a0b22fd2a32347b40d1ed32" } } ], diff --git a/keyboard/package.json b/keyboard/package.json index 3e623c458..d4d46a3ce 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -29,7 +29,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", + "verify:ios": "xcodebuild build -scheme CapacitorKeyboardPlugin -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/status-bar/Package.resolved b/status-bar/Package.resolved index 137eb1a40..2108f2833 100644 --- a/status-bar/Package.resolved +++ b/status-bar/Package.resolved @@ -6,7 +6,7 @@ "location" : "https://github.com/ionic-team/capacitor6-spm-test.git", "state" : { "branch" : "main", - "revision" : "a8c8d6fecb01051a46f84eaf0a303d7df57defdf" + "revision" : "b2e3d8d3ae3b421e5a0b22fd2a32347b40d1ed32" } } ], diff --git a/status-bar/package.json b/status-bar/package.json index 73c274ea6..004d2ff7c 100644 --- a/status-bar/package.json +++ b/status-bar/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", + "verify:ios": "xcodebuild build -scheme CapacitorStatusBarPlugin -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",