React-native-firebase: iOS cannot install pod when using use_framework! for v6.x.x

Created on 4 Dec 2019  路  10Comments  路  Source: invertase/react-native-firebase


Issue



iOS cannot install pod when using use_framework! for v6.x.x


Environment

pod install output:

 [!] The 'XXXX' target has transitive dependencies that include statically linked binaries: (FirebaseCore, FirebaseCoreDiagnostics, GoogleDataTransportCCTSupport, GoogleDataTransport, FirebaseInstanceID, and FirebaseDynamicLinks)

  • Platform that you're experiencing the issue on:

    • [x] iOS

    • [ ] Android

    • [ ] iOS but have not tested behavior on Android

    • [ ] Android but have not tested behavior on iOS

    • [ ] Both

Stale

Most helpful comment

force RNFB-prefixed libs build as static library in Podfile:

For cocoapods >= 1.9:

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.start_with?('RNFB')
      def pod.build_type;
        Pod::BuildType.static_library
      end
    end
  end
end

For cocoapods < 1.9:

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.start_with?('RNFB')
      def pod.build_type;
        Pod::Target::BuildType.static_library
      end
    end
  end
end

All 10 comments

Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

You have to add

  pre_install do |installer|
    # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  end

@Aurelienlajoinie that's a workaround that working if you're lucky and any other Pods aren't needed that verify_no_static_framework_transitive_dependencies.

Basically it's wrong to effect other dependencies since RNFB force to do that.

Need a better solution here.

Until then, I'm downgrading to v5 馃槥

@Salakar Can you assist here please?

I'm having the same issue, downgrading to v5 until some workaround appear

force RNFB-prefixed libs build as static library in Podfile:

For cocoapods >= 1.9:

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.start_with?('RNFB')
      def pod.build_type;
        Pod::BuildType.static_library
      end
    end
  end
end

For cocoapods < 1.9:

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.start_with?('RNFB')
      def pod.build_type;
        Pod::Target::BuildType.static_library
      end
    end
  end
end

Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

It's still happening

Hey @WeslleyNasRocha check out #3253 - it might be interesting for you?

Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings