Xcode Debugger does not work on first app installation - xcode

Every time I install a fresh copy of my app on my testing device the debugger is not showing any output. Rebuilding the project solves it.
What could be the problem, or any suggestions how to explore this.
Thanks

After eliminating many options we found that the cause is the voip (Voice Over IP) flag in the UIBackgroundModes inside the info.plist causes this problem.
We have reported Apple about this.
Thanks for any help suggested.

Start by deleting the app from your device and then cleaning your derived data. Do a clean build (Command + Shift + K) and see if that helps.
You should also check your project scheme, by clicking on the scheme, Edit Scheme.... Then check for the debugger settings there.
To run your app, plug in your device, and hit Command + R. The debugger should appear in the bottom corner. If not, hit Command + Shift + Y (in Xcode 4) to bring up the console and debug panels.

Hello i have 3 ways to resolve that:
Check if The phone's name contain's an apostrophe if it has remove it and try again.
Disconnect your device from the MAC. Remove your development provisioning profile from your device, power down the device, wait a minute, power on, reconnect to MAC, and let XCode reinstall profile.
Before do this second way, if you have another device try it, to have sure if it's not from xcode, if it's not the device, try to reinstall xcode, if it's the device, return the device to default factory settings and try it.

Related

Trouble pairing Apple TV with Xcode

When trying to pair Xcode with my Apple TV it says
This device has been ignored in the devices panel.
I cannot continue development properly until this issue has been solved, however I cannot find an un-ignore button. Please help me, thank you!
Running the terminal command as described in other answers didn't work for me and the device kept being ignored whenever I re-opened Xcode.
My solution was to open Apple Configurator and go to Paired Devices on the About menu. From the window that appears hit the X to remove all the devices (I had the same device listed 6 times).
Then close Apple Configurator, launch Xcode and the Apple TV paired.
My setup was Xcode 13.4.1 / Apple 4K 2nd Gen / tvOS 15.5.1 / Apple Configuration 2.15.1
2022
While Window > Devices and Simulators is open on the Xcode, go to the upper menu with the back button on your remote and re-enter the Remote App and Devices menu to try to go back again. Try a few times. It'll show your device on the Xcode's Device window. Then click the "Pair" for the device. You’ll see a screen asking you to enter the six-digit code displayed on your Apple TV; enter the code to the Xcode's Device window. And wait for it. For a while device and Xcode will work for Preparing debugger support for your device. Keep your Mac device and Apple TV close until it's done.
Hope this will help someone.
Best.
I think I found the solution. I did a number of things so here are all of them, but the most important one is step 5:
Go to main menu in Apple TV
Quit Xcode
Go to the command line and type
defaults read com.apple.dt.Xcode.plist DVTIgnoredDevices
You should be able to see the AppleTV in question listed there.
NOTE: This will clear all of your ignored devices
. Still in the command line, type
defaults delete com.apple.dt.Xcode.plist DVTIgnoredDevices
Go to the Devices and Simulators window
On command line, type
defaults read com.apple.dt.Xcode.plist DVTIgnoredDevices
You should see something like "does not exist"
You should be able to pair the AppleTV now
2022
After testing some solutions and having no luck, try the next:
Restart the router
It's working now.
Try it.
I had exactly the same issue:
My solution was:
Remove everything from the ATV
perform the delete command from above
Reboot everything!
Try the pairing again
This did it for me.
For some reason, don't ask me why
Make sure you've enabled the "Show as run destination" option.
i tried all the solutions mentioned here - non helped, eventually i:
selected "Forget Device" from the apple tv
restarted the apple tv
closed the XCode
restarted mac
paired again and that worked
sometimes when you press |Pair| button in the Devices & Simulators window, after you key in the numbers, the screen will go back to "Pair" mode,
in order to bypass this issue, after pairing i restart the xcode (without unpairing or forget the device), and the device shows up as connected
I was having the same issue and none of the solutions above worked. Then I noticed that universal clipboard between my iPhone and Mac was also not working.
The solution for that was to toggle Bluetooth and Wi-Fi on/off on both Mac and iPhone (I have a feeling that it was more the toggle on Mac that helped).
Anyway, by fixing that issue, my AppleTV showed up paired and ready to use in Xcode (din't even have to re-pair).

Could not determine the installation package com.company.appName

I can't launch my app anymore on Android. The iOS counterpart seems to be fine.
The full error is:
ADB0000: Could not determin the installation path for package.com.company.appname.
'adb shell pm path com.company.appname' returned.
It was working. I pulled some changes from the repo, none of which should have affected any app properties. Actually it was initially launching, but I was getting some odd behavior within the app, so I uninstalled the whole thing off of my phone. Now I cannot launch it at all. What I could find about this error was that my AndroidManifest.xml might have a typo, but I couldn't find anything that stuck out. And like I said, there shouldn't have been any changes in there recently. Any help would be greatly appreciated.
Steps I have already taken:
1. Clean and rebuild
2. restart VS
3. delete obj and bin folders
4. search for solution on here and xamarin forums
UPDATE:
I just successfully launched it on another android device. So it seems to be a problem with my Pixel 2 XL. How do I make sure all traces of the app are gone so I can start fresh?
This usually happens when you have more than one user in an Android device (I still cannot figure out why is this).
As mentioned in the comment by using the adb uninstall full.package.name command it will uninstall the app.
But there's another way which does not require command line or nothing related to that.
If you go to the Settings -> Apps and Notifications on the Android device you will be able to uninstall it from there.
Let's use the UnoQuickStart.Droid app as example here. As you can see it's already in the same state as it was yours.
Once in the App details both Uninstall and Force Stop are disabled. But do you see those 3 dots image at the right upper corner? Click on it.
This will bring you a context menu with a single option "Uninstall for all users". You can click on it with confidence.
As expected, a warning message telling you what's gonna happen. Just click "Ok".
As you can see the App is not longer installed and you will now be able to install it again.
Hope this helps.-
As per apineda's instructions, using adb unistall com.company.appname fixed the problem. I was able to get to the ADB location by navigating through Visual Studio -> Tools -> Android -> Android ADB Command Prompt.
Before I did that, I looked at the App list for my phone, which listed the app, but apparently not installed for this user. The Uninstall and Force Stop buttons were disabled and several of the fields just said loading... or something like that.

Simulator in use and even restarting XCode doesn't solve it

I sometimes get a dialog in Xcode which states "Simulator in use." Restarting Xcode didn't help.
I have no Simulator Icon in the Taskbar to quit it and I have no running Simulator.
Is there any solution without rebooting?
I know some of these points to not adress your specific issue since you wrote restarting Xcode would not help you but I'll try to provide a full list of possible fixes for people who might stumble upon this one day.
Is the "Stop" Button in the left corner of Xcode still clickable ? ==> Click It
Try to reset contents & settings of iOS Simulator
Clean Build & Clean Project
Quit iOS Simulator (look at the Activity Monitor if there is still something running)
Restart Xcode
Restart Mac
This is all I can think of. For me most of the times I can resolve it by just restarting Xcode. As you wrote this does not work for you so maybe some of the other points of my list will help you.
Normally this happens when you terminate the iOS Simulator but not the debug session itself, which is why most of the times the "Stop" button in the left corner is clickable most of the times...
This dialog (and the state that triggers it) comes entirely from Xcode and not the simulator itself. This dialog will present itself if Xcode is already using the simulator from another workspace. For example, if you have three projects open at the same time and you do a Build&Run (eg: click "play") in one of them, you will get this dialog if you do a Build&Run in one of the other projects.

Couldn't register "Application" with the bootstrap server [duplicate]

I keep getting this error when launching my app on the iOS Simulator:
Couldn't register com.mycompany.MyApp with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
I've read other reports of this error and it seems there is no obvious fix for it (restarting the iOS Simulator, restarting Xcode etc..)
At this point here's a list of things I've tried:
Restarting the Simulator
Restarting Xcode
Rebooting my machine
Deleting my app's Derived Data, and Cleaning
Deleting the iOS Simulator App Support directory
Reverting to a 2 weeks old version of the app (which was working 2 weeks ago)
Deleting the application in the Simulator (by clicking-holding on it and hitting the X button)
Upgrading Xcode form 4.1 to 4.2, and running the app both in iOS Simulator 4.3 and 5.0
Nothing worked, I still get the same bootstrap error.. Any (and at this point I really do mean ANY) suggestion would be appreciated.
Edit: Just wanted to add that the app runs fine on a device. I only get this error on the simulator...
As the GDB said:
This generally means that another instance of this process was already running or is hung in the debugger
So find out it and kill it. ;)
I restarted the mac, and it run successfully.
Tip: Well, this may be not work sometimes, so I strongly suggest that you press cmd+. to make sure that you do have stopped the simulator (or device). I find that in most cases the simulator (or device) will not stop exactly when it crashes. I rarely met this issue again with pressing the cmd+. every time it crashes or even just normal exit. Hope this will be helpful. :)
I just closed my xcode & restart my device(ipad2) and it works for me :)
You can try this :: Couldn't register with the bootstrap Server
Another solution, go to clear the memory of the iphone simulator
Simulator > recovery content and setting
then run the program again.
i just change the identifier and the app can work again.
I had to change my bundle identifier finally
No matter you reboot all devices and cleanup all , it gets stuck hard in the debugger..
don't know how to clear it..
As I experienced, device (or simulator) restart does solve the issue,
BUT it would be better not to couse it.
Also my experience is that:
You can find the place of crash by cousing it. In such time developers usually press "STOP the running scheme" this could cause zombie process stuck in device.
BUT
if you press "COUNTINUE program execution", debugger will terminate the process, it will not become a zombie.
I had this error too and I noticed that it works for me if you close the simulator and stop the program and then change your company name.
I don't know why but it works for me.
I opened Activity Monitor and searched for my app name, and found another instance of it listed. I used Activity Monitor to quit that instance, and the problem went away for me.

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