Could not launch console app with xCode 4.4 - xcode

I have a project with two targets -- an iOS app and an OSX console app. The latter was created using Xcode File->New Target and selecting "Command Line Tool". This console app is used to prep a default database needed by the iOS app -- using CoreData. This has been working fine until I upgraded to Mountain Lion and xCode 4.4. Now when I try to run the command line tool I get a "Could Not Launch -- permission denied" error. I have tried playing around with signing certificates, to no avail. Interestingly if I create a new "hello, world" command line tool in a new project it works just fine -- and it is not signed at all.
I checked the file and it has -rwxr-xr-x permission. In the debugger the app fails on startup even before it tries to access the moms. If I try to run this outside of the debugger at the command line, it ends with a kill 9 message.
Any ideas would be greatly appreciated.

I just had the same problem in my iOS/Mac project. None of the above suggestions helped but I managed to find the correct answer so I'm sharing for future ref.
I had to set code signing to Don't codesign for the MacOSX target. The rest works fine no matter if your deployment target is set to default or not. Don't forget to set your Base SDK to Current OSX and supported platforms to "x86_64 i386".
HTH! Cheers

Also you can get "Could Not Launch -- permission denied" error when trying to launch app on device with password which not unlocked at launch time.

Found the answer. On the Info page I had to change OS X deployment target from Default to 10.8. Default I guess no longer defaults correctly. Anyway it now works.

I also saw this error message when attempting to run a newly created Cocoa app target. The problem was that I had created my app target in an iOS app project, but instead I needed to create a subproject and create the app target in the new project.

Ran into this when I tried to run before creating and installing the provisioning profile.

in my case, I changed deployment target to 10.8(previous is 10.6),and it works.

Related

Message from debugger: unable to attach error for osx app

I have been building mac app on my mac mini and it always worked well but today i faced this error, searched a lot but no luck.
Message from debugger: unable to attach
What i tried:
Clear derived data
Quit Xcode
Restart machine
installation directory set to blank and also to /Applications
Tried Skip Install No / Yes
Using developer Signing certs
M using only Developer certificates and not provisioning profile to sign my cocoa app
Xcode 8.2
OSX 10.12.1
Please help :)
This is what fixed it for me, perhaps it will help others but I do realize the question was for 8.2. I had it set to Xcode 9 "New Build System" disabling this and switching to "Standard Build System" in the Project Settings under the File Menu. I had tried all the other things like killing DerivedData, clean build, restarting Xcode. I also verified that my dependent libraries were set correctly. The only thing that worked was disabling new "New Build System"
I just had this problem today. I have little demo code in a mac project(created with Xcode 9.4). This error just started to occur after I upgraded system to macOS Mojave 10.14. However, in Xcode 10 this project runs no problem(without changing anything). If you can use Xcode 10 it will probably be fixed.
Unfortunately, the above solutions didn't work for me (although I am sure they work for some people).
Here is what worked for me, in case this helps anyone else:
Close Xcode
Open Xcode and Create a new Xcode project
In the iOS template, select Single View App then click Next
yes, I know you are trying to get a macOS app attaching to the debugger :).
Give the iOS app any product name and organization identifier you would like and click Next
Create the new project anywhere you would like (I saved it to my desktop)
Build and run (cmd + r) the iOS app on a simulator like the iPhone 8 (starting a simulator and running the iOS app will take a little time, so have patients)
After the iOS app runs in the simulator, click to stop it from running (the stop button is next to the run button)
Open your macOS app that you are having trouble connecting a debugger to, and build and run it (cmd + r)
This, for some reason, allowed me to connect to the debugger with my macOS app...
Xcode version: 10.1, macOS Mojave version: 10.14.2

Getting "Cannot verify client. (3000)" when trying to upload archive from Xcode to itunesConnect

Just updated to Xcode 7.1 and getting this error.
Was able to upload fine using 7.0.1
Hmmm, well a restart of Xcode, a fresh clean, build and archive seems to have fixed it.
If you encounter this error, you have two options:
Option A - Engage in an activity that takes a minute or two. Could be any of the activities described in the other answers, like re-install XCode, renew certificates, do a new build from scratch after clearing caches. Or simply go get a coffee.
or
Option B - Do nothing at all for a little while.
Then, try again. If it doesn't work, repeat.
Just updated to Xcode 7.1 and getting this error. Was able to upload
fine using 7.0.1
same here - restart, clean build, archive and upload was successful.
Same problem here. Grabbing a cup of ☕️ worked for me.
Exporting the app as an .ipa and uploading via Application Loader 3.0 worked for me. (Restarting xcode, cleaning, and re-archiving did not.)
I first tried to upload and got the "cannot verify client"-error.
Then i did a validate, which was successfull and then again a upload which also was successfull. No restart etc. needed.
Same problem here. Clean build and deleting project caches worked.
Had the same issue and tried everything including Application Loader but still would not load into iTunes Connect. I'm running XCode 7.1.1 and OS X El Capitan.
I also have Avira (free version) installed and once I disable it, everything went through. Hope this helps someone.
Stackoverflow has been my savior and goto source for Obj C and now Swift!!
I had this problem for all night. Got 🍵 ☕️🍺🍼 but didn't work.
Solved my problem only with:
Switching lan to wifi connection
Uploading App by Application Loader
Wasn't useful but i saw than in Xcode uploading start works as well after connection switching, so maybe was a connection my problem.
Clean project not work with me in XCode 7.2. But I solve the problem by export Archive and using Application Loader.
Step:
Archive you build.
In Organizer: Chose your archive.
Export "Save for iOS App Store Deployment".
Open Application Loader (Xcode -> Open Developer Tool -> Application Loader: Download it if you don't have).
Select "Deliver your App" -> Select your exported ipa.
Upload.
=> Done
I've been having this problem since Xcode 7.1 (for more than a month). I did everything I could trying to solve this: restart Xcode, clean project, clean build folder, build with a device connected, reinstall Xcode multiple times, even formatting the whole disk and starting from scratch. None of this worked.
During this time my colleague was always able to upload the very same builds to App Store without any problem.
Curiously, what solved this problem for me was disconnecting my non-Apple wireless mouse.
I found this out when I tried to submit an app from my home computer and got the same error. I disconnected the mouse dongle, tried again and it went through.
I've verified this three times both on my home (MacBook Pro 2013) and work computer (Mac Mini 2014).
This leads me to believe that during the app submission process Apple may check if your environment is purely made by Apple or not, and may block your submission based on that. This would explain the "Cannot verify client" message.
For what it's worth: I got this error when my startdisk was almost full (less than a few hundred MB left).
Cleaning up some space and re-submitting resolved this issue.
Experiencing the same problem. Tried a number of the suggestions above. Ended up using the Application Uploader instead.
Xcode > Open Developer Tools > Application Loader
From the rest of the answers it seems that a lot of different things "resolve" this issue. Here are the particulars of what solved it for me:
The iPad had to be plugged in.
The iPad had to be signed in (i.e. not locked).
After I satisfied those two conditions, it validates and uploads reliably. If either one isn't done, I am not able to validate or upload to iTunesConnect and I get the Cannot verify client (3000) error.
You can use Application Loader to upload your build and solve it!
Download Provisiononing Profiles of app on Apple Developer,
Quit and restart Xcode,
Run Provisiononing Profiles by Xcode,
Open app again,
In General -> get "fix" at Identity.
You can Archive and Upload to Apple Store
When it fails two times in a row, choosing "Validate" and after that "Upload to App Store" does the trick for me.
I tried most of the things here, but what finally did it for me was using the Application Loader instead of trying to upload my app from the Organizer.
Once I did it from the Application Loader I got an error message related to this: ITMS-90535 Unable to publish iOS app with latest Google Signin SDK, which was the real cause of the error.
I remade the app with "App Store" provisioning profile. Earlier it was "Ad-hoc" provisioning profile.
I submitted the app from "Application Loader" instead of traditional "Organizer".
Above two steps enabled me to submit the app to iTunes Connect for beta testing also.
There is always an element for surprise whenever apple releases an updated XCode.
After trying a few things, this is what worked for me:
Just before uploading your executable, validate it, you then have a modal where you get to pick your binary. On the right, there's the name of the provisioning profile used. There's an arrow next to it.
Click on the arrow which opens the finder to the location of the provisioning profile.
Delete this file.
Restart XCode
Clean
Rebuild/Archive
Upload

Permission Denied when running Mac app after upgrading to XCode 4.4

I had a working Mac application until I updated to XCode 4.4 and Mountain Lion. Now the application still compiles, but when I try to run it I get an error message.
error: failed to launch '/Users/username/James/mac/Browser/trunk/Browser/DerivedData/Browser/Build/Products/Debug/Browser.app/Contents/MacOS/Browser' -- Permission denied*
Can anybody explain why I might be getting this?
I found this on an iPhone 5 (iOS 6.0) newly set up for development. I had to manually launch the app on the phone, and it said "Are you sure you want to launch this app signed by this devloper?" Once I approved that, the "permission denied" went away and it now launches from Xcode.
Unlock the Device
Try simply unlocking your device before running on it. I was stumped by this very same issue. Upon building and running with no changes to OS, environment, code, etc., I was receiving the error.
Similar questions have been asked here and here, but were not helpful in this situation.
This is caused by an entitlement (and, presumably, having the wrong kind of certificate for it).
If you have the sandbox enabled, and try to sign with a Developer ID certificate, your application will crash on launch (as of Lion—I haven't tried this on Mountain Lion).
If you have iCloud enabled, and try to sign with a Developer ID certificate, your application will not launch at all—in Xcode, you'll get the error message in the question, and in Finder, the application will launch ever so briefly and then get SIGKILLed.
Presumably, there is a right kind of certificate with which one can sign an app in order to be able to test with a sandbox and maybe even iCloud that you can obtain if you have a Mac Developer Program membership. A Developer ID certificate is not that kind of cert.
(That solves my problem, anyway. Dennis, what kind of cert were you trying to sign with?)
Open the organizer and make sure you're mac is in developer mode.
Also check your gatekeeper settings.
The device is seeing the app as an "unauthorized app downloaded from the web" for lack of a better description. Go into Settings > Security & Privacy, and at the bottom, allow applications downloaded from Anywhere.
Throwing a few thoughts on the wall:
Are you perhaps building on an external disk? Some drives get special permissions (like the "ignore permissions" checkbox), or maybe have ACLs set in a weird way. Tried building on internal startup disk?
Are you code signing? Have you tried just turning that off, to see if there's a bug in code signing or entitlements? Not the first time a new codesign tool has a bug.
Have you tried using xcode-select and updating any command line tools that are installed to make sure they all match the version of Xcode used?
Do you have any shell script build phases or the likes that might be editing the application after it's been signed, thus breaking the signature?
Have you checked if your hard disk is full or there's a (broken?) symlink somewhere in a path, or a volume name that has been unmounted?
i am sure this is long been figured out, but I have been getting the Permission denied and it turned out I had to add my laptop to the provisioning profile. I had recently reimaged my machine and in doing so the provisioning profile was no longer valid for that machine. It worked fine until i enabled iCloud. That's when the permission denied started.
Check the organizer in XCODE, click on the devices tab and click on your machine on the left. Check to see that the UDID it shows is listed in the devices section in your mac developer portal.
The short answer is when you get this error message, there is no valid development provisioning profile in the built application.
That alone won't solve your problem! There are a number of common causes of this:
You've moved to a new machine and haven't installed the provisioning profile in Xcode. Also see below
You've moved to a new machine and it's not in developer mode OR not added to the provisioning profile
For both of these, let Xcode regenerate it, or do it yourself in the Member centre... You can validate the causes is something to do with your provisioning profile by running Console and filtering on taskgated where you can see which provisioning profile it is trying to use (it will pull the one embedded in the application first, then try to pull from any installed on the Mac).
Make sure you check in your build settings that the right one is being used for Debug builds. Simple steps that normally resolve (XCode 5)
Go to member centre and create a new development profile
Select the app and certificate
Validate that the machine you are using is in the list of machines to be included in the profile, tick the box
Generate the certificate
Download it, and drag it over the Xcode icon in the doc
Go to the Build Settings tab in your target and set the provisioning profile to the one you've just downloaded
You haven't configured your iCloud/APN/GameCenter entitlements correctly.

Failed to Attach to Process ID Xcode

Anyone has experienced this problem?
Yesterday I still can run my app in simulator but now I cannot run my app since Xcode prints this error in console:
error: failed to attach to process ID <ID number>
I have tried to reinstall, do this post and create new project but returns no luck.
Anyone can resolve this issue?
I use Xcode 4.5 Preview 2 and try to run iOS simulator 6
Resetting the content and settings in the simulator worked for me. This is available in the "iOS Simulator" menu.
go to the Product menu and find the Edit Scheme menu there.
While in Edit Scheme window, select the "Run" option on the left hand side of the screen and then on the right hand side, change the debugger from LLDB to GDB.
I experienced the same problem, and after a while I found out that it was due to the fact that my XCode project included a Folder Reference to a folder named Resources.
It seems that XCode doesn't like that name.
Just removing the folder reference or renaming the folder solved the issue.
TWO METHODS
Method 1 : Inside the folder Application Support -> iPhone Simulator -> In the each simulator version of iOS -> Applications -> Delete all the files present here.
Now go to Products -> Clean
Now run it on any simulator and it will work.
Method 2 :
Step1: ping
$ ping localhost
This should return something like
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.028 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms
...
If this works, this answer won't fix your problem, try something else.
If ping return something else for example: ping: cannot resolve localhost: Unknown host something is screwed up with your /etc/hosts file, go to Step 2
Step2: Check /etc/hosts
Check that the top of your /etc/hosts file looks like this
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
If it doesn't have these entries in the file, enter them at the top of the file, flush the dns cache using $ dscacheutil -flushcache and go back to Step 1, otherwise continue to Step 3.
Step3: Correct File Format: It should be unix or LF *
$ file /etc/hosts
This should return: /etc/hosts: ASCII English text
If it returns something like /etc/hosts: ASCII English text, with CR line terminators then the file is in the wrong format and is likely being ignored.
Change the file line endings to unix or LF using your favorite text editor.
In Sublime Text 2 this can be done throught the view menue: View > Line Endings > Unix
Flush the dns cache ($ dscacheutil -flushcache) and go back to step 1
Similar to fundtimer's answer, the local hosts file seems to have been the culprit.
I had to change my /etc/hosts permissions back to the default after an inadvertent change:
sudo chmod 644 /etc/hosts
After that, simulator/LLDB worked for me.
This is an old topic, but I believe things have changed a bit for the latest version of macOS.
I've stumbled on the issue while trying to run an UI test suite for an iOS app in the simulator on macOS Mojave Beta and Xcode 9.4.1.
Turns out, on macOS Mojave the codesign tool (which is a part of the OS itself and not a part of the Command Line Tools or Xcode) signs processes into a hardened runtime environment which includes runtime code signing enforcement, library validation, hard, kill, and debugging restrictions. This, together with the System Integrity Protection in macOS Mojave, prevents the lldb debugger from connecting to the running target.
To resolve this, you have to options:
An obvious one, probably, is just to use Xcode 10. It does seem to handle the connection gracefully.
Reboot the OS into the Recovery Mode and turn off the System Integrity Protection from the Terminal with csrutil disable. The debugger then connects happily.
I've spent quite an amount of time banging my head on this and was able to resolve it all after reading the following article: http://www.lapcatsoftware.com/articles/debugging-mojave.html
Just my two cents. Hope this helps someone.
I had somehow removed or deleted records from my /etc/hosts file and I got the same error.
You should check whether you have in your /etc/hosts file the line "127.0.0.1 localhost".
This helped me!
I know this is an old question, but it came up first for me when I did a google search for "failed to attach to process ID". I'm using Xcode 7. Happened after iOS9 was released and I had updated my swift app for swift 2.
Deleting my app in the simulator and doing a new build and run cleared it up.
I've had the same problem when debugging on the device. The app crashed on start but didn't appear as a running process.
My solution is to use some process viewer app (e.g. System Status or similar). Find your stale app and then find the parent process id which usually is debugserver.
Go on Xcode, Product -> Attach to Process -> By process id and attach to the debugserver process PID. Wait a second and then press the Stop button.
The stale debugserver and app processes disappear.
(When using the simulator, the equivalent would be to use the terminal, ps, and kill the App process. Haven't tried that, though).
I just removed the application from the simulator (just like you would on an actual device), and when I re-ran it everything worked fine.
I have also same problem and for me the solution is :-
Just delete the app from the Simulator and then clear and Run the project.
May it help also to someone else.
I fixed this problem by removing Xcode Derived data contents.
In finder press SHIFT+CMD+G and type below path and remove all data inside DerivedData:
~/Library/Developer/Xcode/DerivedData
Also reset simulator builds
~/Library/Application Support/iPhone Simulator/6.0/Applications
I just posted this on the Developer Forum. It was a simple solution and may help someone here:
I had exactly the same problem: when using any current version of Xcode 4.xx and the LLDB debugger, plus any version of the Simulator, XCode consistently crashed with 'failed to attach to process ...' My only resolution was to switch to the GDB debugger. This was disappointing since I really wanted to try the new, robust LLDB in XCode 4.6-DP.
And then I remembered; I had changed my network/server host file at ...etc/hosts some time ago to accomodate several Apache2 server virtual hosts, i.e., I removed the line:
127.0.0.1 locahost
That was it. Removing that line, XCode crashed on attaching to the Simulator with LLDB.
Restoring that line, XCode worked just fine with LLDB and the Simulator.
Anyway, this may not be your problem but it's worth exploring. As far as I'm concerned, it's a serious undocumented bug.
In my case the solution was different: the run mode was "Release". Changing to "Debug" fixed it. Xcode 4.5.x had no problem with it.
The issue for me was caused by a pretty stupid mistake: I created a new target for my project by duplicating an existing target and forgot to change the Bundle Identifier in the target's info.plist file.
Above answer really helped me.
https://stackoverflow.com/a/12819757/1752988
Because in my XCode I used story board and custom view controller. and in its warning list that I saw some of the nib files are missing. I was miss leaded by seeing that. However, I saw this answer,
and even though I didn't like to reset my App simulator content, I did it and it really worked for me.
And also Changing the Debugger from Product -> Scheme -> Edit Scheme (Run) from LLDB to GDB didn't work for me either.
P.s.:- Pardon me,I added this answer as a support comment to above, as I don't have 15 reputation upvote the above answer or 50 points of reputation to comment on above.
I solved this problem by quitting XCode and Simulator. Reopen the Project. Done.
The following worked for me on iOS 9.1 :
Just uninstall the app from the simulator
Quit the simulator (Cmd+Q)
Clean your Xcode project
Run on simulator
Note: No need to reset the simulator.
I am working on Ionic 2 application, I am new to this and even Xcode and simulator.
Initially my app was working on simulator but after some time it start generating error like-
xcode error: failed to attach to process id
I searched for, tried all above answers but my issue was not resolved.
Then I updated (Ionic, npm, cordova) my machine setup-
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68
******************************************************
After this I just run a command from my application home directory
ionic run -l
ionic build ios.
imported xcode changes to xcode.
Reset content and setting as-
clear product from xcode,
Run Xcode and now it is working on simulator.
Happy to see this!!!
So many answers to this and I didn't see what I believe is the correct one. It's an issue with authorization. Type this in the Terminal:
sudo DevToolsSecurity -enable
On Xcode 9+ do the following:
Go to the Xcode menu: Product-Scheme - Edit Scheme and under Run tab be sure that the Debug Executable checkbox is checked! That's it!
Just reset content and settings of iOS simulator and then clean code by pressing command+shift+k keys to clean code.This worked for me
As lame as it is, restarting my computer was the only solution that worked. I tried switching from LLDB to GDB, resetting the contents of the Simulator, and restarting Xcode. The only thing that worked was restarting my computer, reopening Xcode, and re-running the app.
I had the same problem. I did some combinations of answers given to make it work. :)
clean the Build Folder by clicking "Product" in the MenuBar. while pressing the Alt-key click on "Clean Build Folder". Now restart your xcode and simulator.
Now it should work. if not, also try changing bundle identifier and Simulator "Content Reset" and then restart xcode and simulator.
Ran across this today. I accidentally removed my Launch images from my Target Settings.
try to do next steps:
Go to Product/Scheme/Edit Scheme then select Run section.
Select Info Tan and set Debugger None.
Run project. It must be working (without debugger)
Go back to Edit Scheme and selecet debugger LLDB
Run project. It is working.
Maybe additionally you need to delete derived data and do Product/Clean
Do you have multiple users logged in to your machine? I have "personal" and "work" accounts on my laptop. I got this error when I was trying to debug from my personal account, but I had left the simulator running in my work account. Quitting the simulator in the other account fixed my problem.
and another one for the record: (none of the suggestions worked for me)
Mountain Lion: XCode 4.6.3
I moved the whole Application to Trash and deleted following other folders
/Users/[USERNAME]/Library/Developer
/Users/[USERNAME]/Library/Caches/com.apple.dt.XCode
/Users/[USERNAME]/Library/Application Support/iPhone Simulator
reboot System and reinstall XCode
Also had same problem today. i was using Xcode 4.6.3. i closed my project and open it in Xcode 5 and it is running perfect.
Strange but True

Xcode 4 Error: Error Starting Executable

I ran into problem with testing my app on iOS and Xcode when I am uploading it to my actual devices (iphone and iPad), and I'm wondering if someone knows the issue and can help me out:
Normally when I build my app on my devices, the app is installed and launched on my devices. But as I am preparing for submitting my first app I was testing around and changing the Bundle Identifier, App ID, and Development Provisions (so the issue may have something to do with it), and now, when I try to build my app on my devices, although it's installed on my devices fine, Xcode will not launch the app anymore. Instead, I got this error message:
Error Starting Executable.
Error launching remote program: No such file
or directory.
Does anyone know what the issue is? And What is this derived data folder about?
Much thanks!
I have also faced that problem. I have closed, restarted Xcode; deleted the application from device and reinstalled it again, then the problem has gone.
Running App from a Clean Slate
For me the problem did not resolve until I did the following in this order:
Delete the app from the device (Do this before trying to debug again)
Quit XCode (Don't just close the project)
Delete the app build folder (example path: /Users/myusername/Library/Developer/Xcode/DerivedData/MyProject-fhkaamuyvqhubaezinqbmxbnaufd/)
Restart XCode
Finally -- Try debugging again on the iOS device
The app build folder of step 3 refers to your app's build folder that is a child of "DerivedData". To find this you can reveal your app in finder, then backtrack until you get to "DerivedData" folder and delete the folder above that like "MyApp-crazylongweirdletters". Without this step (3), I could not debug, so this is a critical step and you must quit XCode before you do this step.
For some it appears simply restarting XCode does the trick, but not for me.
I only post this answer because the earlier answers did NOT work for me. Hopefully others banging their heads will find this and get a sigh of relief. :)
Notes:
The issue started happening for me when I modified the bundle id of the app.
My code signing is and was correct. My provisioning profile was the "Team Provisioning Profile" which should work for any app id (default for "iPhone Developer" automatic profile selector).
I was doing a DEBUG build (not release / distribution).
You cant debug (start from Xcode) an application signed with a distribution profile if I remember well... And then you get such messages, gdb failling to attach to process.
I finally found my error!
I was playing around with my info.plist file, and I changed the Executable Name and Bundle and Bundle Display name! As soon as I changed those back to the Defaults (EXECUTABLE_NAME, PRODUCT_NAME, PRODUCT_NAME respectively) it worked perfectly.
Delete the app from the device (tap-and-hold then delete) and try again.
For me, none of those worked. Same error, but different solution.
My problem was cause by me accidently changing the "Deployment Target" (ios version) to a version higher than what was on the phone I tried to run the code on.
The fix was simple - drop the deployment target to below or equal to the ios software version on my phone :)
I got the same error by not having my code signing correct.
Go to your project > Targets > Build Settings > Check code signing for debug state.
I stumbled upon this as a solution to another issue whch was a warning when trying to build an app on a new 4.3.5 device.
If i set the profile to distribution I do not get a warning message when building the app, but the debugger will attach to the device.
If i set the code signing to the distribution profile, i get no warnings in the build process, but the debugger will not attach. So the answer above about being signing based seems to be correct. This might also only be an issue on newer 4.3.5 devices with xcode
Product -> Clean in the menubar
This error some times happen due to incomplete "Restore" or "Sync" process of your device which keeps the .app files locked up.
What I did I had to jailbreak my device to go find the app under /User/Applications/XXXXX-XXXX-XXX/ and phisically delete the .app
For one of the apps it worked and for other one I realized it just does not run GDB automatically so the error message is totally misleading, so I set the GDB to manual and it worked and did not give me that error, but of course I have to run the app manually for the debug session to start.
It also may have required some other stuff that I did before like checking the provision profile, but this was the last step that made it work.
Before this I tried all the solutions did not work for me, and obviously simply deleting the app by holding down your finger on the screen did not work, as it removed the icon but all the files were still there. ( Since it was a development app not a downloaded App Store app )
had same problem,
quit the XCode...delete app from device...run the program again..
i solved that way..one of my friends had to restart the device.
I have the same problem. I solved it by changing the project's directory name and then launching the app again.
I had this problem on a recently restored device where my in-development apps had not been reinstalled—they were showing up on Springboard as "Waiting" to be downloaded from the App Store. Deleting the app from Springboard fixed the problem.
I've faced this issue since yesterday on two different devices, both iOS 4.x. Deleting the DerivedData folder, deleting the app, restarting the Xcode, and cleaning the code did NOT work. Repeating all the steps, in addition to rebooting the device fixed it for me.
Here I am posting an update to the issue. Might be helpful for someone with the same problem. I have Xcode 4.4 and launched it on a device with iOS 5.0 . If Xcode doesnt have the 5.0 simulators

Resources