0

I'm getting these errors when trying to archive my app for the App Store. During testing these never resent themselves. I found a similar post here but the solution doesn't work for me as I don't have the offending files in that build phase. I am using pods to install, so I don't know if that would make the solution different.

1) Target 'Realm-iOS11.0' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Realm.framework'
2) Target 'Realm-iOS12.2' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Realm.framework'

Second error

1) Target 'RealmSwift-iOS11.0' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RealmSwift.framework'
2) Target 'RealmSwift-iOS12.2' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RealmSwift.framework'
Cody Harness
  • 1,116
  • 3
  • 18
  • 37

3 Answers3

0

As I was typing this out I poked around some more and eventually figured it out. I tried to deintegrate and reinstall pods, but it failed because there are different targets of the project that were using different versions of Swift. After I matched all targets to the same version of Swift and installed, everything was fine.

Cody Harness
  • 1,116
  • 3
  • 18
  • 37
  • I am having the same issue with multiple Target files. Can you please tell me how did you match all targets to the same version of swift and installed them? Thank you! – hasib_ullah May 24 '21 at 15:31
  • @hasib_ullah In your project settings go to Build Settings and search for Swift version – Cody Harness Jun 08 '21 at 13:38
0

Clear your Derived Data folder. You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment.

Then click over the little grey arrow under Derived data section and select your project folder to delete it.

nazaif
  • 53
  • 9
  • I had tried that as well, but archiving would bring me right back to the problem again. It's because the app I was working with is a target in a larger project, and not all of the targets were using the same version of Swif.t – Cody Harness Jan 30 '20 at 16:50
0

Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform. Example:

target 'theProject' do
  platform :ios, '12.0'
  use_frameworks!
# some pod
end

target 'theWidgetExtension' do
  platform :ios, '12.0'
  use_frameworks!
# some pod
end

You must using the same version of Pod library. Please read more in your terminal.

quynhbkhn
  • 59
  • 4