I would like to use an external library named SwiftSocket in my own iOS Capacitor plugin:
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