Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Flipper 0.96.1: Xcode cocoapods cannot build project with use_framework! #2548

Closed
baveku opened this issue Jul 3, 2021 · 13 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@baveku
Copy link
Contributor

baveku commented Jul 3, 2021

🐛 Bug Report

I cannot build this project use flipper v0.96.1

To Reproduce

Environment

Flipper: 0.96.1
Xcode: 12.5.1
Swift: 5.4

platform :ios, '10.0'
flipperkit_version = '0.96.1'
flipper_configurations = ['debug']
target 'Bitu' do
  # Comment the next line if you don't want to use dynamic frameworks
  # Pods for Bitu
  use_frameworks!

pod 'FlipperKit', '~>' + flipperkit_version, :configurations => flipper_configurations
pod 'FlipperKit/FlipperKitLayoutPlugin', '~>' + flipperkit_version, :configurations => flipper_configurations
pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configurations => flipper_configurations
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configurations => flipper_configurations
# ...unfortunately at this time that means you'll need to explicitly mark
# transitive dependencies as being for debug build only as well:
pod 'Flipper-DoubleConversion', :configurations => flipper_configurations
pod 'Flipper-Folly', :configurations => flipper_configurations
pod 'Flipper-Glog', :configurations => flipper_configurations
pod 'Flipper-PeerTalk', :configurations => flipper_configurations
pod 'CocoaLibEvent', :configurations => flipper_configurations
pod 'boost-for-react-native', :configurations => flipper_configurations
pod 'OpenSSL-Universal', :configurations => flipper_configurations
pod 'libevent', :configuration => flipper_configurations
pod 'boost-for-react-native', :configuration => flipper_configurations
pod 'OpenSSL-Universal', :configuration => flipper_configurations
pod 'Flipper-Fmt', :configuration => flipper_configurations
pod 'Flipper-Boost-iOSX', :configurations => flipper_configurations

$static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly', 'Flipper-DoubleConversion',
'Flipper-Glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Flipper-fmt', 'Flipper-Boost-iOSX',
'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native', 'libevent']

pre_install do |installer|
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  installer.pod_targets.each do |pod|
    if $static_framework.include?(pod.name)
      def pod.build_type;
      Pod::BuildType.static_library
    end
  end
end
end


  target 'BituTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'BituUITests' do
    # Pods for testing
  end

end

Xcode always return a error:
Screen Shot 2021-07-04 at 03 55 57

@baveku baveku changed the title Flipper 0.96.1: Xcode cocoapods cannot build project when use_framework! Flipper 0.96.1: Xcode cocoapods cannot build project with use_framework! Jul 3, 2021
@theGlenn
Copy link

theGlenn commented Jul 9, 2021

Duplicate of #2414

@luvwylla09
Copy link

Did you solve the problem?

@baveku
Copy link
Contributor Author

baveku commented Aug 14, 2021

Did you solve the problem?

No, waiting for help. I try to remove "use_framework!" but some pod need it, I hope someone help us to solve this issue.

@luvwylla09
Copy link

Did you solve the problem?

No, waiting for help. I try to remove "use_framework!" but some pod need it, I hope someone help us to solve this issue.

Me too. In my project, I must "use_framework!" because of some pods. T^T

@baveku
Copy link
Contributor Author

baveku commented Aug 23, 2021

maybe help someone wants to use the latest version without "use_framework!".
Screen Shot 2021-08-23 at 10 15 21

@umarchohan
Copy link

Any solution on this one? This is really getting out of hands. I tried installing Xcode 13 beta but got the same error.

@andresi
Copy link

andresi commented Aug 25, 2021

I tried old Flipper versions one by one, but it seems none of them supports XCode 12 and "use_frameworks!"

@umarchohan
Copy link

@andresi I tried from version 0.83 up-to 0.96 with Xcode 12.5 but nothing worked.

@andresi
Copy link

andresi commented Aug 25, 2021

maybe help someone wants to use the latest version without "use_framework!".
Screen Shot 2021-08-23 at 10 15 21

I don't understand what you are proposing. Are you saying that adding "use_modular_headers!" solves the problem? It doesn't seem to work for me.

@luvwylla09
Copy link

maybe help someone wants to use the latest version without "use_framework!".
Screen Shot 2021-08-23 at 10 15 21

I don't understand what you are proposing. Are you saying that adding "use_modular_headers!" solves the problem? It doesn't seem to work for me.

I think it doesn't solve problems if we must build project with 'use_framework'

@baveku
Copy link
Contributor Author

baveku commented Aug 26, 2021

maybe help someone wants to use the latest version without "use_framework!".
Screen Shot 2021-08-23 at 10 15 21

I don't understand what you are proposing. Are you saying that adding "use_modular_headers!" solves the problem? It doesn't seem to work for me.

I think it doesn't solve problems if we must build project with 'use_framework'

my custom pod needs "use_modular_headers!", Oh I don't understand how my project running, hmmm, maybe we need help, @passy can your team solve this problem? please help us, Flipper is very useful and saves my time.

@luvwylla09
Copy link

Please help us solve this problem. Our develop team thinks it's very important and useful. 😭😭😭

@mweststrate
Copy link
Contributor

Closing as duplicate, let's continue in the original issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants