3

I am trying to make an archive of my project but it fails, giving following error:

sync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" "/[AppPath]/Build/Intermediates.noindex/ArchiveIntermediates/QA/InstallationBuildProductsLocation/Applications/[APP NAME].app/Frameworks"
building file list ... rsync: link_stat "/[APP_PATH]../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" failed: No such file or directory (2)
done

sent 29 bytes  received 20 bytes  98.00 bytes/sec
total size is 0  speedup is 0.00

rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
  • MacBook: M1 Macbook Pro
  • MacOS: Ventura 13.2.1
  • Xcode Version: 14.3
  • Pods version: 1.12.0

Following is my PODFILE:

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

target '[APP NAME]' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  pod 'Moya', '~> 14.0.0'
  pod 'Moya/RxSwift',' ~> 14.0.0'
  pod 'Eureka'
  pod 'SwiftSignalRClient'
  
  pod 'Kingfisher'
  #pod 'FMPhotoPicker', '~> 1.3.0'
  
  pod 'iOSDropDown'
  
  #Material TextFields
  pod 'MaterialComponents/TextControls+OutlinedTextAreas'
  pod 'MaterialComponents/TextControls+OutlinedTextFields'
  
  pod 'Blueprints'

  pod 'PhoneNumberKit'
  
  pod 'Firebase/Analytics'
  pod 'Firebase/Crashlytics'
  pod 'FirebaseMessaging'
  pod 'FittedSheets'


post_install do |installer|
      installer.generated_projects.each do |project|
            project.targets.each do |target|
                target.build_configurations.each do |config|
                    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
                 end
            end
     end
  end

end

I have also note that if I add my dependencies via package manager my archvive is successful but in case if I use CocoaPods App Archive fails

Ali Mehdi
  • 255
  • 5
  • 9
  • I had a similar error. I wasn't able to fix it, but I'm using Xcode 14.2 as a workaround – Carsten Apr 17 '23 at 11:38
  • @Carsten follow this steps https://stackoverflow.com/a/75984932/16322682 . i found the solution – Jatin Apr 17 '23 at 11:56
  • @Ali mehdi checkout my answer same error got resolved https://stackoverflow.com/a/75984932/16322682 – Jatin Apr 17 '23 at 11:58
  • NOTE: some path got changes in newer xcode so we need to change it in target support file script – Jatin Apr 17 '23 at 12:00
  • Does this answer your question? [Upgrade from xCode 14.2 to 14.3 PhaseScriptExecution failed with a nonzero exit code](https://stackoverflow.com/questions/75486713/upgrade-from-xcode-14-2-to-14-3-phasescriptexecution-failed-with-a-nonzero-exit) – HangarRash Apr 17 '23 at 16:09

3 Answers3

4

This has been fixed in cocoa pods 1.12.1.

After updating cocoa pods, also update your pods in the project.

If it still does not work, try this:

pod deintegrate
pod install
Sune
  • 1,326
  • 1
  • 11
  • 17
2

- First

Add below code to your Podfile. ('11.0' depends on your app. change it appropriately.)

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
         end
    end
  end
end

- Second

Reinstall the pods.

pod deintegrate
pod install

- Third

  1. Open the file 'Pods-[Your App Name]-frameworks.sh' located in your project folder.
  2. Find the code source="$(readlink "${source}")"
  3. Insert '-f' to the above code like source="$(readlink -f "${source}")"

- Fourth(If you use Firebase crashlytics.)

  1. Open the 'BuildPhases' pannel with this path in Xcode. 'Targets> [Your App Name] > BuildPhases'
  2. Move 'Firebase crashlytics' to the end of the order. Build Phases

(In my case, the order of Build Phases was changed by Xcode 14.3, which caused a problem. So, You should confirm the Firebase Crashlytics shell command is at the end of the order)

AntoYang
  • 21
  • 2
  • Brother where should I "Press 'Command + Shift + F' and find source="$(readlink "${source}")"? Don't you think you are missing the key information? – CrackIt May 17 '23 at 04:10
  • 'Command + Shift + f‘ is just all search shortcut of Xcode. – AntoYang May 19 '23 at 01:56
-1

As per this issue, I had to add the following to my Podfile after updating cocoapods. Be sure to run 'pod install' again:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        # Fix libarclite_xxx.a file not found.
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
        end
    end
end
N S
  • 2,524
  • 6
  • 32
  • 42