{"id":16285,"date":"2016-11-07T11:54:45","date_gmt":"2016-11-07T16:54:45","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=16285"},"modified":"2016-11-07T11:54:45","modified_gmt":"2016-11-07T16:54:45","slug":"better-xcode-run-script-build-phases","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/11\/07\/better-xcode-run-script-build-phases\/","title":{"rendered":"Better Xcode Run Script Build Phases"},"content":{"rendered":"<p><a href=\"http:\/\/www.mokacoding.com\/blog\/better-build-phase-scripts\/\">Giovanni Lodi<\/a>:<\/p>\n<blockquote cite=\"http:\/\/www.mokacoding.com\/blog\/better-build-phase-scripts\/\"><p>The single most effective action you can take to improve your build scripts is to extract them into their own files.<\/p><p>[&#8230;]<\/p><p>Xcode will name every new run script phase as &ldquo;Run Script&rdquo;, but that can be quite confusing when you have more than one. Double click on the &ldquo;Run Script&rdquo; header to reveal a text field you can use to rename your phase.<\/p><p>[&#8230;]<\/p><p>The idea is to have a single script invocation in Xcode, calling a script that will then take care of executing the single scripts.<\/p><p>This technique will help you grow your script, change their order, etc. in a tidy and understandable way.<\/p><p>[&#8230;]<\/p><p>You can make your scripts output compilation errors or warnings the same way Xcode does. I learnt this a while ago <a href=\"http:\/\/briksoftware.com\/blog\/?p=120\">from this post<\/a>.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Giovanni Lodi: The single most effective action you can take to improve your build scripts is to extract them into their own files.[&#8230;]Xcode will name every new run script phase as &ldquo;Run Script&rdquo;, but that can be quite confusing when you have more than one. Double click on the &ldquo;Run Script&rdquo; header to reveal a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[30,1381,71,226],"class_list":["post-16285","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-mac","tag-macos-10-12","tag-programming","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=16285"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16285\/revisions"}],"predecessor-version":[{"id":16286,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16285\/revisions\/16286"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=16285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=16285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=16285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}