自定义电容器插件因 pod 依赖性而失败
Custom capacitor plugin fails with pod dependency
我正在基于
编写自己的电容器插件
https://capacitorjs.com/docs/ios/custom-code
https://devdactic.com/build-capacitor-plugin/
但使用
将其添加到我的主项目中
npm install ../MyPlugin
失败
npx cap sync
和
✖ Updating iOS native dependencies with "pod install" (may take several minutes):
✖ update ios:
[error] Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "MyPlugin":
In Podfile:
MyPlugin (from `../../../my-plugin`)
Specs satisfying the `MyPlugin (from `../../../my-plugin`)` dependency were found, but they required a higher minimum deployment target.
我尝试调整所需的 podfile ios 版本,如
`Firebase/Auth` dependency were found, but they required a higher minimum deployment target
到11要配合我的主项目
platform :ios, '11.0'
def capacitor_pods
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios'
end
target 'Plugin' do
capacitor_pods
end
target 'PluginTests' do
capacitor_pods
end
但错误仍然存在。我应该去哪里寻找它?
谢谢
我正在基于
编写自己的电容器插件https://capacitorjs.com/docs/ios/custom-code https://devdactic.com/build-capacitor-plugin/
但使用
将其添加到我的主项目中npm install ../MyPlugin
失败
npx cap sync
和
✖ Updating iOS native dependencies with "pod install" (may take several minutes):
✖ update ios:
[error] Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "MyPlugin":
In Podfile:
MyPlugin (from `../../../my-plugin`)
Specs satisfying the `MyPlugin (from `../../../my-plugin`)` dependency were found, but they required a higher minimum deployment target.
我尝试调整所需的 podfile ios 版本,如 `Firebase/Auth` dependency were found, but they required a higher minimum deployment target
到11要配合我的主项目
platform :ios, '11.0'
def capacitor_pods
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios'
end
target 'Plugin' do
capacitor_pods
end
target 'PluginTests' do
capacitor_pods
end
但错误仍然存在。我应该去哪里寻找它? 谢谢