gpt4 book ai didi

ios - 在Flutter中安装 native iOS Pod

转载 作者:行者123 更新时间:2023-12-01 15:28:36 28 4
gpt4 key购买 nike

使用Pod在iOS端制作flutter插件时遇到错误。 Pod安装成功,然后我也可以将其导入文件中。
在我要使用的情况下, pod 是Freshchat iOS SDK
我遵循的安装 pods 的步骤

  • 启动一个新的Flutter插件项目。
  • .podspec文件中添加s.dependency 'FreshchatSDK'
  • pod install文件夹中运行example/ios
    我有一个错误The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/nimish/FlutterProjects/freshchat_flutter/freshchat_flutter/example/ios/Pods/FreshchatSDK/FreshchatSDK/libFDFreshchatSDK.a)
  • 我在this comment之后从use_frameworks!中删除了podfile
  • 我再次运行pod install并成功安装了Pod,并创建了Pods文件夹,其中包含FreshchatSDK文件夹。

  • 现在,我需要在项目中添加use_frameworks!,因为其他插件因此无法编译。
  • 我在s.static_framework = true中添加了.podspec,在use_frameworks!中添加了podfile。现在pod install成功运行了,
  • 在我的#import "FreshchatSDK.h"文件中添加了导入的Plugin.h之后,出现了错误error: include of non-modular header inside framework module

  • 我尝试了 this answer,但无法解决。
    请帮我解决这个问题。我会尊重你的时间的。
    还有另一个flutter插件 here可用,但是它有很多问题,一个 Unresolved 情况是导致我的iOS应用崩溃,所以我想自己做。

    最佳答案

    由于目标不匹配,PodFile中可能存在问题。
    当这发生在我身上时,我使用了这些简单的步骤。

  • 删除Podfile
  • 特定文件
  • 中的Open Terminal
  • Pod init
  • 打开Podfile并添加依赖项
  • Pod install
  • 关于ios - 在Flutter中安装 native iOS Pod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61225475/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com