Textfield Crash

I'm new to coding but read the Swift 3 and CocoaTouch manuals so staretd in on the Xcode tutorial.

I made through adding a Textfield, a Label, and a Button. Then connected the Button to the label and changed some text.

That's when things went sideways. On a second run, the simulator stopped executing the Button. Then the Textfield wouldn't show a keyboard.

I started several new projects and ran through the tutorial again - each time the Textfield wouldn't open the keyboard.

One of my trial projects still "sticks" on the Xcode opening screen, even though there are no associated files.

I reinstalled Xcode 3 times - no change. Upgraded to Sierra, then reinstalled Xcode again - no change. Same two problems - ghost file on open screen and no Textfield keyboard.

I have called support, developer support, and opened a TSI (cost $50). After opening the TSI I found a post that someone had an issue with the simulator so I started changing the Sumulator to different devices - it finally functioned running an iPhone 5.

I told the folks at Apple Developer Support and they said - "Glad you solved your problem!". Well my problem wasn't solved because I'm not interested in iPhone 5.

Also, I paid $50 to solve my own problem? I haven't heard from them since.

Anyone have any ideas?

I'd love to get moving on developing exciting apps, but can't seem to get Xcode to behave.

Answered by Stagecoach in 200257022

Thank you so much for your advice - This worked!


What's happening with the launch screen - I created several new projects (FoodTracker1, FoodTracker2, TestFoodTracker, etc) as I was trying to figure out the problem above. I deleted them each time and they would disappear from the launch screen. For some reason, TestFoodTracker still shows up, even though I deleted it. Clicking on the item in the launch screen gives a couple error messages. It's untidy but not a devastating issue. I included it because I wasn't sure if it was related - obviously not.


Words can't express how grateful I am for receiving both your responses - I was beginning to feel quite alone in my efforts. It's quite a relief to know there are folks out there willing to help!

Try toggling the keyboard with Cmd-K if it doesn't show when you click in a text field in the simulator. Sometimes the keyboard mysteriously needs toggled into appearing.


Your problem with an app not progrssing beyond launch screen: what exactly do you mean by "there are no associated files"? Which project template did you start from, and what did you add that you expect to see when running. What, if anything, of the template did you remove?

When textField does not open keyboard in simulator, can you type the hardware keyboard anyway ?


In simulator, look at Hardware menu and check keyboard : you can deselect "Connect Hardware Keyboard"


What do you mean by "connected the Button to the label"

Accepted Answer

Thank you so much for your advice - This worked!


What's happening with the launch screen - I created several new projects (FoodTracker1, FoodTracker2, TestFoodTracker, etc) as I was trying to figure out the problem above. I deleted them each time and they would disappear from the launch screen. For some reason, TestFoodTracker still shows up, even though I deleted it. Clicking on the item in the launch screen gives a couple error messages. It's untidy but not a devastating issue. I included it because I wasn't sure if it was related - obviously not.


Words can't express how grateful I am for receiving both your responses - I was beginning to feel quite alone in my efforts. It's quite a relief to know there are folks out there willing to help!

Yes! Typing on the hardware keyboard works!


And deselecting the "Connect Hardware Keyboard" works to show the keyboard in the simulator.


Thank You!


In the tutorial, the next lesson after building the basic UI is to connect the UI to Code. The sample connects a button to a Label, pressing the Button changes the text in the Label. Kinda simple I know but very exciting when it's your first time!


Anyway the button changed the label text the first time but then it didn't. Now looking back I might have disassembled the project before trying it the second time. I'll start by running through the tutorial again.


Thanks again to both of you - I'm very excited to be learning again and now I feel I have some friends in "the community"!

Great you found a solution.


Just for your notice, when you type "Correct answer", you should do it in the message of the one who helped (here goldstadt) and not your own window ; otherwise it is more difficult to know which was the correct answer.

Crazy

Textfield Crash
 
 
Q