iosswiftobjective-cflutterbridging-header

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. According to the IronSource documentation, I must point to IronSource.h file to include the bridge I need. 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?

ObjC bridging header

I am new to iOS development and Im battleing this for about a week now. I cant find anything on the internet that would work so any help will be much appreciated. Thanks


Solution

  • 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. And when this was working, I had to add 'use_frameworks! :linkage => :static' in the pod file of the plugin. Then I could depend on it in my swift flutter app normally as any other plugin.