Skip to content

Not able to install the module in Capacitor Plugin. #168

@surajsingla333

Description

@surajsingla333

Hey @mnive93, I am building a custom capacitor plugin for HyperVerse and I am trying to install HyperKYC from podfile.

When I install the pods and sync ios capacitor app at that time everything works well. I can also see HyperKYC installed in Pods within Xcode (check below)

Image

But when I open the .swift file where I have imported HyperKYC, it gives me error saying No such module

Image

I am using this doc to create the plugin and have also imported HyperKYC as explained in the last section of the same doc.

This is how my final Podfile looks

require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '14.0'
use_frameworks! :linkage => :static

# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
  pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
  pod 'CapacitorHypervergeKyc', :path => '../../capacitor-hyperverge-kyc'
  pod 'CapacitorPluginSafeArea', :path => '../../node_modules/capacitor-plugin-safe-area'
  pod 'CapacitorSecureStoragePlugin', :path => '../../node_modules/capacitor-secure-storage-plugin'
end

target 'App' do
  capacitor_pods
  # Add your Pods here
end

post_install do |installer|
  assertDeploymentTarget(installer)
end

This podfile is in my /ios folder in capacitor app.

In my custom plugin (CapacitorHypervergeKyc), I have a file CapacitorHypervergeKyc.podspec that looks like

require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
  s.name = 'CapacitorHypervergeKyc'
  s.version = package['version']
  s.summary = package['description']
  s.license = package['license']
  s.homepage = package['repository']['url']
  s.author = package['author']
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
  s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
  s.ios.deployment_target = '14.0'
  s.dependency 'Capacitor'
  s.dependency 'HyperKYC'
  s.swift_version = '5.1'
end

All I want is to install HyperKYC in my custom plugin. Any help on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions