Xcode & Playground not displaying results window - xcode

I am fairly new to programming, so I admit I have a lot to learn. In earlier versions of Xcode and Playground, I used to see the results as I typed a program. For example when typing
var str = "Hello, playground" on the far right (results window) I would see: Hello, playground. I also had typed up part of a program with a function and if I entered values for variables, it would calculate the result in the result window (on the right). At some point in typing program, it stopped showing this.
I was hoping that someone would be able to assist me in figuring out what happened. I am thinking that with trying to learn the new Mac (I have always used a PC in the past) that I may have pressed some buttons somewhere that I should not have....OR the newest updates took away the function somehow? Here is what I have done:
-closed the application and restarted
-restarted the computer
-tried checking setting, but I am not too sure what to look for...
-called for support but they don't seem too sure either..
-installed the newest version available of Xcode (Xcode 7 beta) and rebooted
Does anyone have any suggestions?
Thanks

I think this might be broken in 7B4, it is for me. I can see a thread on devforums for this, but when I clicked the link, it redirected me to a create-account page and would not let me in. When I tried to search for it from my account, I did not see it in the list.
See the thread shown in this (admittedly transient) search:
https://www.google.com/search?q=xcode+playground+not+showing+results&ie=utf-8&oe=utf-8
Particularly, this result:
Playground not displaying output | Apple Developer Forums
https://forums.developer.apple.com/thread/3672 Jun 9, 2015 - This
checks to see if the playground is operational. If it does not echo to
the results sidebar, try quitting and restarting Xcode. If you're
still not ...

Related

Tab instead of 4 spaces on visual studio code : Mac OS

I know that sound like a stupid question, and we can find many answer on google.
However, i've been trying for one hour and it still not working.
The question is prety simple, i'm coding on visual studio code on Mac OS.
And i want to instert tab when i press tab, and not 4 spaces.
It it supposes to be very simple :
Go on "code"->"preferences"->"users stting"
And add :
// Insert spaces when pressing Tab.
"editor.insertSpaces": false
Into : settings.json
However i have no clue why, but this is not working.
(I've save it, close visual, reboot mac, still not working)
Does anyone has any clues to help me?
Thanks a lot.
(I've save it, close visual, reboot mac, still not working)
--> One thing is missing - did you try it with a completely new file? ;)
I just tried it, had the same issue and almost thought it is a bug, but it seems to be expected behavior as there is another setting editor.detectIndentation which is true by default.
If the indentation is detected then the detected value takes precedence over your defined setting. At first this seemed odd as others also reported in a GitHub issue. But the analogy with CR/CRLF in this issue makes sense.
So as a quick fix you could set editor.detectIndentation to false or convert your existing indentation to tabs so that the next time you open the file the proper detection is done.

Swift code completion isn't working

I installed Xcode 6.0 beta and downloaded the iOS8 library Documentation.
but when i create a Swift project, try to typing code
func aa(){
let format = NSDateFormatter()
var pageData = format.
}
I find Xcode can't dot any property and function. Am I missing any step?
The problem is sloved, typing a whitespace can aid code completion
It's append when you change the hardware type and you choose less than iphone5.
Choose Iphone 6 for example in the list at the right of the stop button and the code completion for 'format' will appear.
I met the same problem and solve it by removing the non-ASCII char in comment (in my problem, it's a chinese char "年" automatically generated in comment by xcode).
btw. "typing a whitespace can aid code completion" doesn't work for me
It’s a bug, your code works on my system (OS X 10.9). Note that when typing code, I sometimes see the code completion crash for two seconds and come back.
When trying a first project named "swift", code completion crashed in a infinite loop… beta bugs… I just had to name it something else to test the language.
You know, I've experienced something similar with Objective C projects in Xcode 6 Beta 1. It seems Apple have changed the default behaviour a bit:
In Xcode 5.x code would always automatically complete as you type, but in this early beta try pressing ESCAPE - that will bring up the list you're looking for. Works for me. Some code auto completes as you type (both in Swift and Objective C), but at times only ESCAPE will bring up what we're looking for.
I'm nor sure if this is expected behaviour or a bug (I'm guessing the latter).
I must admit that your code works fine on my system without this trick. Just make sure you have code completion setup under Xcode - Preferences - Text Editing:

Xcode user input: only first character shows up when inputting

When I am programming in Xcode (in C), and I am using the debugging console (brought forth with Cmd-R) to view the program and its output, and give it input, when I am entering input only the first character that I want to input shows up on the console. All the rest are invisible and non-selectable to me. Say I want to enter "20": all that shows up is "2". It still behaves as though I had entered all those characters (in the previous example, 20), so technically this bug (?) doesn't interfere with the actual software, but it's still annoying not to see all of the keystrokes that I had inputted previously. I just updated Xcode a day or two ago and installed Command Line Tools as well (though I doubt the latter is relevant). I believe the version number is 4.3 or so. Is anyone else having the same problem, and has anyone found a fix? Yes, I've tried restarting it.
I have the same problem.
It looks like it's a XCode 4.5 bug:
https://discussions.apple.com/message/19701332?tstart=0#19701332?tstart=0
So, you can wait or install a previous version.

XCode: "To download this update...". Is this dialog normal?

I'm getting a dialog box asking to enter my apple developer id & password in xcode. It just says something like "To download this update enter your information." then i goes away.
Is this normal? Seems to me that this would be the perfect way for a trojan to get my apple id and pwd!
It has just happened to me, too (with the current GM Seed version). I was creating a new project when the pop-up dialog appeared.
To be on the safe side, I changed my password immediately after the incident.
What were YOU doing in Xcode when it happened to you? Are you using Xcode 3.2.2, too?
Anybody else having this issue?
The only explanation I found is here:
http://lists.apple.com/archives/xcode-users/2010/Mar/msg00265.html
Then, under /Developer/..., I found a .docset file with a time stamp corresponding to the point in time (plus a couple of minutes) when I had entered my credentials.
However, when I tried to log out & in again, open Xcode - Preferences - Documentation and initiate another download, Xcode did NOT ask me for my Apple ID/PDW again; instead, it asked me for the admin password as usual (I mean - usual for installations; the dialog box looked a bit different). So I am still wondering ...
Regards,
Karel

XCode's Documentation Complains "File Not Found" but Gives Correct Results

When I'm searching for something in the Developer Documentation of Xcode, I constantly get "File not Found"/"The requested file was not found in any documentation set."
The odd thing is, it still works. E.g., if I search for NSSound, I can find NSSound.
The error dialogue is invoked whenever it attempts to search as I type, which makes it particularly annoying.
This only happens when I select certain documentation sets (e.g., "iPhone OS 3.1 Library"). I tried deleting it & re-installing, but the same result. (Perhaps I didn't remove everything?)
I put up a post to fix this over here:
http://allens-techlog.blogspot.com/2009/11/fixing-xcode-requested-file-was-not.html
Another fix is to change your searching from "All Doc Sets" to "Apple iPhone OS 3.1". Once you've done that, select the "Apple iPhone OS 3.0" docset. Although it's old you won't get the error and in a month or two you can change it back.
This error is occurring again with Xcode 5+ and Mavericks doc sets. For example:
The requested file cannot be found:
/var/folders/l5/g1r3n28s1v38t5ntjqb_1dq80000gn/T/xcdocui.css.
When it appears try in this order:
Restart Xcode
Log out / log in
Restart
If you don't want to log out or restart, you can delete the temporary parent folder of the CSS file that cannot be found (T stands for 'temporary'), then quit and restart Xcode. But note this will also delete temporary files other running apps might be using, so you might get similar "file cannot be found" messages from other apps, until they are also restarted. Also see this Apple Mailing List post.
I get this problem even in Mavericks and Xcode5, almost 5 years later!
Here's maybe a less scary method than just deleting the rather populated "T" directory:
get out of Xcode. Try not to do anything else either, (who knows what else writes in T?),
but quit Xcode at least.
navigate to the /var/folders/...whatever.../T/.. directory (parent of T)
hide it temporarily with
mv T xT
start up Xcode
look at some doc just to be sure
quit Xcode
look at that same dir; a new T will be there with xcdocui.css in it
cp T/xcdocui.css xT/xcdocui.css
swap it back quickly with rm -rf T ; mv xT T
restart Xcode and see if it works.
"It works for me"
This .css file is kind of small and boring to be causing such a fuss!
That was your early Thanksgiving treat from Apple. They sent a docset 3.1 "update" out about 4-5 days ago and F'ed up alot of peoples documentation. It's basically unusable for me right now...I can't do anything without having do dismiss a never-ending barage of "page not found" error dialogs. It also trashed 50% of the favorites links I had on the left panel of documents. I assume these were from the docsets it now want's me to re-subscribe to but gives an error every time I try.
Haven't seen alot of posts about it yet so I would bet that Apple will likely do nothing. If it were possible to get a human on the phone over there I would have some answers to go along with the frustration.
Happy Thanksgiving
PS. Best to turn OFF the auto-update option in documentation. If not for having that option ON I'd currently be oblivious to this issue and capable of viewing my documentation.
I am getting this as well. I am guessing it is not affecting very many people though, since searching "the requested file was not found in any documentation set" in google is still only turning up four hits. And it is affecting my desktop but not my laptop.
Have either of you tried reinstalling Xcode?

Resources