0

I was using Xcode 12.5.1 for my iOS App which has iOS Deployment Target iOS12 it was working fine

After I tried to open this project in Xcode 13 I got multiple errors in some libraries like "ImagePicker", "Kingfisher", "FittedSheets"

The error: Command CompileSwiftSources failed with a nonzero exit code

I tried to run pod update but it didn't help me still same errors

My Podfile looks like this:

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

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

  # Pods for MyApp
  pod 'Firebase/Messaging'
  pod 'Firebase/Storage'
  pod 'Firebase/Database'  
  pod 'Firebase/Firestore'
  pod 'Firebase/Auth'
  pod 'FittedSheets'
  pod 'ImagePicker'
  pod 'Lightbox'
  pod 'Hue'
  pod 'Kingfisher', '~> 5.0'
pod 'Firebase/Functions'
target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

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

end

I use iOS 12 as iOS Deployment Target for MyApp and the same I tried to use for failed Pods.

I tried various solutions like setting all Pods to iOS12 as iOS Target but nothing really worked for me anyone knows other solution how to fix it ?

enter image description here

LDropl
  • 846
  • 3
  • 9
  • 25
  • "The error: Command CompileSwiftSources failed with a nonzero exit code" But what was the _actual_ error that it failed with? You have to look in the build log and see. – matt Mar 12 '22 at 15:53
  • @matt I added screenshot with an error – LDropl Mar 12 '22 at 16:04
  • Ok but completely rewrite your question please, because that is not at all what you said earlier. And do not show pictures of code. Code is text, and so are error messages. Show them as text. – matt Mar 12 '22 at 17:29

1 Answers1

1

So it seems like maybe you have a class called Configuration? You will need to give it a different name, or qualify it with a namespace, because now UIButton also has a class called Configuration and so there's a naming conflict.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • you're right, it uses another Configuration class. The right "Configuration" class located in the same directory as my "ButtonPicker" class. How I should explicitly use that Configuration class without renaming ? – LDropl Mar 12 '22 at 18:19
  • You might be able to say `MyApp.Configuration` but I think it would be better to rename it. It's a simple thing to do with the Refactor command so just bite the bullet. – matt Mar 12 '22 at 18:33
  • this Configuration class it's not custom class written by me, its from Pod Library ImagePicker and ButtonPicker class is also in that ImagePicker library.So I can't really rename it :D It's weird that Xcode 13 can't find it and Xcode 12 has no problems with that – LDropl Mar 12 '22 at 18:39
  • It's not weird. iOS 14 has no Configuration class inside UIButton. iOS 15 does. As I already said, try saying `ImagePicker.Configuration` instead. – matt Mar 12 '22 at 22:10
  • I tried it but getting another error ```Overriding non-open property outside of its defining module```in the line ```var configuration = ImagePicker.Configuration()``` – LDropl Mar 13 '22 at 13:23
  • Because in iOS 15 the button already has a `configuration` property so you can't just make another one. _Name the variable something else._ – matt Mar 13 '22 at 13:39
  • I'm getting more and more errors ```"... is only available in iOS 15 or newer"```is there any other way to fix all these errors ? My App is using iOS 12 as iOS target as well as Pods – LDropl Mar 13 '22 at 14:30