Xcode 12.5 playgrounds don't seem to run any code at all, or display line by line outputs when ran. When I make a new playground, and click on any line of code to run, or try to run all the lines of code with the button at the bottom of the screen, I am shown in the top bar: "Build test (Playground): Succeeded" but there is no output in the command prompt, even when print statements are added, and there is no information in the side bar.
I've tried:
Restarting Xcode and rebooting my macbook
Stopping the simulator via the Activity monitor and restarting it
Opening up new tabs in an attempt to refresh
Uninstalling and reinstalling Xcode via the app store
Switching the playground settings for Platform from iOS to macOS
All to no avail.
I've tried opening other playgrounds from downloaded files (e.g. the swift tutorial from apple's website) and they all give me the same results, which is opening the code but not displaying any results in the side bar or running the code.
I'm currently on an M1 Macbook Pro 2020, with 8gb of RAM, as well as MacOS version 11.4
Here is a picture of what I see
Edit:
Changing whether the playground runs automatically does not affect the output of Xcode. Both automatic and manual result in not running any portion of the playground.
Swift Playgounds don't work for me if Xcode 12 was launched in the "Open using Rosetta" mode.
Solution:
Go to "Applications" folder -> Right click on the Xcode -> "Get Info" menu item
Unselect "Open using Rosetta" checkbox.
Close (Cmd+Q) Xcode and open it again. Next time it will be opened without Rosseta and playgrounds should work fine.
I was having this issue, changing in the Playground Setting in File inspector from iOS to macOS and you will have to use Foundation module instead of UIKit. I am using Xcode 12.5.1
Running Xcode 14.1 and macOS Ventura 13.0.1
Was struggling with this as well, fixed it:
Go to playground settings on the right side
Select macOS under platform
It's not perfect solution, but it works for now.
It seems like Xcode playgrounds seem to be completely broken (at least for my setup). For anyone else trying to learn swift that's experiencing this problem, instead of using playgrounds I created a new command line project in Xcode in order to run the Swift files. How to do this is outlined here: https://www.aidanf.net/learn-swift/running_code
Two causes to this that I have seen.
Xcode is opened with Rosetta checked.
The build tools are not selected in Preferences > Locations > Command Line Tools:.
I've had the build tools magically deselect themselves for some reason. Rosetta was selected to allow certain pod files to build when the Simulator is targeted on an M1 Mac.
Xcode should fire off an error if there are no dev tools selected, but for some reason it doesn't do that and just displays nothing in the console and no error message at the top of the screen as it does for other errors.
I was able to run automation scripts on simulators and physical devices (with varying success but at least they were working).
Now what seems to happen, on the iPhone 5 for example, it connects and the page appium.io opens, then nothing else happens.
The only error I can see in Appium is "Page 27752/0 not found. Already sent close_frame"
Nothing else has been updated except for Xcode, and I think before this I was on Xcode 9.2
This same script works fine with when automating Safari.
Version details below
MacOS 10.14.5
Appium 1.12.1
Xcode11
iPhone 5 OS 11.2.6
Apologies for any errors, I'm still new to this.
I actually don't know what to do to fix this. I've had so many problems getting automation to work with iOS that I'm reluctant to update anything at the moment. The automation works fine on Safari, just not iOS
I can't see where to attach the appium output log.
I ran into the same issue after updating to Xcode 11, seem like there is an issue with the Command Line Tools, you can roll it back to Xcode 10.2 like this:
This fixed the issue for me.
Is it just me and my colleagues or is print broken in Xcode 8.3.1? I'm not seeing anything in the xcode interface after upgrading from 8.3.0, both in the simulator and on a device. Breakpoints are hit correctly and I've double checked everything like described in Xcode doesn't write anything to output console
I'm trying to debug an iOS project in XCode 6.4. Recently, none of the breakpoints are working (they did before), while I'm running the iOS Simulator. The debugging area only starts if I manually attach it to the process. I've looked through the project build scheme and settings, and there's nothing to suggest that I've turned off or changed the debugger in any way.
The problem only occurs with this specific project in XCode. I even reinstalled XCode to no avail, so I assume the problem must be specific to this project/workspace.
Any ideas why the debugging is not automatically attaching to the process? Or a workaround?
Thanks!
Having a strange issue with XCode 4.5 on OSX 10.8.2.
When I run an application on the mac, it doesn't launch and I get the following error in console consistently.
10/01/2013 17:26:26.478 Xcode[7884]: ERROR: Failed to create an alert for ID "enabled" based on defaults: 1
When I run an iPad/iPhone app, the simulator launches, but the app just shows a blank screen. I thought there was an issue with my apps (although very unlikely) so attempted to create a vanilla mac app and iOS app. Both experience the same issues. Running/Debugging any iPad project directly on the iPad through Xcode works however.
I've attempted to:
Delete everything in ~/Library/Developer/Xcode/DerivedData/
Delete the Xcode app and download it again from the AppStore
Delete all of my Xcode preferences
Xcode Build and stop buttons also become unresponsive so I have to force quit xcode to try again.
Nothing seems to be working, Xcode works fine however on my mac pro at work and all projects build just fine! Any help would be much appreciated!
Never mind, setting the debugger to GDB instead of LLDB seems to have fixed this. It would however be good to get an answer as to why LLDB doesn't work as the default debugger and what's changed in xcode to make it no longer work as expected.