{"id":31981,"date":"2021-03-23T14:57:35","date_gmt":"2021-03-23T18:57:35","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=31981"},"modified":"2021-03-23T14:59:35","modified_gmt":"2021-03-23T18:59:35","slug":"xcode-tips","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/03\/23\/xcode-tips\/","title":{"rendered":"Xcode Tips"},"content":{"rendered":"<p><a href=\"https:\/\/www.jessesquires.com\/blog\/2021\/03\/22\/xcode-tips-for-everyone\/\">Jesse Squires<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.jessesquires.com\/blog\/2021\/03\/22\/xcode-tips-for-everyone\/\"><p>I started saving links and planned to add a new &ldquo;Xcode tips&rdquo; section to my <a href=\"https:\/\/github.com\/jessesquires\/til\">TIL repo on GitHub<\/a> to reference later. But as I started, I realized that the resulting markdown file would not be easily discoverable or shareable. I thought, wouldn&rsquo;t it be nice if the iOS and macOS developer community had a single place to find and share Xcode tips?<\/p>\n<p>So, that is what I did instead! Say hello to <a href=\"https:\/\/xcode-tips.github.io\">Xcode Tips<\/a>, a resource for the community to find <strong>and share<\/strong> their Xcode workflows, tips, tricks, and optimizations. The code for the site <a href=\"https:\/\/github.com\/Xcode-Tips\/xcode-tips.github.io\">is on GitHub<\/a> under the <a href=\"https:\/\/github.com\/Xcode-Tips\/\">Xcode-Tips organization<\/a>.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/www.noodlesoft.com\/blog\/2020\/08\/24\/a-couple-of-random-xcode-tips-to-speed-up-your-builds\/\">Paul Kim<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.noodlesoft.com\/blog\/2020\/08\/24\/a-couple-of-random-xcode-tips-to-speed-up-your-builds\/\">\n<p>Looking at my build logs in Xcode (which helpfully show the time for each step), I noticed that code signing was taking up a significant amount of time. Around 3-8 seconds each occurrence, even for standalone binaries. I have quite a few of these as well as frameworks so that time adds up. Note that for debug builds, I had the <code>&mdash;timestamp=none<\/code> option set so that was not the culprit in this case.<\/p>\n<p>Poking around, I came across this <a href=\"https:\/\/developer.apple.com\/forums\/thread\/66418\">thread<\/a>. While I didn&rsquo;t have the main problem described there of duplicate certificates, buried in that thread was the following advice: trim <tt>~\/Library\/Preferences\/com.apple.security.plist<\/tt><\/p>\n<p>[&#8230;]<\/p>\n<p>Apparently, there&rsquo;s a hidden setting in your project.pbxproj file for copying frameworks where you can specify whether headers get copied over. This is not exposed anywhere in Xcode&rsquo;s UI, as far as I can tell. It&rsquo;s also a mystery why it gets set on some targets and not others. The only way to enable\/disable this is to edit the project.pbxproj by hand.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/mjanuszewski\/status\/1374434141672853508\">Micha&#x142; Januszewski<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/mjanuszewski\/status\/1374434141672853508\">\n<p>TIL: if your Xcode freezes a lot - unpair all devices (Window\/Devices and Simulators)<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/03\/19\/setting-macos-defaults-via-script\/\">Setting macOS Defaults via Script<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Jesse Squires: I started saving links and planned to add a new &ldquo;Xcode tips&rdquo; section to my TIL repo on GitHub to reference later. But as I started, I realized that the resulting markdown file would not be easily discoverable or shareable. I thought, wouldn&rsquo;t it be nice if the iOS and macOS developer community [&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":"2021-03-23T18:57:38Z","apple_news_api_id":"6bc3b995-84ad-46d9-a25d-03b3d40755f6","apple_news_api_modified_at":"2021-03-23T18:59:39Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/Aa8O5lYStRtmiXQOz1AdV9g","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":[466,649,30,1891,71,226],"class_list":["post-31981","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-codesigning","tag-esoteric-preferences","tag-mac","tag-macos-11-0","tag-programming","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/31981","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=31981"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/31981\/revisions"}],"predecessor-version":[{"id":31983,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/31981\/revisions\/31983"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=31981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=31981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=31981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}