Skip to content

Upgrading to Xcode 14.3 breaks iOS app publishing: link_stat failed: No such file or directory #123890

@serdarcida

Description

@serdarcida

I encountered the "Command PhaseScriptExecution failed with a nonzero exit code" error while trying to build my Flutter iOS project. After investigating the issue, I found a temporary solution that resolved the error, which involved making changes to the Pods-Runner-frameworks.sh file. I want to report this problem and the temporary fix I applied.

Issue:

During the build process, the PhaseScriptExecution step failed due to a problem with the Pods-Runner-frameworks.sh script. This script is responsible for embedding the frameworks from the CocoaPods dependencies into the final iOS app.

Temporary Solution:

To work around this issue, I performed the following steps:

  • Located the Pods-Runner-frameworks.sh file in the ios/Pods/Target Support Files/Pods-Runner/ directory.
  • Copied the Pods-Runner-frameworks.sh file into the ios/Runner/ directory.
  • Made changes to the Pods-Runner-frameworks.sh file in the ios/Runner/ directory. I replaced the following line:

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

  • Modified the project.pbxproj file in the ios/Runner.xcodeproj/ directory, updating the shellScript property for the [CP] Embed Pods Frameworks phase. I changed the line from:

shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
to
shellScript = "\"${PROJECT_DIR}/Runner/Pods-Runner-frameworks.sh\"\n";

After applying these changes, the build process succeeded without any errors. However, this is only a temporary solution, and I believe it would be helpful for the Flutter team to investigate and provide a more permanent fix for this issue, taking into consideration the changes made to the Pods-Runner-frameworks.sh file.

Please let me know if you need any additional information or clarification. Thank you.

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressioncustomer: crowdAffects or could affect many people, though not necessarily a specific customer.platform-iosiOS applications specificallyplatform-macBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versiont: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.workaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions