颤振:无法从ios应用程序中删除自定义插件

颤振:无法从ios应用程序中删除自定义插件,ios,iphone,flutter,Ios,Iphone,Flutter,我为windows编写了一个定制的颤振插件,到目前为止效果很好。 然而,出于某种原因,当我试图在iphone模拟器上运行该插件时,Flatter一直在ios构建中包含该插件。这会导致错误,因为插件没有ios实现。 在Android上,一切正常 以下是插件pubspec.yaml: name: fbfunctions description: A new flutter plugin project. environment: sdk: ">=2.7.0 <3.0.0" fl

我为windows编写了一个定制的颤振插件,到目前为止效果很好。 然而,出于某种原因,当我试图在iphone模拟器上运行该插件时,Flatter一直在ios构建中包含该插件。这会导致错误,因为插件没有ios实现。 在Android上,一切正常

以下是插件pubspec.yaml:

name: fbfunctions
description: A new flutter plugin project.

environment:
  sdk: ">=2.7.0 <3.0.0"
  flutter: ">=1.10.0"

dependencies:
  flutter:
    sdk: flutter

flutter:
  plugin:
    platforms:
      windows:
        pluginClass: FbfunctionsPlugin
name:fbfunctions
描述:一个新的颤振插件项目。
环境:
sdk:“>=2.7.0=1.10.0”
依赖项:
颤振:
sdk:颤振
颤振:
插件:
平台:
窗户:
插件类:FbfunctionsPlugin
下面是我尝试在ios模拟器上运行时遇到的错误:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...                                              2.5s
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (`arm64`)

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
    -> Fetching podspec for `cloud_firestore_web` from `.symlinks/plugins/cloud_firestore_web/ios`
    -> Fetching podspec for `cloud_functions` from `.symlinks/plugins/cloud_functions/ios`
    -> Fetching podspec for `cloud_functions_web` from `.symlinks/plugins/cloud_functions_web/ios`
    -> Fetching podspec for `fbfunctions` from `.symlinks/plugins/fbfunctions/ios`
    [!] No podspec found for `fbfunctions` in `.symlinks/plugins/fbfunctions/ios`

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:980:in `fetch_external_source'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:959:in `block (2 levels) in fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:958:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:958:in `block in fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:957:in `fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳

    [!] Automatically assigning platform `iOS` with version `10.1` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 11 Pro Max.
在调试模式下在iPhone 11 Pro Max上启动lib/main.dart。。。
正在运行pod安装。。。2.5秒
椰子荚的产量:
↳
准备
分析依赖关系
检查目标以整合
使用'ARCHS'设置构建目标'Pods Runner'的体系结构:('arm64`)
获取外部源
->从“颤振”获取“颤振”的podspec`
->正在从“.symlinks/plugins/cloud\u firestore/ios”获取“cloud\u firestore”的podspec`
->正在从“.symlinks/plugins/cloud\u firestore\u web/ios”获取“cloud\u firestore\u web”的podspec`
->正在从“.symlinks/plugins/cloud\u functions/ios”获取“cloud\u functions”的podspec`
->正在从“.symlinks/plugins/cloud\u functions\u web/ios”获取“cloud\u functions\u web”的podspec`
->正在从“.symlinks/plugins/fbfunctions/ios”获取“fbfunctions”的podspec`
[!]在“.symlinks/plugins/fbfunctions/ios”中找不到“fbfunctions”的podspec`
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/external_sources/path_source.rb:14:in'block in fetch'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in“section”
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/external_sources/path_source.rb:11:in'fetch'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:980:in'fetch_external_source'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:959:fetch\u external\u sources中的“块(2级)”中
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:958:in'each'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:958:in'block in fetch\u external\u sources'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in“section”
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:957:in'fetch_external_sources'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:117:in'analyze'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in'analyze'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:“解析依赖项中的块”中
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in“section”
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in'resolve_dependencies'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156:in'install!'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in'run'
/Library/Ruby/Gems/2.6.0/Gems/claide-1.0.3/lib/claide/command.rb:334:in'run'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in'run'
/Library/Ruby/Gems/2.6.0/Gems/cocoapods-1.9.1/bin/pod:55:in`'
/usr/local/bin/pod:23:in“装载”
/usr/local/bin/pod:23:in`'
CoCoapod的错误输出:
↳
[!]在目标“Runner”上自动分配版本为“10.1”的平台“iOS”,因为未指定平台。请在播客文件中为此目标指定一个平台。看`https://guides.cocoapods.org/syntax/podfile.html#platform`.
运行pod安装时出错
在iPhone 11 Pro Max上启动应用程序时出错。
如何防止Flatter尝试在ios构建中包含插件?

你不能;目前。在解决这个问题之前,解决方法是包括一个虚拟的
ios/your\u plugin\u name.podspec
,如中所示

除了podspec,您不需要文件夹中的任何内容,一旦问题得到解决,您可以将其删除