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
15 changes: 15 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 Expand Up @@ -60,6 +68,13 @@ captures
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# VSCode
.vscode/settings.json

#local secrets
.env

# Locally published versions
capacitor-community-contacts-*.tgz

CLAUDE.md
2 changes: 1 addition & 1 deletion CapacitorCommunityContacts.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '14.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
Expand Down
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
name: "CapacitorCommunityContacts",
platforms: [.iOS(.v14)],
products: [
.library(
name: "CapacitorCommunityContacts",
targets: ["ContactsPlugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
],
targets: [
.target(
name: "ContactsPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm")
],
path: "ios/Sources/ContactsPlugin"),
.testTarget(
name: "ContactsPluginTests",
dependencies: ["ContactsPlugin"],
path: "ios/Tests/ContactsPluginTests")
]
)
8 changes: 8 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
587 changes: 0 additions & 587 deletions ios/Plugin.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

77 changes: 0 additions & 77 deletions ios/Plugin.xcodeproj/xcshareddata/xcschemes/Plugin.xcscheme

This file was deleted.

68 changes: 0 additions & 68 deletions ios/Plugin.xcodeproj/xcshareddata/xcschemes/PluginTests.xcscheme

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.

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

This file was deleted.

14 changes: 0 additions & 14 deletions ios/Plugin/ContactsPlugin.m

This file was deleted.

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

This file was deleted.

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

This file was deleted.

16 changes: 0 additions & 16 deletions ios/Podfile

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ enum CallingMethod {
}

@objc(ContactsPlugin)
public class ContactsPlugin: CAPPlugin, CNContactPickerDelegate {
public class ContactsPlugin: CAPPlugin, CAPBridgedPlugin, CNContactPickerDelegate {
public let identifier = "ContactsPlugin"
public let jsName = "Contacts"
public let pluginMethods: [CAPPluginMethod] = [
CAPPluginMethod(name: "checkPermissions", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "requestPermissions", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "getContact", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "getContacts", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "createContact", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "deleteContact", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "pickContact", returnType: CAPPluginReturnPromise)
]

private let implementation = Contacts()

private var callingMethod: CallingMethod?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import XCTest
@testable import Plugin
@testable import ContactsPlugin

class ContactsTests: XCTestCase {

func testEcho() {
// This is an example of a functional test case for a plugin.
// Use XCTAssert and related functions to verify your tests produce the correct results.
Expand Down
Loading