UITextField in iOS7 simulator do not take any input from mac keyboard - uitextfield

UITextField suddenly do not take any input from mac keyboard, However I am able to use the virtual keyboard coming up on UIView on iOS7.0 simulator.
Has any one resolved this issue before?

In simulator menu:
Hardware -> Keyboard -> Connect Hardware Keyboard
helped me with this problem

I reset the iOSSimulator, its contents and settings and quit and relaunched the iOS-simulator. it worked.
This exactly happened when I updated the code from SVN.
I guess its always a good practice to clean the code, relaunch the simulator when ever updating the source code from SVN especially with Xcode5.

This looks like a bug in the simulator.
Steps to reproduce (and fix)
Open simulator and for example Safari
Start typing along and it will work fine
Use CMD + LEFT or RIGHT arrow to rotate the device to landscape
Try typing using the mac keyboard and it will not work
Press and release the CMD key once and the keyboard is working again
I'll file a bug report with Apple now.

Restart of simulator worked for me.

If your programme unable to take input from mac keyboard then perform the following steps:
Open the simulator
Go to hardware option in Menu
Choose Keyboard> Connect Hardware Keyboard
Shortcut
command+shift+K

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).

Destination toolbar disappeared on XCode 6.4

Today in the morning I tried to compile my project to run in my device and I found the destination toolbar disappeared and I cannot choose my IOS device or IOS Simulator device as target. (I can do it in the Product/Destination Menu)
After some research I found the >> at the right on the screen and when I pushed a Scheme option appeared but it is disabled and I can't enable again.
This is what I tried with no success:
Open an old project to see if the problem was in my project
Create a new project (with Swift and Objective C but I don't think this make any difference)
Restart my computer
Hide and show the toolbar (View menu/Hide Toolbar and the View menu/Show Toolbar)
I tried all the previous options with the device connected and disconnected
I have installed the IOS Simulator 8.4 (when I run my project it runs in the last selected simulator) and XCode 6.4.
Looks like Xcode hides that menu when the window is a certain size. I have to make my window quite large before it comes back.
Not a fix as such but you can work around it using the menus: Product > Scheme and Product > Destination
You're probably running into the same issue I am. Like #BrandonWilliams said in his answer, it appears again if the Xcode window is wide enough. The underlying cause, for me at least, seems to be that in this build of Xcode (6.4) running on El Capitan beta 2 (with Xcode 7 beta installed), I am seeing duplicate simulators for iOS 8.4. And since there are two of the same version, the Schemes dropdown shows some sort of long GUID next to each one, causing the Scheme dropdown to be quite large:
I came to SO looking for an answer but realized that I had seen this issue before.
So the problem is basically that auto layout sucks (I mean it is not working properly in Xcode 6) and on El Capitan, the destination toolbar is for some reason hiding instead of collapsing properly. So when your Xcode window is narrow, the destination toolbar disappears.
But, if you expand the window far enough, it shows back up again.
In case you can't tell, in the first screenshot, the window is about 1241 pixels wide and in the second screenshot the window is 1541 pixels wide.
Go to Product then Destination and choose at which simulator or device you want to test your build.
I'm running with same problem. You can select device or change scheme using below steps:
Select Product from menu
Select Scheme or Destination
Select required Scheme option or Destination option
Alternative Solution:
The only solution is to use Xcode 7 or above. I've installed Xcode 7.1 and found Scheme/Simulator list available. Refer screenshot.
It seems that Xcode 6 or below doesn't support OS X El Capitan.
I am still seeing this problem in Xcode 7.2 on iMac with resolution 1920x1080. Resizing the XCode windows dens't help. I can have the menu bar back if I push the green button and go to full screen mode. But that's pretty annoying. This is how I finally figure out a solution that works for me. I notice that only if I open the project file that I have been working daily that the menu bar is missing. If I create a new project, the menu bar is there. And here is my solution:
Remove your project file on disc (or move it to a different folder)
Open the Welcome to Xcode window by shift+command+1
Make sure your project is no longer under this list. If it is still there, click on it and Xcode will tell you the project is not found and it will be removed.
Add the project file back and open it and I have my menu bar back (if you have moved it, simply opening it from a different file location may work I guess)
I guess the problem is that some cache value in Xcode about the project file is messed up somehow. Hope this helps.
I make my XCode screen little big and now find both options.
On XCode 9.0 beta, this worked for me: select View -> Show Toolbar from menu
right click on title bar -> select show toolbar
Fixed it by deleting the following file ~/Library/Preferences/com.apple.dt.Xcode.plist and restarting Xcode.
The downside is that Xcode preferences dropped to defaults obviously.

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.

Xcode not detecting my device

I upgraded my iPad device OS version recently to 5.1.1 (9B206). From that my Xcode is not detecting my device. Am just getting iOS Device and simulator options in my Xcode. But am getting my device in older version of Xcode and iTunes. For this i updated my MAC OS version to 10.7.4 and Xcode version to 4.3.3. But still am facing the same problem. Now how to make my Xcode to detect my device?
This Worked for me.
Quit Xcode.
Disconnect the device.
In a terminal window, type: sudo pkill usbmuxd (it will be restarted
again automatically)
Restart Xcode
Connect the device
Your device should now be visible again in Xcode!
Open the Organizer in Xcode, go to devices, find your device and click the option to use for development
I just plugged into another USB port and it detected by device.
In another case, check the "iOS Deployment Target" in "Build Settings",
if the target iOS version number is great than the version of device,
then the device will not show in the list.
Say that, the "iOS Deployment Target" == 7.0, and the version of device is 6.0,
to solve the problem by change the "iOS Deployment Target" to 6.0 or lower.
If the chosen answer still does not work for you try this:
Select the project in project explorer
Select the target on the main window
Select Build Settings
Select Deployment
Select iOS Deployment Target. Change it to the version of your device. (e.g. iOS 5.1)
I was also faced the same issue in Xcode, my device was not detected after update the Xcode latest version(7.3.1)
Done so many things what suggested in the web-search but still the device was not detected.
Finally, I just quit and open the Xcode my device was detected(oh my bad).
This SO answer solved it for me https://stackoverflow.com/a/56054170/5813473 .
sudo killall -STOP -c usbd
did the magic.
Well later I had to unplug/plug in again at occasions, but that 'killall' really solved the original issue.
Most recently, Xcode 8.3 and iOS 10.3 seems to have more security around Xcode accessing the iPad/iPhone. My sequence:
Rebooted the machine,
Attached the iPad,
Gone through a "trust this computer" security cycle on both iMac and iPad
Xcode can now see the device
Sometimes restarting Xcode helps. Give it a shot.
In my case, restarting Mac worked and no other solution.
I updated my iPad (it's in Settings -> General -> Software Update, near the top) and restarted my computer and Xcode sees it now.
FWIW I tried all the tips in this thread and nothing would work: from reboots, command line statements, unplugging, different USBC ports, etc. I also tried something not mentioned here (yet) by going to "Settings > General > Reset > Reset Location & Privacy" ... however even this didn't work.
Later on in the evening I was in a different room of the house and out of nowhere I got the "Trust This Computer" prompt on my iPad. I of course tapped "Trust" or whatever and then magically my Mac laptop finally sees my iPad.
I realize I'm not really giving a helpful tip/fix here - just sharing how things went for me in case anyone finds useful.
iPad: iOS 13.4.1 | Macbook laptop: OSX 12.3.1
Recently (2022) I've noticed that the iPad prompt to "Trust this Computer" won't appear unless using an Apple USB-C cable. Apple reps assure me they aren't doing any funny business here, but I have tried every cable I can find, including several thunderbolt 3 and 4 cables and Anker cables. Worth trying an Apple cable if still having problems.
Just simple, close the project on your XCode. Just right-click on the XCode in the taskbar and give a quit option. After open the XCode from the directory, it will detect your device. It also work on Xcode version 11.2.1
close your project or XCode.
Give Right click on the Xcode in MAC tabbar and give the Quit option.
Reopen the project from your finder(project place).
The device will be automatically detected.
Open the Windows in Xcode, go to devices. If Device is visible in Left side, Right click and select "Show in Destination Menu".
Enjoy..

Xcode Doesn't Recognize My Device After OS Upgrade

This has to be a simple configuration issue, but I don't know my way around the build settings very well.
I upgraded my iPad from 4.3 to 5.0. I am using Xcode 4.2. When I plug my device in, it is not showing up on run button, and I have a message that it can't run using the selected device.
What do I have to do?
Open Xcode, go to Window -> Organizer and find your device. Click the "Use for Development" button to get Xcode to recognise it again.
go to your iphone device, settings->Reset->Reset All Settings. Close Xcode, restart XCode, device should be in the list now.
Restarting USB process worked for me.
Run sudo pkill usbmuxd on terminal
or
Open Activity Monitor and select Disk by tapping from segment control and search usbmuxd, select the same and force quite/quite.
Note: before doing above stuff, remove device and quite Xcode.

Resources