Xcode 9 Playground does not work in Mojave - swift-playground

I have a new mac mini 2018 running Mojave. I copied my applications folder using migration assistant from my 2009 mac pro running Sierra, so Xcode version is 9.2.
Xcode starts and creating and building a single view app template works for both macOS and iOS.
But creating a playground results in endless spinning the wheel. I just add a line that prints the template "Hello, Playground" string to the console, but nothing happens on playground execution, the string does not even appear in the REPL Preview.
I downloaded Xcode 9.4.2 from the developer page - same result. I deleted, downloaded and re-installed 9.2, the same result.
I also downloaded Xcode 10.2.1 - here the playground seems to work.
Please note, that the problem already occurred when 9.2 was the only installation.
Following the advice from this thread:
https://forums.developer.apple.com/thread/78869
I deleted these files in my user library, to no effect.
So what else can I do aside from re-installing the OS and installing every app from scratch?
UPDATE: I re-installed Mojave from scratch and installed nothing but 3 different Xcode 9 builds (9.2, 9.3 and 9.4) - in none of them does a playground work at all.

Related

black/blank screen iOS simulator on VMware

I am having a weird issue with simulator it shows me this screen
I have searched around for a solution and have tried to reset the content and settings it didn't work
Currently, I have Xcode version 11.3 (11C29) and macOS version 10.15 beta installed. When I run the project with iPhone 11 pro 13.3 it shows me the black screen.
Unlike regular/ initial ios simulator set up, there are no apps installed by default.
I am running mac on VMware. Any kind of help is really helpful.
I was facing a similar issue, got it fixed by using the correct version of Xcode
For VMWare Catalina - 10.15 Beta(197a471t) use Xcode - 10.3
Use this site to Download Specefic Xcode from Apple -> https://xcodereleases.com
It also fixed a Assets.Xcassets problem I was facing (LaunchImage Problem), really bad the MacOS is so specific with these versions
Hope you get it fixed...
P.S for virtual Box users there is a command line fix ->https://wasaytechtips.com/springboard-quit-unexpectedly/

Xcode 7.3.1 update stuck? is it downloading?

Trying to download Xcode 7.3.1 but download process is stuck for atleast 1 - 1/2 hour, is it stuck, is it going to complete? I have latest Mac OS installed
Tried solution provided on this link but non worked
XCode 7.3.1 Update Not Installing
It always happens to me (Well, not always but it happens, and also with another apps). What I do is to delete the Xcode app, and then install it again from the App Store or from the Developer's site.

XCode 7 (Beta 3 & 4) Could not download and install iOS 8.* simulator

Trying to get iOS 8 simulators in XCode 7. Prior to beta 3, that wasn't possible but in beta 3 release notes:
"Xcode 7.0 beta now supports downloadable legacy simulators."
Xcode 7 beta 3 Release Notes
They also show up in the "Downloads" section:
I'm running into the same problem as reported in this question about XCode 6. I have Xcode 6 still installed, but am trying to install the simulator to Xcode 7 beta 3 where iOS 8 is no longer the base OS.
Error msg:
Could not download and install iOS 8.3 simulator. Authorization is required to install the package
I found another workaround on the Apple forums for this issue that does not require downloading/having other versions of Xcode. If you run Xcode using sudo the simulator downloads and installs work just fine:
sudo /Applications/Xcode.app/Contents/MacOS/Xcode
Note: Once the downloads and installs are complete you should quit Xcode and start it normally.
Update: XCool points out an important safety tip in the comments that I wanted to highlight here:
Make sure that you close any projects before opening Xcode using sudo, otherwise there'll be a lot of permission issues with any files that are currently open when the installation occurs.
sorry for the post, I don't have 50 reputation to comment. i am having this same issue. Any further progress? If I happen to come across a solution I will let you know. What have you tried?
--------- UPDATE -------
So I have found a work around.... if you are trying to get it to deploy to an iPhone.
If you still have the previous xCode file... you can navigate to Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
copy the simulators and SDKS you want over to the same location in Xcode-beta.app and paste... granted those downloads still won't download, but this will allow for the simulator to run on your iPhone.
I got this from Using the device simulator for iOS 8 with Xcode 7
and verified it works.
XCode 7 and above does not support simulators 8.4 and earlier.
Please check my answer on the post here.

Xcode 4.4 - There was an internal API error

Hi I just upgraded to Mountain Lion. I created an empty Single View Application and run it. The first time it runs fine but the next runs will give me the "There was an internal API error" pop-up warning TWICE. It's the same with my other projects. They run okay once but gets this error the next runs. There was no warning or any specific warning message of any kind.
Any idea how to solve this?
Would really appreciate your help.
I have it working on iOS6 Beta 4!! This is what I did but other variations may also work:-
Install XCode 4.5 Developer Preview 4
Delete your app from the device
Run your app from Dev Preview 4
Delete your app again (not sure if you have to do this)
Return to XCode 4.4.1
Run your app, stop running, run again!!!
Of course you could continue developing in 4.5, but I prefer to wait.
Installing 4.5 Beta 4 installs updated device support. Once this is done once (possibly on any device) it should work fine. If you use the same device on a different machine you will have to again run it once from 4.5 Beta 4 before using your preferred version of Xcode (You do not need to delete the app from your device this time).
Edit: I am pretty sure that if you make a change to your core data you will need to run from 4.5 for the first time also.
Don't know if this helps, but I've deleted all files in ${HOME}/Library/Developer/Xcode/iOS DeviceSupport and it worked as a charm (Xcode 4.4.1, OSX 10.7)
I had this problem when I upgraded my device to Preview4 but had my MBP still running Xcode Preview3. Updating to Xcode Preview4 made the problem go away for me, no restarts necessary.
Deleting the app manually from the device/simulator will allow you to build and run successfully. A long term solution is to not use a Beta Xcode :)
Sounds crazy but you can also not use the Beta version of XCode 4.
However, you must keep it in your left hand to authorize your iPhone to compile with the non Beta version (don't ask me why, it works).
If you run your app with XCode 4.5 preview & IOS6 Beta 4, the second time you run your app on the device, you'll get the internal API error.
In theory, you cannot use XCode 4.4 to compile on your iOS6 Beta 4 iPhone.
But...
It seems that, if you launch XCode 4.5 Preview, connect your iPhone (so it is recognized), run the application on it (even if you get the error), quit XCode 4.5, launch XCode 4.4 and .. tadaaaa... your iPhone is now recognized as an authorized device to compile on...
And of course, XCode 4.4 doesn't generate the api error...
I have Xcode 5.0.2 and iPhone with iOS 7.0.6.
Every time when I launched my project on iPhone, I saw "There was an internal API error". And it was launched on simulator without any problems.
I did all the stuff that usually helps (like remove an app, clean, restart Xcode, restart a mac, etc.).
This problem went away only after I restored the iPhone. Sad but true.
I don't know so far, why it appeared.

XCode 3.2.4 iOS 4.1 (Final) and CoreData Crashes in Simulator

I've got 2 applications using Core Data with a sqlite persistent store. I've got a data loader routine that I run to populate the CoreData DB from csv files. During development, when my data changes I run the routine from the simulator to generate new databases and copy the new one into the project.
This has been working quite well for XCode 3.2.3 and iOS 4.0. It even works in the XCode 4 Preview 2 and 3. I just installed the final version of XCode 3.2.4 and iOS 4.1. Now my db loader fails. It gives me no message, no warning, no nothing. It just dumps out to the spring board and XCode gives me the "Debugging Terminated" message. It will fail at different times during the load so I'm pretty sure it's not a data issue. I'm not doing any threading. I assume the issue has to do with either Core Data or sqlite, since that's when the crash occurs, but with no info reported I can't tell for sure.
I uninstalled everything. Xcode 3.2.4, Xcode 4 preview (assuming it was an issue caused by XCode 4) and reinstalled XCode 3.2.3/iOS 4.0. Things returned to normal. After getting some work done I attempted to upgrade to 3.2.4/iOS 4.1 again. I uninstalled 3.2.3/iOS 4.0, rebooted. Installed 3.2.4/iOS 4.1, rebooted and tried again. No luck. Same hard crash. Same lack of messaging as to the cause.
I have determined that this only happens with the Simulator with XCode 3.2.4, the device is fine as is XCode 4 and 3.2.3. I've tried playing with the target OS selection (3.0,3.1,4.0,4.1). I've tired adjusting the Compiler from GCC 4.0, GCC 4.2,LLVM GCC 4.2, LLVM 1.5. I've tried setting the Base SDK to iOS Simulator 4.1. Interestingly enough it will work in the iPad simulator when using the 3.2 SDK. So I've at least go that as a work around.
I guess there is one of 3 issues:
An issue with my code that has been uncovered by 3.2.4.
Bug in 3.2.4.
A configuration issue that I've missed.
If anybody has any troubleshooting ideas or answers I'd love to hear them. I've been doing iOS full time since V 2.1 and I am seriously stumped.
Thanks in advance,
I figured out my issue. It looks like the CoreData/Sqlite connection was a total red herring. Following a tip I read on SO, I used OSX's Console application and got a critical message "Failed to launch in time" that was not being displayed in XCode's debugger console.
It looks like the process was being killed due to what is essentially a timeout error. The iPhone will kill an application that takes too long to complete "didFinishLaunching." That's where I was kicking the data load routine off from. The new version of XCode must have adjusted it's timeout values.
So my takeaway is give OSX's console a shot if XCode isn't telling you everything and watch out for those red herrings.
When I upgraded I ran into troubles in the simulator when saving the managedObjectContext. I finally deleted my sqlite CoreData store file and have not run into similar problems. Try deleting your data file (well save a copy of it before deleting to see what is different).

Resources