{"id":4329,"date":"2012-08-09T03:08:09","date_gmt":"2012-08-09T10:08:09","guid":{"rendered":"http:\/\/www.krunk4ever.com\/blog\/?p=4329"},"modified":"2012-08-09T13:02:13","modified_gmt":"2012-08-09T20:02:13","slug":"duplicated-xcode-4-4-1-target-fails-to-run","status":"publish","type":"post","link":"https:\/\/www.krunk4ever.com\/blog\/2012\/08\/09\/duplicated-xcode-4-4-1-target-fails-to-run\/","title":{"rendered":"Duplicated Xcode 4.4.1 Target Fails to Run"},"content":{"rendered":"<p>When I duplicated a working target today, I noticed Xcode would give me the following error when trying to run it in the simulator or device:<\/p>\n<p><a href=\"http:\/\/www.krunk4ever.com\/blog\/wp-content\/uploads\/2012\/08\/xcode-cannot-run-using-the-selected-device.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.krunk4ever.com\/blog\/wp-content\/uploads\/2012\/08\/xcode-cannot-run-using-the-selected-device-1024x523.png\" alt=\"Xcode cannot run using the selected device\" title=\"Xcode cannot run using the selected device\" width=\"584\" height=\"298\" class=\"alignnone size-large wp-image-4330\" srcset=\"https:\/\/www.krunk4ever.com\/blog\/wp-content\/uploads\/2012\/08\/xcode-cannot-run-using-the-selected-device-1024x523.png 1024w, https:\/\/www.krunk4ever.com\/blog\/wp-content\/uploads\/2012\/08\/xcode-cannot-run-using-the-selected-device-300x153.png 300w, https:\/\/www.krunk4ever.com\/blog\/wp-content\/uploads\/2012\/08\/xcode-cannot-run-using-the-selected-device-500x255.png 500w, https:\/\/www.krunk4ever.com\/blog\/wp-content\/uploads\/2012\/08\/xcode-cannot-run-using-the-selected-device.png 1068w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<blockquote><p><strong>Xcode cannot run using the selected device.<\/strong><\/p>\n<p>Choose a destination with a supported architecture in order to run on this device.<\/p><\/blockquote>\n<p>The target builds fine and I&#8217;ve made no changes since duplicating it. I made sure all the build settings are the same, including architectures and SDKs. I was baffled on what might be causing the error.<\/p>\n<p>After searching a bit, I found this post on StackOverflow: <a href=\"http:\/\/stackoverflow.com\/questions\/11673424\/xcode-4-4-unable-to-run-project\">Xcode 4.4 &#8211; Unable to run project<\/a>. The answer is hidden in the response by <a href=\"http:\/\/stackoverflow.com\/a\/11740369\/742682\">Martin Lockett<\/a>. The default product name Xcode gives to a duplicated target is &#8220;<em>AppName<\/em> copy&#8221;. Spaces are illegal in product names, so it was failing to run on any device because of that.<\/p>\n<p>After fixing the product name by removing the space, I was able run on both the simulator and device.<\/p>\n<p>I&#8217;m not sure if previous Xcode had this problem, why Xcode duplicates a project with a product name that makes it unrunnable, nor why Xcode doesn&#8217;t provide a better error message, but I&#8217;m glad I figured what was going on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I duplicated a working target today, I noticed Xcode would give me the following error when trying to run it in the simulator or device: Xcode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device. The target builds fine and I&#8217;ve made no &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.krunk4ever.com\/blog\/2012\/08\/09\/duplicated-xcode-4-4-1-target-fails-to-run\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Duplicated Xcode 4.4.1 Target Fails to Run&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[1466],"_links":{"self":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts\/4329"}],"collection":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/comments?post=4329"}],"version-history":[{"count":0,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts\/4329\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/media?parent=4329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/categories?post=4329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/tags?post=4329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}