{"id":32674,"date":"2021-06-02T16:03:01","date_gmt":"2021-06-02T20:03:01","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=32674"},"modified":"2021-06-05T21:03:01","modified_gmt":"2021-06-06T01:03:01","slug":"slow-testing-with-xcode-12-5-and-big-sur","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/06\/02\/slow-testing-with-xcode-12-5-and-big-sur\/","title":{"rendered":"Slow Testing With Xcode 12.5 and Big Sur"},"content":{"rendered":"<p><a href=\"https:\/\/developer.apple.com\/forums\/thread\/679098\">OlKir1143<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/forums\/thread\/679098\"><p>When running app in iOS 14.5 simulator launch takes incredibly long time (more than 30 seconds). In comparison launching installed app in simulator - 2 seconds, launching app on the real device (iOS 14.4) - 6 seconds.<\/p><p>[&#8230;]<\/p><p>When running against simulator Xcode says &ldquo;launching app&rdquo;, &ldquo;attaching to app&rdquo;, and then &ldquo;running app&rdquo;, at the running app stage we get a ~30 second pause. debugserver at 100% activity at that time.<\/p><\/blockquote>\n\n<p>Via <a href=\"https:\/\/twitter.com\/cfihelp\/status\/1397649487192072211\">Chris Fish<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/cfihelp\/status\/1397649487192072211\"><p>I have noticed that our regular dev lifecycle has tanked significantly since updating to 11.3. It takes up to 10 seconds to attach the debugger. If I run the app without attaching the debugger automatically it flies.<\/p><\/blockquote>\n\n<p>This is reported as starting with macOS 11.3. I didn&rsquo;t see any problems with that version, but since updating to macOS 11.4 I&rsquo;ve seen incredible slowness testing my Mac code. Running an individual unit test used to be almost instantaneous. Now there is a delay of 10 seconds or so between launching <code>xctest<\/code> (i.e. when Xcode starts showing &ldquo;Testing&#8230;&rdquo;) and when the test actually begins running. Turning off &ldquo;Debug executable&rdquo; doesn&rsquo;t help. Sampling the process shows that <code>xctest<\/code> is waiting for the <code>access()<\/code> call, as it tries to load my test bundle. Meanwhile, the <code>tccd<\/code> process pegs the CPU.<\/p>\n\n<p>I guess the problem must be triggered by <em>something<\/em> in my project&mdash;or perhaps just its (modest though non-trivial) size&mdash;since it doesn&rsquo;t occur with a fresh project (though even that has high CPU use for <code>tccd<\/code>). I&rsquo;m not sure what TCC doesn&rsquo;t like. The test bundle and all the frameworks that it links to are code signed. The delay occurs on three different Macs, one of them a clean installation.<\/p>\n\n<p>Another Xcode 12.5 issue: the &ldquo;Run &lsquo;Test\/Class&rsquo;&rdquo; command (Command-Control-Option-U) is always disabled, even though Xcode shows the tests and I can run them by clicking the diamond.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/05\/24\/remaining-issues-in-big-sur\/\">Remaining Issues in Big Sur<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/05\/24\/macos-11-4\/\">macOS 11.4<\/a><\/li>\n<\/ul>\n\n<p id=\"slow-testing-with-xcode-12-5-and-big-sur-update-2021-06-05\">Update (2021-06-05): <a href=\"https:\/\/twitter.com\/handcoding\/status\/1399837883721261057\">Ashley Bischoff<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/handcoding\/status\/1399837883721261057\">\n<p>Just as an eensy correction to the quoted article&mdash;I believe that Full Disk Access may have been introduced in macOS 10.14 Mojave?<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/06\/04\/tcc-bypass-in-xcsset-malware\/\">TCC Bypass in XCSSET Malware<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>OlKir1143: When running app in iOS 14.5 simulator launch takes incredibly long time (more than 30 seconds). In comparison launching installed app in simulator - 2 seconds, launching app on the real device (iOS 14.4) - 6 seconds.[&#8230;]When running against simulator Xcode says &ldquo;launching app&rdquo;, &ldquo;attaching to app&rdquo;, and then &ldquo;running app&rdquo;, at the running [&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-06-02T20:03:05Z","apple_news_api_id":"09ebb649-8ff5-4799-8471-3c61d402064a","apple_news_api_modified_at":"2021-06-06T01:03:04Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAg==","apple_news_api_share_url":"https:\/\/apple.news\/ACeu2SY_1R5mEcTxh1AIGSg","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":[131,317,30,1891,71,1959,268,1960,226],"class_list":["post-32674","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-lldb","tag-mac","tag-macos-11-0","tag-programming","tag-simulator","tag-testing","tag-transparency-consent-and-control-tcc","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32674","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=32674"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32674\/revisions"}],"predecessor-version":[{"id":32723,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32674\/revisions\/32723"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=32674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=32674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=32674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}