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

[Multiple commands produce xxxx ] happened while archiving app(target >= iOS11) , with Clips or Widgets in iOS14 #1522

Closed
SpiciedCrab opened this issue Sep 19, 2020 · 9 comments · Fixed by #1524

Comments

@SpiciedCrab
Copy link

I'm working with the project:
Main project working with the latest Kingfisher and development target = iOS 11.
Clip / Widget extension working with the latest Kingfisher/SwiftUI and development target = iOS 14.

After pod installing, the Kingfisher and Kingfisher-Core-SwiftUI target is added into the Pods project, and their Product Name are both Kingfisher.
So when I archive the app , the error occurs due to the same Product Name of them:

Multiple commands produce '/xxx/Kingfisher.framework':
1) Target 'Kingfisher' has create directory command with output '/xxx/Kingfisher.framework'
2) Target 'Kingfisher-Core-SwiftUI' has create directory command with output '/xxx/Kingfisher.framework'

I know that it's not the issue or bug with Kingfisher, but can u provide me some solution in this situation?

Thx

@onevcat
Copy link
Owner

onevcat commented Sep 19, 2020

Kingfisher's SwiftUI support is a part of (or say an additional slice) the core framework.

So if you are using use_frameworks! and linking Kingfisher dynamically (which should be the recommended way when you developing a multiple targets app containing widget or other extensions), you can just add KingfisherSwiftUI to pod file and link it to multiple targets. So only one full-featured of the framework will be added to your project.

@SpiciedCrab
Copy link
Author

Kingfisher's SwiftUI support is a part of (or say an additional slice) the core framework.

So if you are using use_frameworks! and linking Kingfisher dynamically (which should be the recommended way when you developing a multiple targets app containing widget or other extensions), you can just add KingfisherSwiftUI to pod file and link it to multiple targets. So only one full-featured of the framework will be added to your project.

But the pod install would fail since the main target's development is iOS 11,
and KingfisherSwiftUI needs the deployment_target = "13.0" in its podSpec.

@onevcat
Copy link
Owner

onevcat commented Sep 19, 2020

@SpiciedCrab

I got your idea. I pushed some changes to the fix/swift-ui-deploy-target branch to make the deploy target requirement of SwiftUI subspec matching to the main target. Can you try it to see if it works for you? You can change both of the dependency declarations in your Podfile to something like this, before we can tag and release it as a new version:

pod 'Kingfisher/SwiftUI', :git => 'https://github.com/onevcat/Kingfisher.git', :branch => 'fix/swift-ui-deploy-target'

@SpiciedCrab
Copy link
Author

@onevcat

No, still not work

Multiple commands produce '/xxx/Kingfisher.framework':
1) Target 'Kingfisher.default-SwiftU' has create directory command with output '/xxx/Kingfisher.framework'
2) Target 'Kingfisher-Core-SwiftUI' has create directory command with output '/xxx/Kingfisher.framework'

Also you can find these two frameworks are all added into Pod target with the same name: Kingfisher.

@onevcat
Copy link
Owner

onevcat commented Sep 20, 2020

platform :ios, '11.0'

target 'SampleProject' do
  use_frameworks!
  pod 'Kingfisher/SwiftUI', :git => 'https://github.com/onevcat/Kingfisher.git', :branch => 'fix/swift-ui-deploy-target'
end

target 'SampleWidgetExtension' do
  use_frameworks!
  pod 'Kingfisher/SwiftUI', :git => 'https://github.com/onevcat/Kingfisher.git', :branch => 'fix/swift-ui-deploy-target'
end

Here is the Podfile I am trying and it works fine. CocoaPods recognized both as a single target in the pod framework.

Maybe check your project setting or Podfile to see if there is another setting causes this issue.

@onevcat
Copy link
Owner

onevcat commented Sep 20, 2020

  1. Target 'Kingfisher.default-SwiftU'

And the target name in your log is suspicious, if you are not pasting it wrongly.

@SpiciedCrab
Copy link
Author

  1. Target 'Kingfisher.default-SwiftU'

And the target name in your log is suspicious, if you are not pasting it wrongly.

yep, and I fixed the dependency in my private pods and it works.
Thanks for support

@JohnnyTseng
Copy link

JohnnyTseng commented Nov 24, 2020

For those who are struggling with this error after upgrading to 5.15.7:

Remember to install only Kingfisher/SwiftUI in your main app target & app extension, DON'T install like this:

pod 'Kingfisher'
pod 'Kingfisher/SwiftUI

it'll produce the same error, just use

pod 'Kingfisher/SwiftUI'

@matantech
Copy link

matantech commented Dec 15, 2020

For those who are struggling with this error after upgrading to 5.15.7:

Remember to install only Kingfisher/SwiftUI in your main app target & app extension, DON'T install like this:

pod 'Kingfisher'
pod 'Kingfisher/SwiftUI

it'll produce the same error, just use

pod 'Kingfishser/SwiftUI'

Just tried it got:

[!] Unable to find a specification for Kingfishser/SwiftUI

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

here's my pod file:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'IPTV Free' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  pod 'Alamofire'
  pod 'Kingfishser/SwiftUI'
  pod 'Firebase/Database'	
  pod 'Google-Mobile-Ads-SDK'

  target 'IPTViewerWidgetExtensionExtension' do

  pod 'Kingfisher/SwiftUI'

  end

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

  target 'IPTV FreeUITests' do
    # Pods for testing
  end

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants