What tools support editing project.pbxproj files?

前端 未结 3 690
广开言路
广开言路 2021-02-06 07:18

I want to edit project.pbxproj straight up using command line (for CI server script)

what tools can allow me to do this?

I used to use PlistBu

3条回答
  •  忘掉有多难
    2021-02-06 07:34

    project.pbxproj is an old-style ASCII property list file, too. So you can use /usr/libexec/PlistBuddy to edit it.

    Print some User-Defined key's value like this,

    # Get the key A83311AA20DA4A80004B8C0E in your project.pbxproj
    # LZD_NOTIFICATION_SERVICE_BUNDLE_ID is defined by me,
    # Replace key paths with your own.
    /usr/libexec/PlistBuddy -c 'print :objects:A83311AA20DA4A80004B8C0E:buildSettings:LZD_NOTIFICATION_SERVICE_BUNDLE_ID' LAAppAdapter.xcodeproj/project.pbxproj
    

    Set its value like this,

    /usr/libexec/PlistBuddy -c 'set :objects:A83311AA20DA4A80004B8C0E:buildSettings:LZD_NOTIFICATION_SERVICE_BUNDLE_ID com.dawnsong.notification-service' LAAppAdapter.xcodeproj/project.pbxproj
    

提交回复
热议问题