xcode – 如何添加Copy Pods资源?

我不小心删除了“Copy Pods Resources”,如何将其添加回去?
我试过’pod install’但它不起作用
我在项目中只有一个目标

解决方法

我发现你需要编辑project.pbxproj

包括这些行:

E0F2945D18DC83D9006CC8FE是您的目标ID

在/ *开始PBXNativeTarget部分* /

更新构建阶段:

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

然后

/* 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 */

相关文章

背景 前端时间产品经理决定使用百度统计,使得 工程B 中原统计sdk-友盟统计,需要被去除。之前尝试去除...
结论: alloc负责分配内存和创建对象对应的isa指针; init只是返回alloc生成的对象。 所以alloc后,多次...
更新 如果UI愿意把启动图切割成n份,按一定约束在launchscreen.storyboard中进行排版,启动图效果会更好...
最近在看一本书《Effective OC 2.0》,今天看到有个tip是OC适中循环各自优劣性,作者最终推荐此块循环。...
// // ViewController.m // paintCodeTestOC //gif // Created by LongMa on 2019/7/25. // #import &a...
背景介绍 一般情况下,出于省电、权限、合理性等因素考虑,给人的感觉是很多奇怪的需求安卓可以实现,但...