How to add Copy Pods resources?

I accidentally deleted Copy Pods Resources, how can I add it back? I tried installing "pod install" and it does not work. I have only one goal in the project

+7
xcode cocoapods
source share
4 answers

I found that you need to edit project.pbxproj

to include these lines:

E0F2945D18DC83D9006CC8FE - your target identifier

in / * Start the PBXNativeTarget section * /

update build phases:

buildPhases = ( E0F2928A18DC83D9006CC8FE /* Check Pods Manifest.lock */, E0F2928A18DC83D9006CC8FE /* Sources */, E0F2930018DC83D9006CC8FE /* Frameworks */, E0F2932118DC83D9006CC8FE /* Resources */, E0F2945D18DC83D9006CC8FE /* ShellScript */, E0F2945E18DC83D9006CC8FE /* CopyFiles */, E0F2945E18DC83D9006CC8FE /* Copy Pods Resources */, ); 

then

 /* Begin PBXShellScriptBuildPhase section */ E0F2945D18DC83D9006CC8FE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = ""; }; E0F2945D18DC83D9006CC8FE /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n"; showEnvVarsInLog = 0; }; E0F2945D18DC83D9006CC8FE /* Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ 
+1
source share

This has happened to me before. I found that by removing all traces of Cocoapods from your project / folders and then doing pod install , it will return all build phases, etc.

My steps:

  • Delete workspace
  • Delete Subscriptions Folder
  • Delete Podfile.lock File
  • On the Phase Build tab, for the goal you are working on, delete the Check Pods Manifest.lock build phase (this will be the only Cocoapods build phase left since the resource step started)
  • In the "Build Options" tab, for the target you're working on, delete all Cocoapods paths, etc., if you want to be safe. When you start with Cocoapods and you still don’t fully understand all this, I also completed this step to make sure that I am starting from scratch.
+1
source share

I just solved this by simply creating “Run Script Phase”, naming it “Copy Pods Resources” and adding:

 "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" 

It works for me.

+1
source share

Solved this problem using "cocoapods-deintegrate". Simple and easy.

https://github.com/kylef/cocoapods-deintegrate

0
source share

All Articles