How to add a build phase in a project template?

后端 未结 2 998
自闭症患者
自闭症患者 2021-02-01 10:54

I\'m trying to add a Run Script Build Phase to a target in a custom Project Template for Xcode 4.

Does anyone have any examples, tutorials, or tips on how to do this?

2条回答
  •  旧时难觅i
    2021-02-01 11:12

    After quite a lot of trial-and-error I've worked it out. This is the extra key needed in the TemplateInfo.plist. This adds a script that will run after the other default build phases.

    Targets
    
        
            BuildPhases
            
                
                    Class
                    ShellScript
                    ShellPath
                    /bin/sh
                    ShellScript
                    # Just a comment
                
            
        
    
    

提交回复
热议问题