简体   繁体   English

如何将ObjectiveC框架(IronSource)集成到Flutter(iOS Swift)中?

[英]How to integrate ObjectiveC framework (IronSource) into Flutter (iOS Swift)?

I'm trying to integrate IronSource SDK in a iOS Flutter project (Swift project), but I am unable to do that.我正在尝试将 IronSource SDK 集成到 iOS Flutter 项目(Swift 项目)中,但我无法做到这一点。 According to the IronSource documentation , I must point to IronSource.h file to include the bridge I need.根据IronSource 文档,我必须指向 IronSource.h 文件以包含我需要的网桥。 And I am able to implement it in normal Xcode swift project, but I am unable to do that in flutter project since this bridge is already used by the flutter and it can be only one file. And I am able to implement it in normal Xcode swift project, but I am unable to do that in flutter project since this bridge is already used by the flutter and it can be only one file.

So the question is: How can I integrate another ObjC library (IronSource) in the existing flutter ios project?所以问题是:如何在现有的 flutter ios 项目中集成另一个 ObjC 库(IronSource)?

ObjC 桥接头

I am new to iOS development and Im battleing this for about a week now.我是 iOS 开发的新手,我已经为此奋斗了大约一周。 I cant find anything on the internet that would work so any help will be much appreciated.我在互联网上找不到任何可以工作的东西,所以任何帮助都将不胜感激。 Thanks谢谢

I managed to resolve my issue.我设法解决了我的问题。 It turns out that build paths are not case sensitive and I was using 'ironsource' for my plugin name but IronSourceSDK is using 'IronSource' so it looks like at build time it did not find the correct files.事实证明,构建路径不区分大小写,我在插件名称中使用了“ironsource”,但 IronSourceSDK 使用的是“IronSource”,因此看起来在构建时它没有找到正确的文件。 And when this was working, I had to add 'use_frameworks: :linkage =>.static' in the pod file of the plugin.当它工作时,我必须在插件的 pod 文件中添加 'use_frameworks: :linkage =>.static'。 Then I could depend on it in my swift flutter app normally as any other plugin.然后我可以像任何其他插件一样在我的 swift flutter 应用程序中依赖它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM