From 4cda4cf4c371965130fd8f8075afe377837dd7f3 Mon Sep 17 00:00:00 2001 From: Joey Pender Date: Wed, 6 Dec 2023 11:47:54 -0600 Subject: [PATCH 01/11] chore(browser): Adding SPM support to browser (#1928) Co-authored-by: Mark Anderson --- browser/.gitignore | 7 + browser/CapacitorBrowser.podspec | 2 +- browser/Package.resolved | 14 + browser/Package.swift | 28 + browser/ios/.gitignore | 8 + browser/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 - browser/ios/Plugin/BrowserPlugin.h | 10 - browser/ios/Plugin/BrowserPlugin.m | 7 - browser/ios/Plugin/Info.plist | 24 - browser/ios/PluginTests/Info.plist | 22 - browser/ios/PluginTests/PluginTests.swift | 15 - browser/ios/Podfile | 16 - .../BrowserPlugin}/Browser.swift | 0 .../BrowserPlugin}/BrowserPlugin.swift | 8 +- .../BrowserPluginTests.swift | 12 + browser/package.json | 6 +- 22 files changed, 81 insertions(+), 847 deletions(-) create mode 100644 browser/Package.resolved create mode 100644 browser/Package.swift create mode 100644 browser/ios/.gitignore delete mode 100644 browser/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 browser/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 browser/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 browser/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 browser/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 browser/ios/Plugin/BrowserPlugin.h delete mode 100644 browser/ios/Plugin/BrowserPlugin.m delete mode 100644 browser/ios/Plugin/Info.plist delete mode 100644 browser/ios/PluginTests/Info.plist delete mode 100644 browser/ios/PluginTests/PluginTests.swift delete mode 100644 browser/ios/Podfile rename browser/ios/{Plugin => Sources/BrowserPlugin}/Browser.swift (100%) rename browser/ios/{Plugin => Sources/BrowserPlugin}/BrowserPlugin.swift (87%) create mode 100644 browser/ios/Tests/BrowserPluginTests/BrowserPluginTests.swift diff --git a/browser/.gitignore b/browser/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/browser/.gitignore +++ b/browser/.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/browser/CapacitorBrowser.podspec b/browser/CapacitorBrowser.podspec index 646854907..0314ab8ca 100644 --- a/browser/CapacitorBrowser.podspec +++ b/browser/CapacitorBrowser.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}', 'browser/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'browser/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/browser/Package.resolved b/browser/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/browser/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/browser/Package.swift b/browser/Package.swift new file mode 100644 index 000000000..b16c98a30 --- /dev/null +++ b/browser/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorBrowser", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "BrowserPlugin", + targets: ["BrowserPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "BrowserPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/BrowserPlugin"), + .testTarget( + name: "BrowserPluginTests", + dependencies: ["BrowserPlugin"], + path: "ios/Tests/BrowserPluginTests") + ] +) \ No newline at end of file diff --git a/browser/ios/.gitignore b/browser/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/browser/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/browser/ios/Plugin.xcodeproj/project.pbxproj b/browser/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index d4c8959b0..000000000 --- a/browser/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 /* Browser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* Browser.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* BrowserPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* BrowserPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* BrowserPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* BrowserPlugin.m */; }; - 50E1A94820377CB70090CE1A /* BrowserPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* BrowserPlugin.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 /* Browser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Browser.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 /* BrowserPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BrowserPlugin.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 /* BrowserPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BrowserPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* BrowserPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BrowserPlugin.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 /* BrowserPlugin.swift */, - 2F98D68124C9AAE400613A4C /* Browser.swift */, - 50ADFF8B201F53D600D50D53 /* BrowserPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* BrowserPlugin.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 /* BrowserPlugin.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 /* BrowserPlugin.swift in Sources */, - 2F98D68224C9AAE500613A4C /* Browser.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* BrowserPlugin.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/browser/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/browser/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/browser/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/browser/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/browser/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/browser/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/browser/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/ios/Plugin.xcworkspace/contents.xcworkspacedata b/browser/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/browser/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/browser/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/browser/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/browser/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/browser/ios/Plugin/BrowserPlugin.h b/browser/ios/Plugin/BrowserPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/browser/ios/Plugin/BrowserPlugin.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/browser/ios/Plugin/BrowserPlugin.m b/browser/ios/Plugin/BrowserPlugin.m deleted file mode 100644 index 6ae763b0b..000000000 --- a/browser/ios/Plugin/BrowserPlugin.m +++ /dev/null @@ -1,7 +0,0 @@ -#import -#import - -CAP_PLUGIN(CAPBrowserPlugin, "Browser", - CAP_PLUGIN_METHOD(open, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(close, CAPPluginReturnPromise); -) diff --git a/browser/ios/Plugin/Info.plist b/browser/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/browser/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/browser/ios/PluginTests/Info.plist b/browser/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/browser/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/browser/ios/PluginTests/PluginTests.swift b/browser/ios/PluginTests/PluginTests.swift deleted file mode 100644 index da0a14a8b..000000000 --- a/browser/ios/PluginTests/PluginTests.swift +++ /dev/null @@ -1,15 +0,0 @@ -import XCTest -@testable import Plugin - -class BrowserTests: 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/browser/ios/Podfile b/browser/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/browser/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/browser/ios/Plugin/Browser.swift b/browser/ios/Sources/BrowserPlugin/Browser.swift similarity index 100% rename from browser/ios/Plugin/Browser.swift rename to browser/ios/Sources/BrowserPlugin/Browser.swift diff --git a/browser/ios/Plugin/BrowserPlugin.swift b/browser/ios/Sources/BrowserPlugin/BrowserPlugin.swift similarity index 87% rename from browser/ios/Plugin/BrowserPlugin.swift rename to browser/ios/Sources/BrowserPlugin/BrowserPlugin.swift index f6be40dd7..83f3ec5d0 100644 --- a/browser/ios/Plugin/BrowserPlugin.swift +++ b/browser/ios/Sources/BrowserPlugin/BrowserPlugin.swift @@ -2,7 +2,13 @@ import Foundation import Capacitor @objc(CAPBrowserPlugin) -public class CAPBrowserPlugin: CAPPlugin { +public class CAPBrowserPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "CAPBrowserPlugin" + public let jsName = "Browser" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "open", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "close", returnType: CAPPluginReturnPromise), + ] private let implementation = Browser() @objc func open(_ call: CAPPluginCall) { diff --git a/browser/ios/Tests/BrowserPluginTests/BrowserPluginTests.swift b/browser/ios/Tests/BrowserPluginTests/BrowserPluginTests.swift new file mode 100644 index 000000000..2ac2efb68 --- /dev/null +++ b/browser/ios/Tests/BrowserPluginTests/BrowserPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import BrowserPlugin + +final class BrowserPluginTests: 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/browser/package.json b/browser/package.json index 11902186c..cb35fdf6f 100644 --- a/browser/package.json +++ b/browser/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorBrowser.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorBrowser -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", From 3bdc2d3f70544b776ae512727628c085829e36e3 Mon Sep 17 00:00:00 2001 From: Joey Pender Date: Thu, 7 Dec 2023 09:50:16 -0600 Subject: [PATCH 02/11] chore(geolocation): Add SPM support to geolocation (#1938) --- geolocation/.gitignore | 7 + geolocation/CapacitorGeolocation.podspec | 2 +- geolocation/Package.resolved | 14 + geolocation/Package.swift | 28 + geolocation/README.md | 11 + geolocation/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 - geolocation/ios/Plugin/GeolocationPlugin.h | 10 - geolocation/ios/Plugin/GeolocationPlugin.m | 12 - geolocation/ios/Plugin/Info.plist | 24 - .../PluginTests/GeolocationPluginTests.swift | 14 - geolocation/ios/PluginTests/Info.plist | 22 - geolocation/ios/Podfile | 16 - .../GeolocationPlugin.swift | 11 +- .../GeolocationPluginTests.swift | 12 + geolocation/package.json | 6 +- 22 files changed, 95 insertions(+), 847 deletions(-) create mode 100644 geolocation/Package.resolved create mode 100644 geolocation/Package.swift create mode 100644 geolocation/ios/.gitignore delete mode 100644 geolocation/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 geolocation/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 geolocation/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 geolocation/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 geolocation/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 geolocation/ios/Plugin/GeolocationPlugin.h delete mode 100644 geolocation/ios/Plugin/GeolocationPlugin.m delete mode 100644 geolocation/ios/Plugin/Info.plist delete mode 100644 geolocation/ios/PluginTests/GeolocationPluginTests.swift delete mode 100644 geolocation/ios/PluginTests/Info.plist delete mode 100644 geolocation/ios/Podfile rename geolocation/ios/{Plugin => Sources/GeolocationPlugin}/GeolocationPlugin.swift (92%) create mode 100644 geolocation/ios/Tests/GeolocationPluginTests/GeolocationPluginTests.swift diff --git a/geolocation/.gitignore b/geolocation/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/geolocation/.gitignore +++ b/geolocation/.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/geolocation/CapacitorGeolocation.podspec b/geolocation/CapacitorGeolocation.podspec index eda1cfe3b..b004b1318 100644 --- a/geolocation/CapacitorGeolocation.podspec +++ b/geolocation/CapacitorGeolocation.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}', 'geolocation/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'geolocation/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/geolocation/Package.resolved b/geolocation/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/geolocation/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/geolocation/Package.swift b/geolocation/Package.swift new file mode 100644 index 000000000..84317212f --- /dev/null +++ b/geolocation/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorGeolocation", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "GeolocationPlugin", + targets: ["GeolocationPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "GeolocationPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/GeolocationPlugin"), + .testTarget( + name: "GeolocationPluginTests", + dependencies: ["GeolocationPlugin"], + path: "ios/Tests/GeolocationPluginTests") + ] +) diff --git a/geolocation/README.md b/geolocation/README.md index 6c4750b24..010f6a5fa 100644 --- a/geolocation/README.md +++ b/geolocation/README.md @@ -203,6 +203,17 @@ Request location permissions. Will throw if system location services are disabl ### Type Aliases +#### Position + +A Position is an array of coordinates. +https://tools.ietf.org/html/rfc7946#section-3.1.1 +Array should contain between two and three elements. +The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), +but the current specification only allows X, Y, and (optionally) Z to be defined. + +number[] + + #### WatchPositionCallback (position: Position | null, err?: any): void diff --git a/geolocation/ios/.gitignore b/geolocation/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/geolocation/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/geolocation/ios/Plugin.xcodeproj/project.pbxproj b/geolocation/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 6aff3e4f8..000000000 --- a/geolocation/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 /* GeolocationPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* GeolocationPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* GeolocationPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* GeolocationPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* GeolocationPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* GeolocationPlugin.m */; }; - 50E1A94820377CB70090CE1A /* GeolocationPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* GeolocationPlugin.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 /* GeolocationPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeolocationPlugin.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 /* GeolocationPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeolocationPluginTests.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 /* GeolocationPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeolocationPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* GeolocationPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeolocationPlugin.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 /* GeolocationPlugin.swift */, - 50ADFF8B201F53D600D50D53 /* GeolocationPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* GeolocationPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* GeolocationPluginTests.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 /* GeolocationPlugin.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 /* GeolocationPlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* GeolocationPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* GeolocationPluginTests.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/geolocation/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/geolocation/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/geolocation/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/geolocation/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/geolocation/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/geolocation/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/geolocation/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/geolocation/ios/Plugin.xcworkspace/contents.xcworkspacedata b/geolocation/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/geolocation/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/geolocation/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/geolocation/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/geolocation/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/geolocation/ios/Plugin/GeolocationPlugin.h b/geolocation/ios/Plugin/GeolocationPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/geolocation/ios/Plugin/GeolocationPlugin.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/geolocation/ios/Plugin/GeolocationPlugin.m b/geolocation/ios/Plugin/GeolocationPlugin.m deleted file mode 100644 index 9f2fd9fe5..000000000 --- a/geolocation/ios/Plugin/GeolocationPlugin.m +++ /dev/null @@ -1,12 +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(GeolocationPlugin, "Geolocation", - CAP_PLUGIN_METHOD(getCurrentPosition, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(watchPosition, CAPPluginReturnCallback); - CAP_PLUGIN_METHOD(clearWatch, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(checkPermissions, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(requestPermissions, CAPPluginReturnPromise); -) diff --git a/geolocation/ios/Plugin/Info.plist b/geolocation/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/geolocation/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/geolocation/ios/PluginTests/GeolocationPluginTests.swift b/geolocation/ios/PluginTests/GeolocationPluginTests.swift deleted file mode 100644 index 86b5cfaae..000000000 --- a/geolocation/ios/PluginTests/GeolocationPluginTests.swift +++ /dev/null @@ -1,14 +0,0 @@ -import XCTest -@testable import Plugin - -class GeolocationTests: 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/geolocation/ios/PluginTests/Info.plist b/geolocation/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/geolocation/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/geolocation/ios/Podfile b/geolocation/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/geolocation/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/geolocation/ios/Plugin/GeolocationPlugin.swift b/geolocation/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift similarity index 92% rename from geolocation/ios/Plugin/GeolocationPlugin.swift rename to geolocation/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift index b3d0bbbd0..e25afa011 100644 --- a/geolocation/ios/Plugin/GeolocationPlugin.swift +++ b/geolocation/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift @@ -4,7 +4,16 @@ import UIKit import Capacitor @objc(GeolocationPlugin) -public class GeolocationPlugin: CAPPlugin, CLLocationManagerDelegate { +public class GeolocationPlugin: CAPPlugin, CLLocationManagerDelegate, CAPBridgedPlugin { + public let identifier = "GeolocationPlugin" + public let jsName = "Geolocation" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "getCurrentPosition", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "watchPosition", returnType: CAPPluginReturnCallback), + CAPPluginMethod(name: "clearWatch", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "checkPermissions", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "requestPermissions", returnType: CAPPluginReturnPromise) + ] enum CallType { case permissions diff --git a/geolocation/ios/Tests/GeolocationPluginTests/GeolocationPluginTests.swift b/geolocation/ios/Tests/GeolocationPluginTests/GeolocationPluginTests.swift new file mode 100644 index 000000000..e13ac42bc --- /dev/null +++ b/geolocation/ios/Tests/GeolocationPluginTests/GeolocationPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import GeolocationPlugin + +final class GeolocationPluginTests: 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/geolocation/package.json b/geolocation/package.json index 49d9acc5d..b01b02348 100644 --- a/geolocation/package.json +++ b/geolocation/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorGeolocation.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorGeolocation -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", From d3ab033ac03aba333d3322ea0b2e2babd1662724 Mon Sep 17 00:00:00 2001 From: Joey Pender Date: Thu, 7 Dec 2023 09:57:26 -0600 Subject: [PATCH 03/11] chore(dialog): Add SPM support to dialog (#1937) --- dialog/.gitignore | 7 + dialog/CapacitorDialog.podspec | 2 +- dialog/Package.resolved | 14 + dialog/Package.swift | 28 + dialog/ios/.gitignore | 8 + dialog/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 - dialog/ios/Plugin/DialogPlugin.h | 10 - dialog/ios/Plugin/DialogPlugin.m | 10 - dialog/ios/Plugin/Info.plist | 24 - .../ios/PluginTests/DialogPluginTests.swift | 15 - dialog/ios/PluginTests/Info.plist | 22 - dialog/ios/Podfile | 16 - .../DialogPlugin}/DialogPlugin.swift | 9 +- .../DialogPluginTests/DialogPluginTests.swift | 12 + dialog/package.json | 6 +- 21 files changed, 82 insertions(+), 846 deletions(-) create mode 100644 dialog/Package.resolved create mode 100644 dialog/Package.swift create mode 100644 dialog/ios/.gitignore delete mode 100644 dialog/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 dialog/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 dialog/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 dialog/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 dialog/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 dialog/ios/Plugin/DialogPlugin.h delete mode 100644 dialog/ios/Plugin/DialogPlugin.m delete mode 100644 dialog/ios/Plugin/Info.plist delete mode 100644 dialog/ios/PluginTests/DialogPluginTests.swift delete mode 100644 dialog/ios/PluginTests/Info.plist delete mode 100644 dialog/ios/Podfile rename dialog/ios/{Plugin => Sources/DialogPlugin}/DialogPlugin.swift (89%) create mode 100644 dialog/ios/Tests/DialogPluginTests/DialogPluginTests.swift diff --git a/dialog/.gitignore b/dialog/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/dialog/.gitignore +++ b/dialog/.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/dialog/CapacitorDialog.podspec b/dialog/CapacitorDialog.podspec index 0932039d2..bb541696c 100644 --- a/dialog/CapacitorDialog.podspec +++ b/dialog/CapacitorDialog.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}', 'dialog/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'dialog/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/dialog/Package.resolved b/dialog/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/dialog/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/dialog/Package.swift b/dialog/Package.swift new file mode 100644 index 000000000..1af69f03a --- /dev/null +++ b/dialog/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorDialog", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "DialogPlugin", + targets: ["DialogPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "DialogPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/DialogPlugin"), + .testTarget( + name: "DialogPluginTests", + dependencies: ["DialogPlugin"], + path: "ios/Tests/DialogPluginTests") + ] +) diff --git a/dialog/ios/.gitignore b/dialog/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/dialog/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/dialog/ios/Plugin.xcodeproj/project.pbxproj b/dialog/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 1fcdf8123..000000000 --- a/dialog/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 /* DialogPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* DialogPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* DialogPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* DialogPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* DialogPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* DialogPlugin.m */; }; - 50E1A94820377CB70090CE1A /* DialogPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* DialogPlugin.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 /* DialogPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DialogPlugin.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 /* DialogPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DialogPluginTests.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 /* DialogPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DialogPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* DialogPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DialogPlugin.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 /* DialogPlugin.swift */, - 50ADFF8B201F53D600D50D53 /* DialogPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* DialogPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* DialogPluginTests.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 /* DialogPlugin.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 /* DialogPlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* DialogPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* DialogPluginTests.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/dialog/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/dialog/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/dialog/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/dialog/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/dialog/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/dialog/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/dialog/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dialog/ios/Plugin.xcworkspace/contents.xcworkspacedata b/dialog/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/dialog/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/dialog/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/dialog/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/dialog/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/dialog/ios/Plugin/DialogPlugin.h b/dialog/ios/Plugin/DialogPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/dialog/ios/Plugin/DialogPlugin.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/dialog/ios/Plugin/DialogPlugin.m b/dialog/ios/Plugin/DialogPlugin.m deleted file mode 100644 index b15788900..000000000 --- a/dialog/ios/Plugin/DialogPlugin.m +++ /dev/null @@ -1,10 +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(DialogPlugin, "Dialog", - CAP_PLUGIN_METHOD(alert, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(prompt, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(confirm, CAPPluginReturnPromise); -) diff --git a/dialog/ios/Plugin/Info.plist b/dialog/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/dialog/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/dialog/ios/PluginTests/DialogPluginTests.swift b/dialog/ios/PluginTests/DialogPluginTests.swift deleted file mode 100644 index 1cdb79e42..000000000 --- a/dialog/ios/PluginTests/DialogPluginTests.swift +++ /dev/null @@ -1,15 +0,0 @@ -import XCTest -@testable import Plugin - -class DialogTests: 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/dialog/ios/PluginTests/Info.plist b/dialog/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/dialog/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/dialog/ios/Podfile b/dialog/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/dialog/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/dialog/ios/Plugin/DialogPlugin.swift b/dialog/ios/Sources/DialogPlugin/DialogPlugin.swift similarity index 89% rename from dialog/ios/Plugin/DialogPlugin.swift rename to dialog/ios/Sources/DialogPlugin/DialogPlugin.swift index 74adb2a16..d97eeb9fa 100644 --- a/dialog/ios/Plugin/DialogPlugin.swift +++ b/dialog/ios/Sources/DialogPlugin/DialogPlugin.swift @@ -5,7 +5,14 @@ import Capacitor * Implement three common dialog types: alert, confirm, and prompt */ @objc(DialogPlugin) -public class DialogPlugin: CAPPlugin { +public class DialogPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "DialogPlugin" + public let jsName = "Dialog" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "alert", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "prompt", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "confirm", returnType: CAPPluginReturnPromise) + ] @objc public func alert(_ call: CAPPluginCall) { let title = call.options["title"] as? String diff --git a/dialog/ios/Tests/DialogPluginTests/DialogPluginTests.swift b/dialog/ios/Tests/DialogPluginTests/DialogPluginTests.swift new file mode 100644 index 000000000..7c12b64eb --- /dev/null +++ b/dialog/ios/Tests/DialogPluginTests/DialogPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import DialogPlugin + +final class DialogPluginTests: 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/dialog/package.json b/dialog/package.json index 307924803..76289edb3 100644 --- a/dialog/package.json +++ b/dialog/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorDialog.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorDialog -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", From 287123f46a7a12cd54d2ad2c77625ef82332cb14 Mon Sep 17 00:00:00 2001 From: Joey Pender Date: Thu, 7 Dec 2023 10:06:12 -0600 Subject: [PATCH 04/11] chore(device): Add SPM support to device (#1932) Co-authored-by: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> --- device/.gitignore | 7 + device/CapacitorDevice.podspec | 2 +- device/Package.resolved | 14 + device/Package.swift | 28 + device/ios/.gitignore | 8 + device/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 - device/ios/Plugin/DevicePlugin.h | 10 - device/ios/Plugin/DevicePlugin.m | 12 - device/ios/Plugin/Info.plist | 24 - .../ios/PluginTests/DevicePluginTests.swift | 15 - device/ios/PluginTests/Info.plist | 22 - device/ios/Podfile | 16 - .../DevicePlugin}/Device.swift | 0 .../DevicePlugin}/DevicePlugin.swift | 11 +- .../DevicePluginTests/DevicePluginTests.swift | 12 + device/package.json | 6 +- 22 files changed, 84 insertions(+), 852 deletions(-) create mode 100644 device/Package.resolved create mode 100644 device/Package.swift create mode 100644 device/ios/.gitignore delete mode 100644 device/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 device/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 device/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 device/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 device/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 device/ios/Plugin/DevicePlugin.h delete mode 100644 device/ios/Plugin/DevicePlugin.m delete mode 100644 device/ios/Plugin/Info.plist delete mode 100644 device/ios/PluginTests/DevicePluginTests.swift delete mode 100644 device/ios/PluginTests/Info.plist delete mode 100644 device/ios/Podfile rename device/ios/{Plugin => Sources/DevicePlugin}/Device.swift (100%) rename device/ios/{Plugin => Sources/DevicePlugin}/DevicePlugin.swift (79%) create mode 100644 device/ios/Tests/DevicePluginTests/DevicePluginTests.swift diff --git a/device/.gitignore b/device/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/device/.gitignore +++ b/device/.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/device/CapacitorDevice.podspec b/device/CapacitorDevice.podspec index 9a7f65ee7..2ddf5544b 100644 --- a/device/CapacitorDevice.podspec +++ b/device/CapacitorDevice.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}', 'device/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'device/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/device/Package.resolved b/device/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/device/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/device/Package.swift b/device/Package.swift new file mode 100644 index 000000000..e3a2d36b4 --- /dev/null +++ b/device/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorDevice", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "DevicePlugin", + targets: ["DevicePlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "DevicePlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/DevicePlugin"), + .testTarget( + name: "DevicePluginTests", + dependencies: ["DevicePlugin"], + path: "ios/Tests/DevicePluginTests") + ] +) diff --git a/device/ios/.gitignore b/device/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/device/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/device/ios/Plugin.xcodeproj/project.pbxproj b/device/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 195f83143..000000000 --- a/device/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 /* Device.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* Device.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* DevicePluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* DevicePluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* DevicePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* DevicePlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* DevicePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* DevicePlugin.m */; }; - 50E1A94820377CB70090CE1A /* DevicePlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* DevicePlugin.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 /* Device.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Device.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 /* DevicePlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DevicePlugin.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 /* DevicePluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DevicePluginTests.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 /* DevicePlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DevicePlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* DevicePlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DevicePlugin.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 /* DevicePlugin.swift */, - 2F98D68124C9AAE400613A4C /* Device.swift */, - 50ADFF8B201F53D600D50D53 /* DevicePlugin.h */, - 50ADFFA72020EE4F00D50D53 /* DevicePlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* DevicePluginTests.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 /* DevicePlugin.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 /* DevicePlugin.swift in Sources */, - 2F98D68224C9AAE500613A4C /* Device.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* DevicePlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* DevicePluginTests.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/device/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/device/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/device/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/device/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/device/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/device/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/device/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/device/ios/Plugin.xcworkspace/contents.xcworkspacedata b/device/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/device/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/device/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/device/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/device/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/device/ios/Plugin/DevicePlugin.h b/device/ios/Plugin/DevicePlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/device/ios/Plugin/DevicePlugin.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/device/ios/Plugin/DevicePlugin.m b/device/ios/Plugin/DevicePlugin.m deleted file mode 100644 index 0c25f907a..000000000 --- a/device/ios/Plugin/DevicePlugin.m +++ /dev/null @@ -1,12 +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(DevicePlugin, "Device", - CAP_PLUGIN_METHOD(getId, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getInfo, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getBatteryInfo, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getLanguageCode, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getLanguageTag, CAPPluginReturnPromise); -) diff --git a/device/ios/Plugin/Info.plist b/device/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/device/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/device/ios/PluginTests/DevicePluginTests.swift b/device/ios/PluginTests/DevicePluginTests.swift deleted file mode 100644 index aecd36b08..000000000 --- a/device/ios/PluginTests/DevicePluginTests.swift +++ /dev/null @@ -1,15 +0,0 @@ -import XCTest -@testable import Plugin - -class DeviceTests: 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/device/ios/PluginTests/Info.plist b/device/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/device/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/device/ios/Podfile b/device/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/device/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/device/ios/Plugin/Device.swift b/device/ios/Sources/DevicePlugin/Device.swift similarity index 100% rename from device/ios/Plugin/Device.swift rename to device/ios/Sources/DevicePlugin/Device.swift diff --git a/device/ios/Plugin/DevicePlugin.swift b/device/ios/Sources/DevicePlugin/DevicePlugin.swift similarity index 79% rename from device/ios/Plugin/DevicePlugin.swift rename to device/ios/Sources/DevicePlugin/DevicePlugin.swift index bb300ba13..7b18c82ef 100644 --- a/device/ios/Plugin/DevicePlugin.swift +++ b/device/ios/Sources/DevicePlugin/DevicePlugin.swift @@ -2,7 +2,16 @@ import Foundation import Capacitor @objc(DevicePlugin) -public class DevicePlugin: CAPPlugin { +public class DevicePlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "DevicePlugin" + public let jsName = "Device" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "getId", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getInfo", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getBatteryInfo", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getLanguageCode", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getLanguageTag", returnType: CAPPluginReturnPromise) + ] private let implementation = Device() @objc func getId(_ call: CAPPluginCall) { diff --git a/device/ios/Tests/DevicePluginTests/DevicePluginTests.swift b/device/ios/Tests/DevicePluginTests/DevicePluginTests.swift new file mode 100644 index 000000000..3602588ef --- /dev/null +++ b/device/ios/Tests/DevicePluginTests/DevicePluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import DevicePlugin + +final class DevicePluginTests: 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/device/package.json b/device/package.json index d3740f1ee..4728b0145 100644 --- a/device/package.json +++ b/device/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorDevice.podspec" ], "author": "Ionic ", @@ -30,7 +32,7 @@ "scripts": { "test": "uvu -r esm -r ts-node/register src/__tests__", "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 CapacitorDevice -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build && npm test", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", From e7b00b479343a5705ec731c9ba8b02f783e87fee Mon Sep 17 00:00:00 2001 From: Joey Pender Date: Thu, 7 Dec 2023 10:15:52 -0600 Subject: [PATCH 05/11] chore(clipboard): Adding SPM support to clipboard (#1931) Co-authored-by: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> --- clipboard/.gitignore | 7 + clipboard/CapacitorClipboard.podspec | 2 +- clipboard/Package.resolved | 14 + clipboard/Package.swift | 28 + clipboard/ios/.gitignore | 8 + .../ios/Plugin.xcodeproj/project.pbxproj | 560 ------------------ .../contents.xcworkspacedata | 10 - clipboard/ios/Plugin/Info.plist | 24 - clipboard/ios/Plugin/Plugin.h | 10 - clipboard/ios/Plugin/Plugin.m | 9 - clipboard/ios/PluginTests/Info.plist | 22 - clipboard/ios/PluginTests/PluginTests.swift | 17 - clipboard/ios/Podfile | 16 - .../ClipboardPlugin}/Clipboard.swift | 0 .../ClipboardPlugin}/ClipboardPlugin.swift | 8 +- .../ClipboardPluginTests.swift | 12 + clipboard/package.json | 6 +- 17 files changed, 81 insertions(+), 672 deletions(-) create mode 100644 clipboard/Package.resolved create mode 100644 clipboard/Package.swift create mode 100644 clipboard/ios/.gitignore delete mode 100644 clipboard/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 clipboard/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 clipboard/ios/Plugin/Info.plist delete mode 100644 clipboard/ios/Plugin/Plugin.h delete mode 100644 clipboard/ios/Plugin/Plugin.m delete mode 100644 clipboard/ios/PluginTests/Info.plist delete mode 100644 clipboard/ios/PluginTests/PluginTests.swift delete mode 100644 clipboard/ios/Podfile rename clipboard/ios/{Plugin => Sources/ClipboardPlugin}/Clipboard.swift (100%) rename clipboard/ios/{Plugin => Sources/ClipboardPlugin}/ClipboardPlugin.swift (78%) create mode 100644 clipboard/ios/Tests/ClipboardPluginTests/ClipboardPluginTests.swift diff --git a/clipboard/.gitignore b/clipboard/.gitignore index 1523838f8..a5599e950 100644 --- a/clipboard/.gitignore +++ b/clipboard/.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/clipboard/CapacitorClipboard.podspec b/clipboard/CapacitorClipboard.podspec index 13f5be54a..e1d80b6ce 100644 --- a/clipboard/CapacitorClipboard.podspec +++ b/clipboard/CapacitorClipboard.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}', 'clipboard/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'clipboard/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/clipboard/Package.resolved b/clipboard/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/clipboard/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/clipboard/Package.swift b/clipboard/Package.swift new file mode 100644 index 000000000..bf6730914 --- /dev/null +++ b/clipboard/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorClipboard", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "ClipboardPlugin", + targets: ["ClipboardPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "ClipboardPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/ClipboardPlugin"), + .testTarget( + name: "ClipboardPluginTests", + dependencies: ["ClipboardPlugin"], + path: "ios/Tests/ClipboardPluginTests") + ] +) diff --git a/clipboard/ios/.gitignore b/clipboard/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/clipboard/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/clipboard/ios/Plugin.xcodeproj/project.pbxproj b/clipboard/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 0702e3921..000000000 --- a/clipboard/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,560 +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 */; }; - 394A49AD24DB304D00F554AA /* Clipboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394A49AC24DB304D00F554AA /* Clipboard.swift */; }; - 394A49AF24DB305D00F554AA /* ClipboardPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394A49AE24DB305D00F554AA /* ClipboardPlugin.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* Plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* Plugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* Plugin.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 */ - 394A49AC24DB304D00F554AA /* Clipboard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Clipboard.swift; sourceTree = ""; }; - 394A49AE24DB305D00F554AA /* ClipboardPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClipboardPlugin.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 /* Plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Plugin.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 /* Plugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Plugin.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 = ( - 394A49AC24DB304D00F554AA /* Clipboard.swift */, - 394A49AE24DB305D00F554AA /* ClipboardPlugin.swift */, - 50ADFF8B201F53D600D50D53 /* Plugin.h */, - 50ADFFA72020EE4F00D50D53 /* Plugin.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 /* Plugin.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 */, - CCA81D3B7E26D0D727D24C84 /* [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 = 0920; - ORGANIZATIONNAME = "Max Lynch"; - TargetAttributes = { - 50ADFF87201F53D600D50D53 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1160; - 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, - ); - 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; - }; - 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; - }; - CCA81D3B7E26D0D727D24C84 /* [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; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 50ADFF83201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 394A49AD24DB304D00F554AA /* Clipboard.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* Plugin.m in Sources */, - 394A49AF24DB305D00F554AA /* ClipboardPlugin.swift 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_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_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; - 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_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_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; - 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 = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - 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 = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - 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/clipboard/ios/Plugin.xcworkspace/contents.xcworkspacedata b/clipboard/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/clipboard/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/clipboard/ios/Plugin/Info.plist b/clipboard/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/clipboard/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/clipboard/ios/Plugin/Plugin.h b/clipboard/ios/Plugin/Plugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/clipboard/ios/Plugin/Plugin.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/clipboard/ios/Plugin/Plugin.m b/clipboard/ios/Plugin/Plugin.m deleted file mode 100644 index 33437329c..000000000 --- a/clipboard/ios/Plugin/Plugin.m +++ /dev/null @@ -1,9 +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(ClipboardPlugin, "Clipboard", - CAP_PLUGIN_METHOD(read, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(write, CAPPluginReturnPromise); - ) diff --git a/clipboard/ios/PluginTests/Info.plist b/clipboard/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/clipboard/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/clipboard/ios/PluginTests/PluginTests.swift b/clipboard/ios/PluginTests/PluginTests.swift deleted file mode 100644 index dcac45304..000000000 --- a/clipboard/ios/PluginTests/PluginTests.swift +++ /dev/null @@ -1,17 +0,0 @@ -import XCTest -import Capacitor -@testable import Plugin - -class PluginTests: 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/clipboard/ios/Podfile b/clipboard/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/clipboard/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/clipboard/ios/Plugin/Clipboard.swift b/clipboard/ios/Sources/ClipboardPlugin/Clipboard.swift similarity index 100% rename from clipboard/ios/Plugin/Clipboard.swift rename to clipboard/ios/Sources/ClipboardPlugin/Clipboard.swift diff --git a/clipboard/ios/Plugin/ClipboardPlugin.swift b/clipboard/ios/Sources/ClipboardPlugin/ClipboardPlugin.swift similarity index 78% rename from clipboard/ios/Plugin/ClipboardPlugin.swift rename to clipboard/ios/Sources/ClipboardPlugin/ClipboardPlugin.swift index 39dd28119..b355a5f18 100644 --- a/clipboard/ios/Plugin/ClipboardPlugin.swift +++ b/clipboard/ios/Sources/ClipboardPlugin/ClipboardPlugin.swift @@ -2,7 +2,13 @@ import Foundation import Capacitor @objc(ClipboardPlugin) -public class ClipboardPlugin: CAPPlugin { +public class ClipboardPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "ClipboardPlugin" + public let jsName = "Clipboard" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "read", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "write", returnType: CAPPluginReturnPromise) + ] private let implementation = Clipboard() @objc func read(_ call: CAPPluginCall) { diff --git a/clipboard/ios/Tests/ClipboardPluginTests/ClipboardPluginTests.swift b/clipboard/ios/Tests/ClipboardPluginTests/ClipboardPluginTests.swift new file mode 100644 index 000000000..25ae18497 --- /dev/null +++ b/clipboard/ios/Tests/ClipboardPluginTests/ClipboardPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import ClipboardPlugin + +final class ClipboardPluginTests: 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/clipboard/package.json b/clipboard/package.json index 7f84af5f3..f628d5e42 100644 --- a/clipboard/package.json +++ b/clipboard/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorClipboard.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorClipboard -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", From 0e1e1d515162ca58b4d8c1416713ea7ca9d4ab81 Mon Sep 17 00:00:00 2001 From: Joey Pender Date: Thu, 7 Dec 2023 10:26:19 -0600 Subject: [PATCH 06/11] chore(camera): Adding SPM support to camera (#1930) Co-authored-by: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> --- camera/.gitignore | 7 + camera/CapacitorCamera.podspec | 2 +- camera/Package.resolved | 14 + camera/Package.swift | 28 + camera/ios/.gitignore | 8 + camera/ios/Plugin.xcodeproj/project.pbxproj | 579 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 -- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - camera/ios/Plugin/CameraPlugin.h | 10 - camera/ios/Plugin/CameraPlugin.m | 11 - camera/ios/Plugin/Info.plist | 24 - .../ios/PluginTests/CameraPluginTests.swift | 14 - camera/ios/PluginTests/Info.plist | 22 - camera/ios/Podfile | 16 - .../CameraPlugin}/CameraExtensions.swift | 0 .../CameraPlugin}/CameraPlugin.swift | 12 +- .../CameraPlugin}/CameraTypes.swift | 0 .../CameraPlugin}/ImageSaver.swift | 0 .../CameraPluginTests/CameraPluginTests.swift | 12 + camera/package.json | 6 +- 24 files changed, 85 insertions(+), 858 deletions(-) create mode 100644 camera/Package.resolved create mode 100644 camera/Package.swift create mode 100644 camera/ios/.gitignore delete mode 100644 camera/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 camera/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 camera/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 camera/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 camera/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 camera/ios/Plugin/CameraPlugin.h delete mode 100644 camera/ios/Plugin/CameraPlugin.m delete mode 100644 camera/ios/Plugin/Info.plist delete mode 100644 camera/ios/PluginTests/CameraPluginTests.swift delete mode 100644 camera/ios/PluginTests/Info.plist delete mode 100644 camera/ios/Podfile rename camera/ios/{Plugin => Sources/CameraPlugin}/CameraExtensions.swift (100%) rename camera/ios/{Plugin => Sources/CameraPlugin}/CameraPlugin.swift (97%) rename camera/ios/{Plugin => Sources/CameraPlugin}/CameraTypes.swift (100%) rename camera/ios/{Plugin => Sources/CameraPlugin}/ImageSaver.swift (100%) create mode 100644 camera/ios/Tests/CameraPluginTests/CameraPluginTests.swift diff --git a/camera/.gitignore b/camera/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/camera/.gitignore +++ b/camera/.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/camera/CapacitorCamera.podspec b/camera/CapacitorCamera.podspec index a47e55d7c..146063873 100644 --- a/camera/CapacitorCamera.podspec +++ b/camera/CapacitorCamera.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}', 'camera/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'camera/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/camera/Package.resolved b/camera/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/camera/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/camera/Package.swift b/camera/Package.swift new file mode 100644 index 000000000..141a5e424 --- /dev/null +++ b/camera/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorCamera", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "CameraPlugin", + targets: ["CameraPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "CameraPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/CameraPlugin"), + .testTarget( + name: "CameraPluginTests", + dependencies: ["CameraPlugin"], + path: "ios/Tests/CameraPluginTests") + ] +) diff --git a/camera/ios/.gitignore b/camera/ios/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/camera/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/camera/ios/Plugin.xcodeproj/project.pbxproj b/camera/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 8840c25ad..000000000 --- a/camera/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,579 +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 */; }; - 2FA5008E26E9143C00127B0B /* ImageSaver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FA5008D26E9143C00127B0B /* ImageSaver.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* CameraPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* CameraPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* CameraPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* CameraPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* CameraPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* CameraPlugin.m */; }; - 50E1A94820377CB70090CE1A /* CameraPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* CameraPlugin.swift */; }; - 6276AAD3255B3E0E00097815 /* CameraExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6276AAD2255B3E0E00097815 /* CameraExtensions.swift */; }; - 6276AAD7255B3E1400097815 /* CameraTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6276AAD6255B3E1400097815 /* CameraTypes.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 */ - 2FA5008D26E9143C00127B0B /* ImageSaver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageSaver.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 /* CameraPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CameraPlugin.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 /* CameraPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraPluginTests.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 /* CameraPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CameraPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* CameraPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraPlugin.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 = ""; }; - 6276AAD2255B3E0E00097815 /* CameraExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraExtensions.swift; sourceTree = ""; }; - 6276AAD6255B3E1400097815 /* CameraTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraTypes.swift; 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 = ( - 2FA5008D26E9143C00127B0B /* ImageSaver.swift */, - 50ADFF8B201F53D600D50D53 /* CameraPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* CameraPlugin.m */, - 50E1A94720377CB70090CE1A /* CameraPlugin.swift */, - 6276AAD2255B3E0E00097815 /* CameraExtensions.swift */, - 6276AAD6255B3E1400097815 /* CameraTypes.swift */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* CameraPluginTests.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 /* CameraPlugin.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 /* CameraPlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* CameraPlugin.m in Sources */, - 2FA5008E26E9143C00127B0B /* ImageSaver.swift in Sources */, - 6276AAD7255B3E1400097815 /* CameraTypes.swift in Sources */, - 6276AAD3255B3E0E00097815 /* CameraExtensions.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* CameraPluginTests.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/camera/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/camera/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/camera/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/camera/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/camera/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/camera/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/camera/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/camera/ios/Plugin.xcworkspace/contents.xcworkspacedata b/camera/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/camera/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/camera/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/camera/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/camera/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/camera/ios/Plugin/CameraPlugin.h b/camera/ios/Plugin/CameraPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/camera/ios/Plugin/CameraPlugin.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/camera/ios/Plugin/CameraPlugin.m b/camera/ios/Plugin/CameraPlugin.m deleted file mode 100644 index 2edbf0673..000000000 --- a/camera/ios/Plugin/CameraPlugin.m +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -CAP_PLUGIN(CAPCameraPlugin, "Camera", - CAP_PLUGIN_METHOD(getPhoto, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(pickImages, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(checkPermissions, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(requestPermissions, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(pickLimitedLibraryPhotos, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(getLimitedLibraryPhotos, CAPPluginReturnPromise); -) diff --git a/camera/ios/Plugin/Info.plist b/camera/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/camera/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/camera/ios/PluginTests/CameraPluginTests.swift b/camera/ios/PluginTests/CameraPluginTests.swift deleted file mode 100644 index 9e3487a04..000000000 --- a/camera/ios/PluginTests/CameraPluginTests.swift +++ /dev/null @@ -1,14 +0,0 @@ -import XCTest -@testable import Plugin - -class CameraTests: 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/camera/ios/PluginTests/Info.plist b/camera/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/camera/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/camera/ios/Podfile b/camera/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/camera/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/camera/ios/Plugin/CameraExtensions.swift b/camera/ios/Sources/CameraPlugin/CameraExtensions.swift similarity index 100% rename from camera/ios/Plugin/CameraExtensions.swift rename to camera/ios/Sources/CameraPlugin/CameraExtensions.swift diff --git a/camera/ios/Plugin/CameraPlugin.swift b/camera/ios/Sources/CameraPlugin/CameraPlugin.swift similarity index 97% rename from camera/ios/Plugin/CameraPlugin.swift rename to camera/ios/Sources/CameraPlugin/CameraPlugin.swift index 3f89a0b70..8909d0f95 100644 --- a/camera/ios/Plugin/CameraPlugin.swift +++ b/camera/ios/Sources/CameraPlugin/CameraPlugin.swift @@ -4,7 +4,17 @@ import Photos import PhotosUI @objc(CAPCameraPlugin) -public class CameraPlugin: CAPPlugin { +public class CameraPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "CAPCameraPlugin" + public let jsName = "Camera" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "getPhoto", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "pickImages", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "checkPermissions", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "requestPermissions", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "pickLimitedLibraryPhotos", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "getLimitedLibraryPhotos", returnType: CAPPluginReturnPromise) + ] private var call: CAPPluginCall? private var settings = CameraSettings() private let defaultSource = CameraSource.prompt diff --git a/camera/ios/Plugin/CameraTypes.swift b/camera/ios/Sources/CameraPlugin/CameraTypes.swift similarity index 100% rename from camera/ios/Plugin/CameraTypes.swift rename to camera/ios/Sources/CameraPlugin/CameraTypes.swift diff --git a/camera/ios/Plugin/ImageSaver.swift b/camera/ios/Sources/CameraPlugin/ImageSaver.swift similarity index 100% rename from camera/ios/Plugin/ImageSaver.swift rename to camera/ios/Sources/CameraPlugin/ImageSaver.swift diff --git a/camera/ios/Tests/CameraPluginTests/CameraPluginTests.swift b/camera/ios/Tests/CameraPluginTests/CameraPluginTests.swift new file mode 100644 index 000000000..abb98193e --- /dev/null +++ b/camera/ios/Tests/CameraPluginTests/CameraPluginTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import CameraPlugin + +final class CameraPluginTests: 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/camera/package.json b/camera/package.json index 3ecacfe53..cc7763a53 100644 --- a/camera/package.json +++ b/camera/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorCamera.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorCamera -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", From 2152f6d5003a58f26a06a7a3edcfedd1872241ab Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Thu, 7 Dec 2023 14:30:38 -0500 Subject: [PATCH 07/11] chore(text-zoom): Add SPM support to text-zoom (#1922) Co-authored-by: Joseph Pender --- text-zoom/.gitignore | 7 + text-zoom/CapacitorTextZoom.podspec | 2 +- text-zoom/Package.resolved | 14 + text-zoom/Package.swift | 28 + .../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 - text-zoom/ios/Plugin/Info.plist | 24 - text-zoom/ios/Plugin/TextZoomPlugin.h | 10 - text-zoom/ios/Plugin/TextZoomPlugin.m | 8 - text-zoom/ios/Plugin/TextZoomPlugin.swift | 13 - text-zoom/ios/PluginTests/Info.plist | 22 - text-zoom/ios/Podfile | 16 - .../TextZoomPlugin}/TextZoom.swift | 0 .../TextZoomPlugin/TextZoomPlugin.swift | 18 + .../TextZoomPluginTests}/PluginTests.swift | 2 +- text-zoom/package.json | 6 +- 21 files changed, 73 insertions(+), 846 deletions(-) create mode 100644 text-zoom/Package.resolved create mode 100644 text-zoom/Package.swift delete mode 100644 text-zoom/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 text-zoom/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 text-zoom/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 text-zoom/ios/Plugin/Info.plist delete mode 100644 text-zoom/ios/Plugin/TextZoomPlugin.h delete mode 100644 text-zoom/ios/Plugin/TextZoomPlugin.m delete mode 100644 text-zoom/ios/Plugin/TextZoomPlugin.swift delete mode 100644 text-zoom/ios/PluginTests/Info.plist delete mode 100644 text-zoom/ios/Podfile rename text-zoom/ios/{Plugin => Sources/TextZoomPlugin}/TextZoom.swift (100%) create mode 100644 text-zoom/ios/Sources/TextZoomPlugin/TextZoomPlugin.swift rename text-zoom/ios/{PluginTests => Tests/TextZoomPluginTests}/PluginTests.swift (92%) diff --git a/text-zoom/.gitignore b/text-zoom/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/text-zoom/.gitignore +++ b/text-zoom/.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/text-zoom/CapacitorTextZoom.podspec b/text-zoom/CapacitorTextZoom.podspec index 306d82054..75e33c0d5 100644 --- a/text-zoom/CapacitorTextZoom.podspec +++ b/text-zoom/CapacitorTextZoom.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}', 'text-zoom/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'text-zoom/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/text-zoom/Package.resolved b/text-zoom/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/text-zoom/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/text-zoom/Package.swift b/text-zoom/Package.swift new file mode 100644 index 000000000..4b4aa854e --- /dev/null +++ b/text-zoom/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorTextZoom", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "TextZoomPlugin", + targets: ["TextZoomPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "TextZoomPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/TextZoomPlugin"), + .testTarget( + name: "TextZoomPluginTests", + dependencies: ["TextZoomPlugin"], + path: "ios/Tests/TextZoomPluginTests") + ] +) \ No newline at end of file diff --git a/text-zoom/ios/Plugin.xcodeproj/project.pbxproj b/text-zoom/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 27b259ab1..000000000 --- a/text-zoom/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 /* TextZoom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* TextZoom.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* TextZoomPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* TextZoomPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* TextZoomPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* TextZoomPlugin.m */; }; - 50E1A94820377CB70090CE1A /* TextZoomPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* TextZoomPlugin.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 /* TextZoom.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextZoom.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 /* TextZoomPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextZoomPlugin.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 /* TextZoomPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextZoomPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* TextZoomPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextZoomPlugin.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 /* TextZoomPlugin.swift */, - 2F98D68124C9AAE400613A4C /* TextZoom.swift */, - 50ADFF8B201F53D600D50D53 /* TextZoomPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* TextZoomPlugin.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 /* TextZoomPlugin.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 /* TextZoomPlugin.swift in Sources */, - 2F98D68224C9AAE500613A4C /* TextZoom.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* TextZoomPlugin.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/text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/text-zoom/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/text-zoom/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/text-zoom/ios/Plugin.xcworkspace/contents.xcworkspacedata b/text-zoom/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/text-zoom/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/text-zoom/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/text-zoom/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/text-zoom/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/text-zoom/ios/Plugin/Info.plist b/text-zoom/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/text-zoom/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/text-zoom/ios/Plugin/TextZoomPlugin.h b/text-zoom/ios/Plugin/TextZoomPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/text-zoom/ios/Plugin/TextZoomPlugin.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/text-zoom/ios/Plugin/TextZoomPlugin.m b/text-zoom/ios/Plugin/TextZoomPlugin.m deleted file mode 100644 index 61df5bf7e..000000000 --- a/text-zoom/ios/Plugin/TextZoomPlugin.m +++ /dev/null @@ -1,8 +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(TextZoomPlugin, "TextZoom", - CAP_PLUGIN_METHOD(getPreferred, CAPPluginReturnPromise); -) diff --git a/text-zoom/ios/Plugin/TextZoomPlugin.swift b/text-zoom/ios/Plugin/TextZoomPlugin.swift deleted file mode 100644 index 268ba8e3e..000000000 --- a/text-zoom/ios/Plugin/TextZoomPlugin.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Foundation -import Capacitor - -@objc(TextZoomPlugin) -public class TextZoomPlugin: CAPPlugin { - private let textZoom = TextZoom() - - @objc func getPreferred(_ call: CAPPluginCall) { - call.resolve([ - "value": textZoom.preferredFontSize() - ]) - } -} diff --git a/text-zoom/ios/PluginTests/Info.plist b/text-zoom/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/text-zoom/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/text-zoom/ios/Podfile b/text-zoom/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/text-zoom/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/text-zoom/ios/Plugin/TextZoom.swift b/text-zoom/ios/Sources/TextZoomPlugin/TextZoom.swift similarity index 100% rename from text-zoom/ios/Plugin/TextZoom.swift rename to text-zoom/ios/Sources/TextZoomPlugin/TextZoom.swift diff --git a/text-zoom/ios/Sources/TextZoomPlugin/TextZoomPlugin.swift b/text-zoom/ios/Sources/TextZoomPlugin/TextZoomPlugin.swift new file mode 100644 index 000000000..e932ce647 --- /dev/null +++ b/text-zoom/ios/Sources/TextZoomPlugin/TextZoomPlugin.swift @@ -0,0 +1,18 @@ +import Foundation +import Capacitor + +@objc(TextZoomPlugin) +public class TextZoomPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "TextZoomPlugin" + public let jsName = "TextZoom" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "getPreferred", returnType: CAPPluginReturnPromise), + ] + private let textZoom = TextZoom() + + @objc func getPreferred(_ call: CAPPluginCall) { + call.resolve([ + "value": textZoom.preferredFontSize() + ]) + } +} diff --git a/text-zoom/ios/PluginTests/PluginTests.swift b/text-zoom/ios/Tests/TextZoomPluginTests/PluginTests.swift similarity index 92% rename from text-zoom/ios/PluginTests/PluginTests.swift rename to text-zoom/ios/Tests/TextZoomPluginTests/PluginTests.swift index 01d761a85..80d26e7fd 100644 --- a/text-zoom/ios/PluginTests/PluginTests.swift +++ b/text-zoom/ios/Tests/TextZoomPluginTests/PluginTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Plugin +@testable import TextZoomPlugin class TextZoomTests: XCTestCase { diff --git a/text-zoom/package.json b/text-zoom/package.json index f3578bf56..b62423d52 100644 --- a/text-zoom/package.json +++ b/text-zoom/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorTextZoom.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorTextZoom -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", From 69a1904c23d6db26b2d7991353f9aac50fa6c015 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Thu, 7 Dec 2023 14:48:51 -0500 Subject: [PATCH 08/11] chore(share): Add SPM support to share (#1923) Co-authored-by: Joseph Pender --- share/.gitignore | 7 + share/CapacitorShare.podspec | 2 +- share/Package.resolved | 14 + share/Package.swift | 28 + share/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 - share/ios/Plugin/Info.plist | 24 - share/ios/Plugin/SharePlugin.h | 10 - share/ios/Plugin/SharePlugin.m | 9 - share/ios/PluginTests/Info.plist | 22 - share/ios/Podfile | 16 - .../SharePlugin}/SharePlugin.swift | 8 +- .../SharePluginTests}/PluginTests.swift | 2 +- share/package.json | 6 +- 19 files changed, 62 insertions(+), 831 deletions(-) create mode 100644 share/Package.resolved create mode 100644 share/Package.swift delete mode 100644 share/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 share/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 share/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 share/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 share/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 share/ios/Plugin/Info.plist delete mode 100644 share/ios/Plugin/SharePlugin.h delete mode 100644 share/ios/Plugin/SharePlugin.m delete mode 100644 share/ios/PluginTests/Info.plist delete mode 100644 share/ios/Podfile rename share/ios/{Plugin => Sources/SharePlugin}/SharePlugin.swift (85%) rename share/ios/{PluginTests => Tests/SharePluginTests}/PluginTests.swift (93%) diff --git a/share/.gitignore b/share/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/share/.gitignore +++ b/share/.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/share/CapacitorShare.podspec b/share/CapacitorShare.podspec index 53543d6dd..12447deb5 100644 --- a/share/CapacitorShare.podspec +++ b/share/CapacitorShare.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}', 'share/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'share/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/share/Package.resolved b/share/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/share/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/share/Package.swift b/share/Package.swift new file mode 100644 index 000000000..c0e85b10c --- /dev/null +++ b/share/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorShare", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "SharePlugin", + targets: ["SharePlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "SharePlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/SharePlugin"), + .testTarget( + name: "SharePluginTests", + dependencies: ["SharePlugin"], + path: "ios/Tests/SharePluginTests") + ] +) \ No newline at end of file diff --git a/share/ios/Plugin.xcodeproj/project.pbxproj b/share/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 6da13a4fd..000000000 --- a/share/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 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* SharePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* SharePlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* SharePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* SharePlugin.m */; }; - 50E1A94820377CB70090CE1A /* SharePlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* SharePlugin.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 /* SharePlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SharePlugin.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 /* SharePlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SharePlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* SharePlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharePlugin.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 /* SharePlugin.swift */, - 50ADFF8B201F53D600D50D53 /* SharePlugin.h */, - 50ADFFA72020EE4F00D50D53 /* SharePlugin.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 /* SharePlugin.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 /* SharePlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* SharePlugin.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/share/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/share/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/share/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/share/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/share/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/share/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/share/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/share/ios/Plugin.xcworkspace/contents.xcworkspacedata b/share/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/share/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/share/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/share/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/share/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/share/ios/Plugin/Info.plist b/share/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/share/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/share/ios/Plugin/SharePlugin.h b/share/ios/Plugin/SharePlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/share/ios/Plugin/SharePlugin.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/share/ios/Plugin/SharePlugin.m b/share/ios/Plugin/SharePlugin.m deleted file mode 100644 index 42cde0f51..000000000 --- a/share/ios/Plugin/SharePlugin.m +++ /dev/null @@ -1,9 +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(SharePlugin, "Share", - CAP_PLUGIN_METHOD(canShare, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(share, CAPPluginReturnPromise); -) diff --git a/share/ios/PluginTests/Info.plist b/share/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/share/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/share/ios/Podfile b/share/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/share/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/share/ios/Plugin/SharePlugin.swift b/share/ios/Sources/SharePlugin/SharePlugin.swift similarity index 85% rename from share/ios/Plugin/SharePlugin.swift rename to share/ios/Sources/SharePlugin/SharePlugin.swift index 4ce8446dd..c6709c319 100644 --- a/share/ios/Plugin/SharePlugin.swift +++ b/share/ios/Sources/SharePlugin/SharePlugin.swift @@ -2,7 +2,13 @@ import Foundation import Capacitor @objc(SharePlugin) -public class SharePlugin: CAPPlugin { +public class SharePlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "SharePlugin" + public let jsName = "Share" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "canShare", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "share", returnType: CAPPluginReturnPromise), + ] @objc func canShare(_ call: CAPPluginCall) { call.resolve([ diff --git a/share/ios/PluginTests/PluginTests.swift b/share/ios/Tests/SharePluginTests/PluginTests.swift similarity index 93% rename from share/ios/PluginTests/PluginTests.swift rename to share/ios/Tests/SharePluginTests/PluginTests.swift index b8840dda1..077027d00 100644 --- a/share/ios/PluginTests/PluginTests.swift +++ b/share/ios/Tests/SharePluginTests/PluginTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Plugin +@testable import SharePlugin class ShareTests: XCTestCase { override func setUp() { diff --git a/share/package.json b/share/package.json index a03f03836..424a141c1 100644 --- a/share/package.json +++ b/share/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorShare.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorShare -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", From d9f838946b68cf0103fea66fc5f2d4d20ec3b807 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Thu, 7 Dec 2023 15:05:08 -0500 Subject: [PATCH 09/11] chore(splash-screen): Add SPM support to splash-screen (#1924) Co-authored-by: Joseph Pender --- splash-screen/.gitignore | 7 + splash-screen/CapacitorSplashScreen.podspec | 2 +- splash-screen/Package.resolved | 14 + splash-screen/Package.swift | 28 + .../ios/Plugin.xcodeproj/project.pbxproj | 579 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 -- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - splash-screen/ios/Plugin/Info.plist | 24 - splash-screen/ios/Plugin/SplashScreenPlugin.h | 10 - splash-screen/ios/Plugin/SplashScreenPlugin.m | 9 - splash-screen/ios/PluginTests/Info.plist | 22 - splash-screen/ios/Podfile | 16 - .../SplashScreenPlugin}/SplashScreen.swift | 0 .../SplashScreenConfig.swift | 0 .../SplashScreenPlugin.swift | 8 +- .../SplashScreenSettings.swift | 0 .../SplashScreenPluginTests.swift | 2 +- splash-screen/package.json | 6 +- 22 files changed, 62 insertions(+), 843 deletions(-) create mode 100644 splash-screen/Package.resolved create mode 100644 splash-screen/Package.swift delete mode 100644 splash-screen/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 splash-screen/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 splash-screen/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 splash-screen/ios/Plugin/Info.plist delete mode 100644 splash-screen/ios/Plugin/SplashScreenPlugin.h delete mode 100644 splash-screen/ios/Plugin/SplashScreenPlugin.m delete mode 100644 splash-screen/ios/PluginTests/Info.plist delete mode 100644 splash-screen/ios/Podfile rename splash-screen/ios/{Plugin => Sources/SplashScreenPlugin}/SplashScreen.swift (100%) rename splash-screen/ios/{Plugin => Sources/SplashScreenPlugin}/SplashScreenConfig.swift (100%) rename splash-screen/ios/{Plugin => Sources/SplashScreenPlugin}/SplashScreenPlugin.swift (88%) rename splash-screen/ios/{Plugin => Sources/SplashScreenPlugin}/SplashScreenSettings.swift (100%) rename splash-screen/ios/{PluginTests => Tests/SplashScreenPluginTests}/SplashScreenPluginTests.swift (91%) diff --git a/splash-screen/.gitignore b/splash-screen/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/splash-screen/.gitignore +++ b/splash-screen/.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/splash-screen/CapacitorSplashScreen.podspec b/splash-screen/CapacitorSplashScreen.podspec index a86dda7ff..0e5fab08b 100644 --- a/splash-screen/CapacitorSplashScreen.podspec +++ b/splash-screen/CapacitorSplashScreen.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}', 'splash-screen/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'splash-screen/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/splash-screen/Package.resolved b/splash-screen/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/splash-screen/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/splash-screen/Package.swift b/splash-screen/Package.swift new file mode 100644 index 000000000..062e8d820 --- /dev/null +++ b/splash-screen/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorSplashScreen", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "SplashScreenPlugin", + targets: ["SplashScreenPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "SplashScreenPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/SplashScreenPlugin"), + .testTarget( + name: "SplashScreenPluginTests", + dependencies: ["SplashScreenPlugin"], + path: "ios/Tests/SplashScreenPluginTests") + ] +) \ No newline at end of file diff --git a/splash-screen/ios/Plugin.xcodeproj/project.pbxproj b/splash-screen/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 01ea34e26..000000000 --- a/splash-screen/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,579 +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 */; }; - 2F94DB20258B85A6003E0C43 /* SplashScreenSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F94DB1F258B85A6003E0C43 /* SplashScreenSettings.swift */; }; - 2F94DB24258B85BE003E0C43 /* SplashScreenConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F94DB23258B85BE003E0C43 /* SplashScreenConfig.swift */; }; - 2F98D68224C9AAE500613A4C /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* SplashScreen.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* SplashScreenPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* SplashScreenPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* SplashScreenPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* SplashScreenPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* SplashScreenPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* SplashScreenPlugin.m */; }; - 50E1A94820377CB70090CE1A /* SplashScreenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* SplashScreenPlugin.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 */ - 2F94DB1F258B85A6003E0C43 /* SplashScreenSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashScreenSettings.swift; sourceTree = ""; }; - 2F94DB23258B85BE003E0C43 /* SplashScreenConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashScreenConfig.swift; sourceTree = ""; }; - 2F98D68124C9AAE400613A4C /* SplashScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreen.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 /* SplashScreenPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SplashScreenPlugin.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 /* SplashScreenPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashScreenPluginTests.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 /* SplashScreenPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SplashScreenPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* SplashScreenPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreenPlugin.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 = ( - 2F94DB23258B85BE003E0C43 /* SplashScreenConfig.swift */, - 2F94DB1F258B85A6003E0C43 /* SplashScreenSettings.swift */, - 50E1A94720377CB70090CE1A /* SplashScreenPlugin.swift */, - 2F98D68124C9AAE400613A4C /* SplashScreen.swift */, - 50ADFF8B201F53D600D50D53 /* SplashScreenPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* SplashScreenPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* SplashScreenPluginTests.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 /* SplashScreenPlugin.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 /* SplashScreenPlugin.swift in Sources */, - 2F94DB20258B85A6003E0C43 /* SplashScreenSettings.swift in Sources */, - 2F94DB24258B85BE003E0C43 /* SplashScreenConfig.swift in Sources */, - 2F98D68224C9AAE500613A4C /* SplashScreen.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* SplashScreenPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* SplashScreenPluginTests.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/splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/splash-screen/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/splash-screen/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/splash-screen/ios/Plugin.xcworkspace/contents.xcworkspacedata b/splash-screen/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/splash-screen/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/splash-screen/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/splash-screen/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/splash-screen/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/splash-screen/ios/Plugin/Info.plist b/splash-screen/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/splash-screen/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/splash-screen/ios/Plugin/SplashScreenPlugin.h b/splash-screen/ios/Plugin/SplashScreenPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/splash-screen/ios/Plugin/SplashScreenPlugin.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/splash-screen/ios/Plugin/SplashScreenPlugin.m b/splash-screen/ios/Plugin/SplashScreenPlugin.m deleted file mode 100644 index 01a7e8945..000000000 --- a/splash-screen/ios/Plugin/SplashScreenPlugin.m +++ /dev/null @@ -1,9 +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(SplashScreenPlugin, "SplashScreen", - CAP_PLUGIN_METHOD(show, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(hide, CAPPluginReturnPromise); -) diff --git a/splash-screen/ios/PluginTests/Info.plist b/splash-screen/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/splash-screen/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/splash-screen/ios/Podfile b/splash-screen/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/splash-screen/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/splash-screen/ios/Plugin/SplashScreen.swift b/splash-screen/ios/Sources/SplashScreenPlugin/SplashScreen.swift similarity index 100% rename from splash-screen/ios/Plugin/SplashScreen.swift rename to splash-screen/ios/Sources/SplashScreenPlugin/SplashScreen.swift diff --git a/splash-screen/ios/Plugin/SplashScreenConfig.swift b/splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenConfig.swift similarity index 100% rename from splash-screen/ios/Plugin/SplashScreenConfig.swift rename to splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenConfig.swift diff --git a/splash-screen/ios/Plugin/SplashScreenPlugin.swift b/splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenPlugin.swift similarity index 88% rename from splash-screen/ios/Plugin/SplashScreenPlugin.swift rename to splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenPlugin.swift index 8c0e31a69..24b11ffd5 100644 --- a/splash-screen/ios/Plugin/SplashScreenPlugin.swift +++ b/splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenPlugin.swift @@ -2,7 +2,13 @@ import Foundation import Capacitor @objc(SplashScreenPlugin) -public class SplashScreenPlugin: CAPPlugin { +public class SplashScreenPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "SplashScreenPlugin" + public let jsName = "SplashScreen" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "show", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "hide", returnType: CAPPluginReturnPromise), + ] private var splashScreen: SplashScreen? override public func load() { diff --git a/splash-screen/ios/Plugin/SplashScreenSettings.swift b/splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenSettings.swift similarity index 100% rename from splash-screen/ios/Plugin/SplashScreenSettings.swift rename to splash-screen/ios/Sources/SplashScreenPlugin/SplashScreenSettings.swift diff --git a/splash-screen/ios/PluginTests/SplashScreenPluginTests.swift b/splash-screen/ios/Tests/SplashScreenPluginTests/SplashScreenPluginTests.swift similarity index 91% rename from splash-screen/ios/PluginTests/SplashScreenPluginTests.swift rename to splash-screen/ios/Tests/SplashScreenPluginTests/SplashScreenPluginTests.swift index e40584a38..2e90286d3 100644 --- a/splash-screen/ios/PluginTests/SplashScreenPluginTests.swift +++ b/splash-screen/ios/Tests/SplashScreenPluginTests/SplashScreenPluginTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Plugin +@testable import SplashScreenPlugin class SplashScreenTests: XCTestCase { override func setUp() { diff --git a/splash-screen/package.json b/splash-screen/package.json index 07fbe3924..532bbf83c 100644 --- a/splash-screen/package.json +++ b/splash-screen/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorSplashScreen.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorSplashScreen -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", From 40e812e5e43167c94b0d473701ff7ecd0a596a3e Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Thu, 7 Dec 2023 15:16:26 -0500 Subject: [PATCH 10/11] chore(toast): Add SPM support to Toast (#1926) Co-authored-by: Joseph Pender --- toast/.gitignore | 7 + toast/CapacitorToast.podspec | 2 +- toast/Package.resolved | 14 + toast/Package.swift | 28 + toast/ios/Plugin.xcodeproj/project.pbxproj | 575 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Plugin.xcscheme | 77 --- .../xcschemes/PluginTests.xcscheme | 68 --- .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - toast/ios/Plugin/Info.plist | 24 - toast/ios/Plugin/ToastPlugin.h | 10 - toast/ios/Plugin/ToastPlugin.m | 8 - toast/ios/PluginTests/Info.plist | 22 - toast/ios/Podfile | 16 - .../ToastPlugin}/Toast.swift | 0 .../ToastPlugin}/ToastLabel.swift | 0 .../ToastPlugin}/ToastPlugin.swift | 7 +- .../ToastPluginTests}/ToastPluginTests.swift | 2 +- toast/package.json | 6 +- 21 files changed, 61 insertions(+), 838 deletions(-) create mode 100644 toast/Package.resolved create mode 100644 toast/Package.swift delete mode 100644 toast/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 toast/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 toast/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 toast/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 toast/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 toast/ios/Plugin/Info.plist delete mode 100644 toast/ios/Plugin/ToastPlugin.h delete mode 100644 toast/ios/Plugin/ToastPlugin.m delete mode 100644 toast/ios/PluginTests/Info.plist delete mode 100644 toast/ios/Podfile rename toast/ios/{Plugin => Sources/ToastPlugin}/Toast.swift (100%) rename toast/ios/{Plugin => Sources/ToastPlugin}/ToastLabel.swift (100%) rename toast/ios/{Plugin => Sources/ToastPlugin}/ToastPlugin.swift (73%) rename toast/ios/{PluginTests => Tests/ToastPluginTests}/ToastPluginTests.swift (93%) diff --git a/toast/.gitignore b/toast/.gitignore index 70ccbf713..ff42b3f48 100644 --- a/toast/.gitignore +++ b/toast/.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/toast/CapacitorToast.podspec b/toast/CapacitorToast.podspec index b4c023d5c..99e25e8cf 100644 --- a/toast/CapacitorToast.podspec +++ b/toast/CapacitorToast.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}', 'toast/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'toast/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/toast/Package.resolved b/toast/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/toast/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/toast/Package.swift b/toast/Package.swift new file mode 100644 index 000000000..873a1bbbb --- /dev/null +++ b/toast/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorToast", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "ToastPlugin", + targets: ["ToastPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "ToastPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/ToastPlugin"), + .testTarget( + name: "ToastPluginTests", + dependencies: ["ToastPlugin"], + path: "ios/Tests/ToastPluginTests") + ] +) \ No newline at end of file diff --git a/toast/ios/Plugin.xcodeproj/project.pbxproj b/toast/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index b5e8554e4..000000000 --- a/toast/ios/Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,575 +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 */; }; - 2F951D50251CEED200428B5D /* ToastLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F951D4F251CEED200428B5D /* ToastLabel.swift */; }; - 2F98D68224C9AAE500613A4C /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98D68124C9AAE400613A4C /* Toast.swift */; }; - 50ADFF92201F53D600D50D53 /* Plugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFF88201F53D600D50D53 /* Plugin.framework */; }; - 50ADFF97201F53D600D50D53 /* ToastPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* ToastPluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* ToastPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* ToastPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* ToastPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* ToastPlugin.m */; }; - 50E1A94820377CB70090CE1A /* ToastPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* ToastPlugin.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 */ - 2F951D4F251CEED200428B5D /* ToastLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastLabel.swift; sourceTree = ""; }; - 2F98D68124C9AAE400613A4C /* Toast.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Toast.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 /* ToastPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToastPlugin.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 /* ToastPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastPluginTests.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 /* ToastPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToastPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* ToastPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToastPlugin.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 /* ToastPlugin.swift */, - 2F98D68124C9AAE400613A4C /* Toast.swift */, - 50ADFF8B201F53D600D50D53 /* ToastPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* ToastPlugin.m */, - 50ADFF8C201F53D600D50D53 /* Info.plist */, - 2F951D4F251CEED200428B5D /* ToastLabel.swift */, - ); - path = Plugin; - sourceTree = ""; - }; - 50ADFF95201F53D600D50D53 /* PluginTests */ = { - isa = PBXGroup; - children = ( - 50ADFF96201F53D600D50D53 /* ToastPluginTests.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 /* ToastPlugin.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 /* ToastPlugin.swift in Sources */, - 2F98D68224C9AAE500613A4C /* Toast.swift in Sources */, - 2F951D50251CEED200428B5D /* ToastLabel.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* ToastPlugin.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 50ADFF8D201F53D600D50D53 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50ADFF97201F53D600D50D53 /* ToastPluginTests.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/toast/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/toast/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/toast/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/toast/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/toast/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/toast/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/toast/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/toast/ios/Plugin.xcworkspace/contents.xcworkspacedata b/toast/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/toast/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/toast/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/toast/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/toast/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/toast/ios/Plugin/Info.plist b/toast/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/toast/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/toast/ios/Plugin/ToastPlugin.h b/toast/ios/Plugin/ToastPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/toast/ios/Plugin/ToastPlugin.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/toast/ios/Plugin/ToastPlugin.m b/toast/ios/Plugin/ToastPlugin.m deleted file mode 100644 index 977c87bda..000000000 --- a/toast/ios/Plugin/ToastPlugin.m +++ /dev/null @@ -1,8 +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(ToastPlugin, "Toast", - CAP_PLUGIN_METHOD(show, CAPPluginReturnPromise); -) diff --git a/toast/ios/PluginTests/Info.plist b/toast/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/toast/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/toast/ios/Podfile b/toast/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/toast/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/toast/ios/Plugin/Toast.swift b/toast/ios/Sources/ToastPlugin/Toast.swift similarity index 100% rename from toast/ios/Plugin/Toast.swift rename to toast/ios/Sources/ToastPlugin/Toast.swift diff --git a/toast/ios/Plugin/ToastLabel.swift b/toast/ios/Sources/ToastPlugin/ToastLabel.swift similarity index 100% rename from toast/ios/Plugin/ToastLabel.swift rename to toast/ios/Sources/ToastPlugin/ToastLabel.swift diff --git a/toast/ios/Plugin/ToastPlugin.swift b/toast/ios/Sources/ToastPlugin/ToastPlugin.swift similarity index 73% rename from toast/ios/Plugin/ToastPlugin.swift rename to toast/ios/Sources/ToastPlugin/ToastPlugin.swift index bf20d1496..8829192e8 100644 --- a/toast/ios/Plugin/ToastPlugin.swift +++ b/toast/ios/Sources/ToastPlugin/ToastPlugin.swift @@ -2,7 +2,12 @@ import Foundation import Capacitor @objc(ToastPlugin) -public class ToastPlugin: CAPPlugin { +public class ToastPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "ToastPlugin" + public let jsName = "Toast" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "show", returnType: CAPPluginReturnPromise), + ] @objc func show(_ call: CAPPluginCall) { guard let text = call.getString("text") else { diff --git a/toast/ios/PluginTests/ToastPluginTests.swift b/toast/ios/Tests/ToastPluginTests/ToastPluginTests.swift similarity index 93% rename from toast/ios/PluginTests/ToastPluginTests.swift rename to toast/ios/Tests/ToastPluginTests/ToastPluginTests.swift index 7d10b8aa4..70bf2dd5a 100644 --- a/toast/ios/PluginTests/ToastPluginTests.swift +++ b/toast/ios/Tests/ToastPluginTests/ToastPluginTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Plugin +@testable import ToastPlugin class ToastTests: XCTestCase { override func setUp() { diff --git a/toast/package.json b/toast/package.json index 2d6b1d6ba..defe6d71e 100644 --- a/toast/package.json +++ b/toast/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources", + "ios/Tests", + "Package.swift", "CapacitorToast.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorToast -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", From 2836f8e73e4f000ec72eefdbd930aeb441e97bfd Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Thu, 7 Dec 2023 15:29:06 -0500 Subject: [PATCH 11/11] chore(screen-reader): Add SPM to screen-reader (#1936) --- screen-reader/.gitignore | 9 +- screen-reader/CapacitorScreenReader.podspec | 2 +- screen-reader/Package.resolved | 14 + screen-reader/Package.swift | 28 + .../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 - screen-reader/ios/Plugin/Info.plist | 24 - screen-reader/ios/Plugin/ScreenReaderPlugin.h | 10 - screen-reader/ios/Plugin/ScreenReaderPlugin.m | 9 - screen-reader/ios/PluginTests/Info.plist | 22 - screen-reader/ios/Podfile | 16 - .../ScreenReaderPlugin.swift | 8 +- .../PluginTests.swift | 2 +- screen-reader/package.json | 6 +- 19 files changed, 62 insertions(+), 833 deletions(-) create mode 100644 screen-reader/Package.resolved create mode 100644 screen-reader/Package.swift delete mode 100644 screen-reader/ios/Plugin.xcodeproj/project.pbxproj delete mode 100644 screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme delete mode 100644 screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme delete mode 100644 screen-reader/ios/Plugin.xcworkspace/contents.xcworkspacedata delete mode 100644 screen-reader/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 screen-reader/ios/Plugin/Info.plist delete mode 100644 screen-reader/ios/Plugin/ScreenReaderPlugin.h delete mode 100644 screen-reader/ios/Plugin/ScreenReaderPlugin.m delete mode 100644 screen-reader/ios/PluginTests/Info.plist delete mode 100644 screen-reader/ios/Podfile rename screen-reader/ios/{Plugin => Sources/ScreenReaderPlugin}/ScreenReaderPlugin.swift (79%) rename screen-reader/ios/{PluginTests => Tests/ScreenReaderPluginTests}/PluginTests.swift (91%) diff --git a/screen-reader/.gitignore b/screen-reader/.gitignore index 70ccbf713..4da8a828b 100644 --- a/screen-reader/.gitignore +++ b/screen-reader/.gitignore @@ -7,12 +7,17 @@ Pods Podfile.lock Build xcuserdata +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc # macOS files .DS_Store - - # Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore # Built application files diff --git a/screen-reader/CapacitorScreenReader.podspec b/screen-reader/CapacitorScreenReader.podspec index b70c3a1e3..f56442cf2 100644 --- a/screen-reader/CapacitorScreenReader.podspec +++ b/screen-reader/CapacitorScreenReader.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}', 'screen-reader/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'screen-reader/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/screen-reader/Package.resolved b/screen-reader/Package.resolved new file mode 100644 index 000000000..47ee506b5 --- /dev/null +++ b/screen-reader/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" : "cf4ff2bc1dffb14adc27b1e5a09ac37e85424b99" + } + } + ], + "version" : 2 +} diff --git a/screen-reader/Package.swift b/screen-reader/Package.swift new file mode 100644 index 000000000..1934433c1 --- /dev/null +++ b/screen-reader/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "CapacitorScreenReader", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "ScreenReaderPlugin", + targets: ["ScreenReaderPlugin"]) + ], + dependencies: [ + .package(url: "https://github.com/ionic-team/capacitor6-spm-test.git", branch: "main") + ], + targets: [ + .target( + name: "ScreenReaderPlugin", + dependencies: [ + .product(name: "Capacitor", package: "capacitor6-spm-test"), + .product(name: "Cordova", package: "capacitor6-spm-test") + ], + path: "ios/Sources/ScreenReaderPlugin"), + .testTarget( + name: "ScreenReaderPluginTests", + dependencies: ["ScreenReaderPlugin"], + path: "ios/Tests/ScreenReaderPluginTests") + ] +) \ No newline at end of file diff --git a/screen-reader/ios/Plugin.xcodeproj/project.pbxproj b/screen-reader/ios/Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index e6fbaaabf..000000000 --- a/screen-reader/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 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFF96201F53D600D50D53 /* PluginTests.swift */; }; - 50ADFF99201F53D600D50D53 /* ScreenReaderPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ADFF8B201F53D600D50D53 /* ScreenReaderPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50ADFFA42020D75100D50D53 /* Capacitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50ADFFA52020D75100D50D53 /* Capacitor.framework */; }; - 50ADFFA82020EE4F00D50D53 /* ScreenReaderPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ADFFA72020EE4F00D50D53 /* ScreenReaderPlugin.m */; }; - 50E1A94820377CB70090CE1A /* ScreenReaderPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1A94720377CB70090CE1A /* ScreenReaderPlugin.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 /* ScreenReaderPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScreenReaderPlugin.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 /* ScreenReaderPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ScreenReaderPlugin.m; sourceTree = ""; }; - 50E1A94720377CB70090CE1A /* ScreenReaderPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScreenReaderPlugin.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 /* ScreenReaderPlugin.swift */, - 50ADFF8B201F53D600D50D53 /* ScreenReaderPlugin.h */, - 50ADFFA72020EE4F00D50D53 /* ScreenReaderPlugin.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 /* ScreenReaderPlugin.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 /* ScreenReaderPlugin.swift in Sources */, - 50ADFFA82020EE4F00D50D53 /* ScreenReaderPlugin.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/screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/screen-reader/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme b/screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme deleted file mode 100644 index 303f2621b..000000000 --- a/screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme b/screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme deleted file mode 100644 index 3d8c88d25..000000000 --- a/screen-reader/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/screen-reader/ios/Plugin.xcworkspace/contents.xcworkspacedata b/screen-reader/ios/Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index afad624ec..000000000 --- a/screen-reader/ios/Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/screen-reader/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/screen-reader/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/screen-reader/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/screen-reader/ios/Plugin/Info.plist b/screen-reader/ios/Plugin/Info.plist deleted file mode 100644 index 1007fd9dd..000000000 --- a/screen-reader/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/screen-reader/ios/Plugin/ScreenReaderPlugin.h b/screen-reader/ios/Plugin/ScreenReaderPlugin.h deleted file mode 100644 index f2bd9e0bb..000000000 --- a/screen-reader/ios/Plugin/ScreenReaderPlugin.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/screen-reader/ios/Plugin/ScreenReaderPlugin.m b/screen-reader/ios/Plugin/ScreenReaderPlugin.m deleted file mode 100644 index 660caa65c..000000000 --- a/screen-reader/ios/Plugin/ScreenReaderPlugin.m +++ /dev/null @@ -1,9 +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(ScreenReaderPlugin, "ScreenReader", - CAP_PLUGIN_METHOD(speak, CAPPluginReturnPromise); - CAP_PLUGIN_METHOD(isEnabled, CAPPluginReturnPromise); -) diff --git a/screen-reader/ios/PluginTests/Info.plist b/screen-reader/ios/PluginTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/screen-reader/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/screen-reader/ios/Podfile b/screen-reader/ios/Podfile deleted file mode 100644 index 349449001..000000000 --- a/screen-reader/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/screen-reader/ios/Plugin/ScreenReaderPlugin.swift b/screen-reader/ios/Sources/ScreenReaderPlugin/ScreenReaderPlugin.swift similarity index 79% rename from screen-reader/ios/Plugin/ScreenReaderPlugin.swift rename to screen-reader/ios/Sources/ScreenReaderPlugin/ScreenReaderPlugin.swift index e57b04710..174c93e2b 100644 --- a/screen-reader/ios/Plugin/ScreenReaderPlugin.swift +++ b/screen-reader/ios/Sources/ScreenReaderPlugin/ScreenReaderPlugin.swift @@ -2,7 +2,13 @@ import Foundation import Capacitor @objc(ScreenReaderPlugin) -public class ScreenReaderPlugin: CAPPlugin { +public class ScreenReaderPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "ScreenReaderPlugin" + public let jsName = "ScreenReader" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "speak", returnType: CAPPluginReturnPromise), + CAPPluginMethod(name: "isEnabled", returnType: CAPPluginReturnPromise), + ] static let stateChangeEvent = "stateChange" override public func load() { diff --git a/screen-reader/ios/PluginTests/PluginTests.swift b/screen-reader/ios/Tests/ScreenReaderPluginTests/PluginTests.swift similarity index 91% rename from screen-reader/ios/PluginTests/PluginTests.swift rename to screen-reader/ios/Tests/ScreenReaderPluginTests/PluginTests.swift index 84183f9bc..db496b775 100644 --- a/screen-reader/ios/PluginTests/PluginTests.swift +++ b/screen-reader/ios/Tests/ScreenReaderPluginTests/PluginTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Plugin +@testable import ScreenReaderPlugin class ScreenReaderTests: XCTestCase { diff --git a/screen-reader/package.json b/screen-reader/package.json index 1741b4b51..d3b92e488 100644 --- a/screen-reader/package.json +++ b/screen-reader/package.json @@ -10,7 +10,9 @@ "android/src/main/", "android/build.gradle", "dist/", - "ios/Plugin/", + "ios/Sources/", + "ios/Tests", + "Package.swift", "CapacitorScreenReader.podspec" ], "author": "Ionic ", @@ -29,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 CapacitorScreenReader -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",