1

我的“project.pbxproj”受版本控制。Xcode 不断更改remoteGlobalIDString通过子项目链接的库。

还有其他人有这个问题吗?如果是,我该怎么办?

5A1F61F5162C0F6B001ABF64 /* PBXContainerItemProxy */ = {
        isa = PBXContainerItemProxy;
        containerPortal = 5A0A1B5816147A4A00C65C6D /* MyReferencedSubProject.xcodeproj */;
        proxyType = 1;
        remoteGlobalIDString = 235B356E47F64C9DB6D76F45; << THIS CHANGES ALL THE TIME
        remoteInfo = MyLibInMySubProject;
    };
4

1 回答 1

1

为我修复它的唯一方法是重写由 cmake 生成的项目 UUID:

YOUR_TARGET_UUID=$(grep -E -m 1 '[A-F0-9]{24} \/\* YOUR_TARGET \*\/ = {' \
                    "Project.xcodeproj/project.pbxproj" | \
                 grep -o -E '[A-F0-9]{24}')
sed -i '' "s/${YOUR_TARGET_UUID}/00000000DEADBEEF00000000/g" \
          "Project.xcodeproj/project.pbxproj"
于 2012-11-30T16:20:12.653 回答