iOS Development

ios – The ‘Pods-xxx’ goal has frameworks with conflicting names: kotlin_mpp.framework

Spread the love


At my firm we’re porting our apps to Flutter from native and for firm’s causes we have to shortly do away with the native layers all collectively.
Now, we have now a little bit of a bizarre scenario..
Flutter is built-in as a module into the native platform (I have not prompted this mess, I am simply the brand new Flutter/iOS dev that ought to kind this mess out..yay!!) and we even have a Kotlin Multiplatform module for the again finish API and for which I haven’t got the code..

So the quickest method I prompt is transferring the native VC’s into Flutter and step by step remake the screens..
My first try has been transferring the native VCs into Flutter utilizing PlatformView, however the entire thing works as anticipated so far as Flutter just isn’t a module..(I opened an isse ion GitHub and the Flutter staff have confirmed the difficulty).
As a take a look at I did strive constructing a Flutter plugin which returns PlatformViews displaying the Native VCs and use it within the Flutter app which does work even when Flutter is used as a module within the Native mission.

Now in fact I want to put in all of the Pods that the native VCs use, leading to having a number of doubles, (eg: pod 'TouchDraw', '2.1.2' in Xcode Podfile and s.dependency 'TouchDraw', '2.1.2' within the Flutter plugin’s podspec file).
Xcode would not complain concerning the double pods aside from the Kotlin Multiplatform module with the error: The 'Pods-xxx' goal has frameworks with conflicting names: kotlin_mpp.framework. which in Xcode’s Podfile is put in as : pod 'kotlin_mpp', :path => './kotlin-mpp/kotlin-mpp' and within the Flutter plugin’s podspec file is put in as s.ios.vendored_frameworks="kotlin-mpp/kotlin-mpp/construct/cocoapods/framework/kotlin_mpp.framework".

Is there a technique to edit the Flutter plugin one in order that it has a special identify from the one utilized in Xcode or am I putting in it fallacious within the Flutter plugin’s podspec file inflicting this identify battle?

Many thanks in your assist and time.
That is the podspec file:

Pod::Spec.new do |s|
  s.identify="native_screens_plugin"
  s.model          = '0.0.1'
  s.abstract          = 'A brand new Flutter plugin mission.'
  s.description      = <<-DESC
A brand new Flutter plugin mission.
                       DESC
  s.homepage="http://instance.com"
  s.license          = { :file => '../LICENSE' }
  s.creator           = { 'Your Firm' => '[email protected]' }
  s.supply           = { :path => '.' }
  s.source_files="Courses/**/*"
  s.dependency 'Flutter'
  s.platform = :ios, '14.0'



  # Flutter.framework doesn't comprise a i386 slice.
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
  s.swift_version = '5.0'


  s.dependency 'MBProgressHUD', '1.2.0'
  s.dependency 'PanModal', '1.2.7'
  s.dependency 'TouchDraw', '2.1.2'
  s.dependency 'MaterialComponents/Snackbar', '122.0.1'
  s.dependency 'MaterialComponents/TextFields', '122.0.1'
  s.dependency 'MaterialComponents/TextFields+Theming', '122.0.1'
  s.dependency 'MaterialComponents/Playing cards', '122.0.1'
  s.dependency 'MaterialComponents/BottomNavigation', '122.0.1'
  s.dependency 'MaterialComponents/Chips', '122.0.1'
  s.dependency 'MaterialComponents/Chips+Theming', '122.0.1'
  s.dependency 'MaterialComponents/Tabs+TabBarView', '122.0.1'
  s.dependency 'MaterialComponents/Buttons', '122.0.1'
  s.dependency 'YPImagePicker', '5.2.2'
  s.dependency 'Firebase/Crashlytics', '10.9.0'
  s.dependency 'SwiftRichString', '3.7.2'
  s.dependency 'IGListKit', '4.0.0'
  # s.ios.vendored_frameworks="kotlin-mpp/construct/cocoapods/framework/kotlin_mpp.framework"
  s.ios.vendored_frameworks="kotlin-mpp/kotlin-mpp/construct/cocoapods/framework/kotlin_mpp.framework"




  # s.vendored_frameworks="kotlin-mpp"

  # s.supply = { :path  => './kotlin-mpp/kotlin-mpp' }
  # s.vendored_frameworks="kotlin-mpp"

  # s.ios.dependency 'native_screens_plugin/kotlin-mpp'
  # s.subspec 'kotlin-mpp' do |ss|
  #   ss.source_files="kotlin-mpp/**/*.{h,m}"
  # finish




finish

Leave a Reply

Your email address will not be published. Required fields are marked *