Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70900

How to integrate a pod library in an iOS Capacitor Plugin?

$
0
0

I would like to use an external library named SwiftSocket in my own iOS Capacitor plugin:

enter image description here

In the Podfile, I have:

require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
platform :ios, '13.0'
use_frameworks!
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
...
  pod 'CapacitorGoodipClient', :path => '../../../client-capacitor'
end

target 'App' do
  capacitor_pods
  pod 'SwiftSocket', :git => 'https://github.com/swiftsocket/SwiftSocket.git', :branch => 'master'
end

post_install do |installer|
  assertDeploymentTarget(installer)
end

When I compile, I receive the error “No such module ‘SwiftSocket’”. What am I doing wrong? I have done “ionic cap sync ios”, “pod deintegrate”, “pod install”, “pod update”.

I see the pod library in the project as shown in the screenshot above.

If you prefer, my question could be formulated in a more generic way: What is the process to integrate a third-party library in a Capacitor plugin for the iOS platform?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70900

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>