skip to Main Content

I’m trying to archive my flutter app to export it to the Apple Store.
The app can be run without any problems, but the archiving process result with a fail.

Xcode is at the latest version that i can download (Version 14.3 (14E222b))
Flutter is updated

I’ve tried theses commands to try to remove the problem :

flutter upgrade
flutter clean
flutter pub get
cd ios
pod deintegrate
rm -f Podfile.lock
pod install
pod update
pod install
sudo gem install cocoapods
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc

After these commands i go into Xcode, delete DerivedData, Clean Build Folder, change Minimum Deployment into Pod > FMDB > General > Minimum Deployment > set to 12.0

And now I test to build an Archive.

After 30 seconds (average), i’ve got this error :

PhaseScriptExecution [CP] Embed Pods Frameworks /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-B1164030238D389C328552D1.sh (in target 'Runner' from project 'Runner')
    cd /Users/mateo/Documents/Dev/App-VE-app/ios
    /bin/sh -c /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-B1164030238D389C328552D1.sh

mkdir -p /Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Runner.app/Frameworks
Symlinked...
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" "/Users/mateo/Library/Developer/Xcode/DerivedData/Runner-dehetosspbhbthhgdgvjmdurocom/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "/Users/mateo/Documents/Dev/App-VE-app/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.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/810eba08-405a-11ed-86e9-6af958a02716/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code

2

Answers


  1. Chosen as BEST ANSWER

    This problem seems to be recent and the solution that worked really well for me is to go back to Xcode 14.2

    If i found an other solution, i will update this post.


  2. Please open xcode and click Pods-Runner-frameworks file on left panel.

    enter image description here

    go to 44. line

    source="$(readlink "${source}")"
    

    change to (add -f)

    source="$(readlink -f "${source}")"
    

    enter image description here

    Clean build folder and run again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search