-->

attempted to init

2019-03-26 04:11发布

问题:

I have taken SVN check-in for a project. Thereafter I have installed pod via terminal. After installation of pod there are few warning stating

    <PBXResourcesBuildPhase UUID=...> attempted to initialise an 
    object with an unknown UUID.

What might be reason? Is this warning critical?

回答1:

The reason that happened in my case was some developer updated a pod A while I installed a new pod B (without updated pod A). So when I merged his codes I got the warning.

An easy way to fix this is to <1> remove libPods.a from General->Linked Frameworks and libraries <2> run pod install or pod update "an-existing-pod" again.

For step #2 the purpose is to update .xcodeproj file not to install pod again. If pod is already there cocoapods will just update .xcodeproj file.



回答2:

Xcode 8 - 11

Target > General > Linked Frameworks and Libraries



回答3:

Step 1: Deintegrate your project from CocoaPods. Removing all traces of CocoaPods from your Xcode project.

$pod deintegrate ProjectName.XCODEPROJ

Step 2: Install the pod Again

$pod install



回答4:

I don't know if you fixed this or not, but for future reference, I has the same issue.

On my case, after opening .pbxproj file on a text editor, realised that the first UUID pointed to the 'Copy Bundle Resources' of the 'Build Phases'.

Removing that and adding again fixed the issue for me.



回答5:

For my case, I re-run pod install and find this warnings aren't showing. This is due to merging the project file.



回答6:

It still happens from time to time to me. My solution is to search after the unknown UUID in your project file and simply delete all lines you'll find.

Terminal-command:

cat YOUR_PROCJECT_NAME.xcodeproj/project.pbxproj | grep 'UNKNOWN_UUID'

You should find something like this:

UNKNOWN_UUID /* (null) in Resources */,