Xcode4: Attaching to MyApp

Ariejan de vroom

Ariejan de Vroom – 24 May 2011
175 words in about 1 minute

Today I imported an iOS project, originally written in Xcode3 into Xcode4. I ran into an issue that prevented me from debugging the app both in the iOS Simulator and on my own iPhone 4. When hitting ‘Run’, all Xcode would do is show the message “Attaching to MyApp”. The simulator and my iPhone both didn’t do anything, the app didn’t even get installed on the devices. The solution is quite simple. Xcode4 is a bit picky about the name of your project.

  • Go to Project > Build Settings
  • Search for “Product name”

Here you’ll find the names for the debug en release versions of your app. Now compare those the name of your project. Here’s what I found:

  • Project name: myapp-iphone
  • Product name: Multiple values
  • Debug: MyApp-DEV
  • Release: MyApp

The solution to the “Attaching to MyApp” problem is very easy. Simple update the “Product name” value to $(TARGET_NAME). After that, clean your app by pressing ⇧⌘K. Now, when you press ‘Run’, your app should start as you’d expect.

Ariejan de vroom

Ariejan de Vroom

Software Engineer • CodeRetreat Facilitator • Ruby, Go and C Programmer • Electronics Apprentice

At Kabisa, privacy is of the greatest importance. We think it is important that the data our visitors leave behind is handled with care. For example, you will not find tracking cookies from third parties such as Facebook, Hotjar or Hubspot on our website. Only cookies from Google and Vimeo are used in order to improve the user experience of our visitors. These cookies also ensure that relevant advertisements are displayed. Read more about the use of cookies in our privacy statement.