Skip to content

Commit c0f423b

Browse files
feat(ios): SPM iOS support (#98)
Co-authored-by: OS-pedrogustavobilro <[email protected]>
1 parent e4ea913 commit c0f423b

30 files changed

+97
-945
lines changed

plugin/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,12 @@ captures
6060
# External native build folder generated in Android Studio 2.2 and later
6161
.externalNativeBuild
6262
*.tgz
63+
64+
/Packages
65+
xcuserdata/
66+
DerivedData/
67+
.swiftpm/configuration/registries.json
68+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
69+
.netrc
70+
Package.resolved
71+
/.build

plugin/CapacitorGoogleMaps.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Pod::Spec.new do |s|
77
s.version = package['version']
88
s.summary = package['description']
99
s.license = package['license']
10-
s.homepage = 'https://capacitorjs.com'
10+
s.homepage = package['repository']['url']
1111
s.author = package['author']
12-
s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] }
13-
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'google-maps/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
12+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
1414
s.ios.deployment_target = '14.0'
1515
s.dependency 'Capacitor'
1616
s.dependency 'GoogleMaps', '~> 8.4'

plugin/Package.swift

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "CapacitorGoogleMaps",
6+
platforms: [.iOS(.v14)],
7+
products: [
8+
.library(
9+
name: "CapacitorGoogleMaps",
10+
targets: ["CapacitorGoogleMapsPlugin"])
11+
],
12+
dependencies: [
13+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"),
14+
.package(url: "https://github.com/googlemaps/ios-maps-sdk.git", .upToNextMajor(from:"8.4.0")),
15+
.package(url: "https://github.com/googlemaps/google-maps-ios-utils.git", .upToNextMajor(from:"5.0.0"))
16+
],
17+
targets: [
18+
.target(
19+
name: "CapacitorGoogleMapsPlugin",
20+
dependencies: [
21+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
22+
.product(name: "Cordova", package: "capacitor-swift-pm"),
23+
.product(name: "GoogleMaps", package: "ios-maps-sdk"),
24+
.product(name: "GoogleMapsUtils", package: "google-maps-ios-utils")
25+
],
26+
path: "ios/Sources/CapacitorGoogleMapsPlugin"),
27+
.testTarget(
28+
name: "CapacitorGoogleMapsPluginTests",
29+
dependencies: ["CapacitorGoogleMapsPlugin"],
30+
path: "ios/Tests/CapacitorGoogleMapsPluginTests")
31+
]
32+
)

plugin/ios/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
/Packages
3+
xcuserdata/
4+
DerivedData/
5+
.swiftpm/configuration/registries.json
6+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
7+
.netrc
8+
.DS_Store
9+
.build

plugin/ios/Plugin.xcodeproj/project.pbxproj

Lines changed: 0 additions & 643 deletions
This file was deleted.

plugin/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 7 deletions
This file was deleted.

plugin/ios/Plugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

Lines changed: 0 additions & 8 deletions
This file was deleted.

plugin/ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme

Lines changed: 0 additions & 77 deletions
This file was deleted.

plugin/ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme

Lines changed: 0 additions & 68 deletions
This file was deleted.

plugin/ios/Plugin.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)