Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ node_modules
# iOS files
Pods
Podfile.lock
Package.resolved
Build
xcuserdata
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

# macOS files
.DS_Store
Expand Down
4 changes: 2 additions & 2 deletions CapacitorCommunityGoogleMaps.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
s.homepage = package['repository']['url']
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '13.0'
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '14.0'
s.dependency 'Capacitor'
s.dependency 'GoogleMaps'
s.dependency 'SDWebImage'
Expand Down
31 changes: 31 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
name: "CapacitorCommunityGoogleMaps",
platforms: [.iOS(.v14)],
products: [
.library(
name: "CapacitorCommunityGoogleMaps",
targets: ["CapacitorGoogleMaps"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "6.0.0"),
.package(url: "https://github.com/googlemaps/ios-maps-sdk.git", exact: "8.3.1"),
.package(url: "https://github.com/SDWebImage/SDWebImage.git", exact: "5.14.3")
],
targets: [
.target(
name: "CapacitorGoogleMaps",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm"),
.product(name: "GoogleMaps", package: "ios-maps-sdk"),
.product(name: "GoogleMapsBase", package: "ios-maps-sdk"),
.product(name: "GoogleMapsCore", package: "ios-maps-sdk"),
.product(name: "SDWebImage", package: "SDWebImage")
],
path: "ios/Sources"
)
]
)
641 changes: 0 additions & 641 deletions ios/Plugin.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions ios/Plugin.xcworkspace/contents.xcworkspacedata

This file was deleted.

8 changes: 0 additions & 8 deletions ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

This file was deleted.

24 changes: 0 additions & 24 deletions ios/Plugin/Info.plist

This file was deleted.

10 changes: 0 additions & 10 deletions ios/Plugin/Plugin.h

This file was deleted.

32 changes: 0 additions & 32 deletions ios/Plugin/Plugin.m

This file was deleted.

22 changes: 0 additions & 22 deletions ios/PluginTests/Info.plist

This file was deleted.

19 changes: 0 additions & 19 deletions ios/Podfile

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 30 additions & 1 deletion ios/Plugin/Plugin.swift → ios/Sources/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,36 @@ import Capacitor
import GoogleMaps

@objc(CapacitorGoogleMaps)
public class CapacitorGoogleMaps: CustomMapViewEvents {
public class CapacitorGoogleMaps: CustomMapViewEvents, CAPBridgedPlugin {
public let identifier = "CapacitorGoogleMaps"
public let jsName = "CapacitorGoogleMaps"
public let pluginMethods: [CAPPluginMethod] = [
CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "createMap", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "updateMap", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "clearMap", returnType: CAPPluginReturnNone),
CAPPluginMethod(name: "removeMap", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "moveCamera", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "addMarker", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "addMarkers", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "removeMarker", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "addPolygon", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "removePolygon", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "didTapInfoWindow", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didCloseInfoWindow", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didTapMap", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didLongPressMap", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didTapMarker", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didBeginDraggingMarker", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didDragMarker", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didEndDraggingMarker", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didTapMyLocationButton", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didTapMyLocationDot", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didTapPoi", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didBeginMovingCamera", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didMoveCamera", returnType: CAPPluginReturnCallback),
CAPPluginMethod(name: "didEndMovingCamera", returnType: CAPPluginReturnCallback)
]

var GOOGLE_MAPS_KEY: String = "";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import QuartzCore

extension CALayer {
func pixelColorAtPoint(point:CGPoint) -> Bool {
var pixel: [UInt8] = [0, 0, 0, 0]
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"dist/",
"ios/",
"android/",
"CapacitorCommunityGoogleMaps.podspec"
"CapacitorCommunityGoogleMaps.podspec",
"Package.swift"
],
"keywords": [
"capacitor",
Expand Down