nim*_*112 7 ios cocoapods flutter flutter-dependencies flutter-plugin
我在使用 pod 时在 iOS 端制作颤振插件时遇到错误。Pod 安装成功,然后我也可以将它们导入到文件中。
我尝试使用的 pod 是Freshchat iOS SDK
我遵循的步骤来安装 pod
启动一个新的 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)
我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
我尝试了这个答案,但无法解决它。
请帮我解决这个问题。我会尊重你的时间。
这里还有另一个 flutter 插件可用,但它有很多问题,一个未处理的案例使我的 iOS 应用程序崩溃,所以我想自己制作它。
小智 1
由于 Targets 不匹配,PodFile 可能会出现问题。当这种情况发生在我身上时,我使用了这些简单的步骤。
Pod initPod install