Is it possible to sort the Compile Sources list in the Build Phases section of an Xcode project?

前端 未结 5 1162
梦如初夏
梦如初夏 2021-02-02 11:04

I want to sort the files in the \'Compile Sources\' section of my Xcode project according to their names. Is it possible?

5条回答
  •  轮回少年
    2021-02-02 11:44

    This is thoroughly answered, but I thought I'd share the Emacs command that sorted these in place for me. Navigate to project.pbxproj, mark all files under PBXSourcesBuildPhase, and use the command:

    M-3 M-x sort-fields

    ...aka sorting the marked area by the 3rd column, which happens to be the filenames. C-x C-s and you're on your way.

提交回复
热议问题