Closed Droppix closed 4 months ago
@Droppix Thanks for reaching out! Basically, the error indicates that the plugin was not installed correctly. May I know how you install and run CocoaPods with the plugin?
If you're using bundler (ie. having Gemfile in the project), then make sure:
gem "cocoapods-spm"
is added to Gemfilebundle exec pod install
instead of pod install
Thanks for your response.
Indeed, I had an old version of ruby (2.6.6) installed, the update to ruby 3.3.0 works well!
I tried to integrate the NearbyConnections SPM (google: https://github.com/google/nearby.git) which depends on "NearByCoreAdapter" (integrated in the NearbyConnections project), and I get the error: Missing required module 'NearbyCoreAdapter'.
Whereas if I integrate the NearbyConnections SPM directly (excluding Cocoapods), it works fine.
If you have a suggestion, I'd love to hear it...
plugin "cocoapods-spm"
def capacitor_pods
use_frameworks!
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios'
end
target 'Plugin' do
capacitor_pods
spm_pkg "NearbyConnections", :git => "https://github.com/google/nearby.git", :branch => "main"
end
target 'PluginTests' do
capacitor_pods
end
Let me take a further look for this case.
@Droppix I would suggest closing the current one and creating a follow-up issue (related to NearbyCoreAdapter), to keep it relevant. Is it ok?
Created https://github.com/trinhngocthuyen/cocoapods-spm/issues/39 for reference.
What happened?
I installed: 'gem install cocoapods-spm' but spm_pkg undefined.
[!] Invalid.
Podfile
file: undefined method `spm_pkg' for #CocoaPods environment
No response
Anything else?
No response