Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gma_mediation_meta and gma_mediation_ironsource have transitive dependencies that include statically linked binaries #1225

Open
Tom3652 opened this issue Jan 14, 2025 · 12 comments
Assignees
Labels
mediation Issue related to mediation API's

Comments

@Tom3652
Copy link

Tom3652 commented Jan 14, 2025

[REQUIRED] Step 1: Describe your environment

Plugin Version

google_mobile_ads: ^5.2.0
gma_mediation_meta: ^1.0.1
gma_mediation_ironsource: ^1.0.0

[REQUIRED] Step 2: Describe the problem

The problem is that the app can't be built on IOS if we add the gma_mediation_meta or the gma_mediation_ironsource package to our flutter app.
This is due to the fact that the target has transitive dependencies that include statically linked binaries.

In our app we can't use use_frameworks! :linkage => :static for external reasons that create new bugs.

For example, gma_mediation_unity doesn't inclu static linked binaries and it builds fine.

Steps to Reproduce

  1. Create a flutter project
  2. Add the gma_mediation_meta package
  3. Run pod install or pod update
  4. See the error

Expected results:

There should be no error without additional changes in the Podfile.

Actual results:

The error [!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/foxtom/StudioProjects/MyFlutterProject/ios/Pods/GoogleMobileAdsMediationFacebook/MetaAdapter-6.15.2.1/MetaAdapter.xcframework) is occurring.

Logs
[✓] Flutter (Channel stable, 3.27.1, on macOS 15.2 24C101 darwin-x64, locale fr-FR)
    • Flutter version 3.27.1 on channel stable at /Users/foxtom/Desktop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (4 weeks ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/foxtom/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.96.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (6 available)
    • moto g 8 power (mobile)   • 192.168.1.23:38615        • android-arm64  • Android 11 (API 30)
    • Now You See Me (mobile)   • 00008020-001204401E78002E • ios            • iOS 18.2.1 22C161
    • macOS (desktop)           • macos                     • darwin-x64     • macOS 15.2 24C101 darwin-x64
    • Chrome (web)              • chrome                    • web-javascript • Google Chrome 131.0.6778.265

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@malandr2
Copy link
Collaborator

Hey @Tom3652,

This looks to be duplicates of #1066 and #1118

Have you tried these resolutions?

@malandr2 malandr2 added mediation Issue related to mediation API's feedback required Further information is requested labels Jan 14, 2025
@Tom3652
Copy link
Author

Tom3652 commented Jan 14, 2025

Hi @malandr2 ,

Yes actually and i can't afford to use I did add " :linkage => :static" on use_frameworks! unfortunately as mentioned in my issue initial comment because i have other Xcode targets in my project that can't use that and it generates several bugs that i can't fix for now.

So static linking is required for some mediation package ? I actually don't know if it's intentional to link static libraries in some of them (for Meta Audience Network but not for Unity Ads ? Why ?). Could you answer that ?

-> In that case, yes i will have to review my priorities in terms of mediation unfortunately
-> If it's not intentional, i will fork the packages and update the Podfile myself, but it would be nice that it would be done by the official source (Google)

@github-actions github-actions bot removed the feedback required Further information is requested label Jan 14, 2025
@Tom3652
Copy link
Author

Tom3652 commented Jan 15, 2025

I have tested a bit more, but i can't figure out how can i link statically the specific pods. Do you know how to do that ?

I have this Podfile configuration :

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'GoogleUtilities'
  pod 'Giphy'
  pod 'GoogleMobileAdsMediationFacebook', :static_framework => true
  pod 'GoogleMobileAdsMediationIronSource', :static_framework => true

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

But it doesn't work i am getting : [!] Unknown external source parameters for 'GoogleMobileAdsMediationFacebook': '{:static_framework=>true}'

@malandr2
Copy link
Collaborator

What if you try

pod 'GoogleMobileAdsMediationFacebook', :linkage => :static
pod 'GoogleMobileAdsMediationIronSource', :linkage => :static

instead does that change anything?

@Tom3652
Copy link
Author

Tom3652 commented Jan 15, 2025

I am getting the same error unfortunately : [!] Unknown external source parameters for GoogleMobileAdsMediationFacebook: {:linkage=>:static}.

-> So if i want to use Mediation for now, i have to remove my Target ImageNotification to display URLs in the push notification, which is not a real solution since i need both...

@malandr2
Copy link
Collaborator

Got it. I have shared this with @LTPhantom to take a closer look.

@Tom3652
Copy link
Author

Tom3652 commented Jan 15, 2025

Thank you !

And anyway, even after removing the ImageNotification, i am getting an infinite build time on Xcode using use_frameworks! :linkage => :static but maybe i should just wait few hours the first time...

Normally my iOS build takes 30sec at most.

@Tom3652
Copy link
Author

Tom3652 commented Jan 16, 2025

Final notes since i have managed to build my project in the end :

It was implicitly the ImageNotification that was causing the issue because i had to use the static linkage on that target as well and i had to embbed it without signing into my main project (Xcode do not give me the choice here).

I have raised another issue to the flutter repo and a link was provided that says to never embed the statically linked frameworks.

So there is a real problem here because i can't use my app extension because of the static linkage that some gma_mediation_xxx packages are forcing unfortunately :/

@malandr2
Copy link
Collaborator

malandr2 commented Jan 17, 2025

Thanks for the follow-up @Tom3652. I've pinged @LTPhantom to provide some additional insight to your issue.

@LTPhantom
Copy link
Collaborator

Hello @Tom3652. I see that the meta and ironsource adapter need an update similar to what the unity had a while ago. The release for both will be completed sometime next week.

@Tom3652
Copy link
Author

Tom3652 commented Jan 18, 2025

Thank you very much, this is also the case for inmobi please that i am using.

I guess this should be done for several other packages, but if no one complains / uses them.. If i may ask for the priority -> it would be awesome to add inmobi as well please to the update 🙏🏼🔥

@malandr2
Copy link
Collaborator

ACK @Tom3652, thanks for the feedback. We are in progress of updating the adapters - will close this ticket out once the PR is submitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mediation Issue related to mediation API's
Projects
None yet
Development

No branches or pull requests

3 participants