Xcode Playground doesn't display on the right side - ios

I have this issue while I run my playground. However, it doesn't display on the right side. So, I searched many forums and the only way that worked for me was
to delete the comments. I use the iOS platform. My Xcode version is 9.4.1 on macOS High Sierra.

Xcode 9 has some issues in playground and sometimes it stuck at lunching simulator or running playground or etc. The best solution is update to Xcode 10+. Many bugs like this has been resolved in the current version of Xcode.

I've ran into this as well. I usually have to quit Xcode (cmd + q) or quit from the menu and reopen the playground. That usually runs the simulator.

Related

Xcode 9 iOS Simulator becoming black screen after installing Xcode 10 beta

I know that so many people have asked this question earlier. But I think my situation is different. In my case Xcode 9.2 was already installed and I upgraded macOS from 10.13.2 to 10.13.5. Then I installed Xcode 10 beta. Now when I'm running any project on Xcode 9.2 and try to use simulator, its becoming black though I can see the xcode logs. Things I have tried so far,
Uninstalled Xcode 10 Beta
Uninstalling & reinstalling Xcode 9.2
Uninstall Xcode 9.2 and install Xcode 9.4
Reset Content & Settings from simulator menu
Restart Device from simulator menu
Resizing simulator.
Followed this post and cleaned DerivedData, CoreSimulator, iOSDeviceSupport
Re add simulators from devices & simulators section
Now what should I do now?
Try running defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint 3 in Terminal (source). Note that this will force Simulator to use OpenGL instead of Metal, so you'll want to re-run it with 0 once this gets fixed.
try workaround, delete Library/Developer folder and start it again
Another option that occurred for me. I subclassed UIWindow and called .init(frame: .zero). Changing to .init(frame: UIScreen.main.bounds) fixed it.
Open up XCode 9 and go to add additional simulators(pictured below) re-add iOS 10 and iOS 11 simulators
You seem to have tried everything except changing the iOS simulator version you are trying to run.
Maybe the problem lies with that specific version of iOS simulator eg. iOS 11.x iPhone 6. Change that and it may run OK.
If you do not have desired version with you, go to XCode->Preferences->Components, and download one of the older iOS simulators available at the time of XCode 9.x.
Then, go to XCode->Windows->Devices and Simulators. Press + sign at the bottom left of the screen. Add your desired simulator version (give your desired name), so that this newer simulator appears in runnable scheme list of XCode.
This is just for the users that failed trying everything to save Xcode 10 and then reinstalled Xcode 9.4.1 and the simulator still not working.
Here is what I did to give Xcode 9.4.1 back running.
After I got this problem after upgraded to Xcode 10.
I tried that famous FramebufferRendererHint, didn't work for me.
I have found out the Xcode 10.1 beta release didn't fix the problem for someone else, so I didn't bother to try 10.1 beta.
From the online research I know the problem is in /Library/Developer/PrivateFrameworks/CoreSimulator.framework.
Without Xcode even installed on your Mac /Library/Developer doesn't exist.
So it is installed by Xcode when your first time run Xcode. You would notice a screen showing "Installing Components"
But after you installed Xcode 10 and then install/run Xcode 9.4.1 it won't touch that folder anymore. So problem stays even you put Xcode 9.4.1 back
That's why after I downloaded Xcode 9.4.1 expanded and ran it. Problem still there.
I didn't backup my Mac. So I decided to start from scratch. Restored my MacBook from Internet, downloaded Xcode 9.4.1 again. and now everything is back to normal.
I can keep releasing the App to App Store now.
In my case (xcode 10), I just left the computer for 10 minutes or so (out of frustration!) and when I came back I found it at the starting screen! .... I guess for the first time it takes time

Xcode Memory Graph Debugging Icon not showing

I've recently started working on an existing objc project and wanted to check the memory graph debugging tool. As I started a debugger with the app I realised it doesn't show in the debugging tools.
I tried it with another project (created a new swift project) and the icon suddenly did show again. But only for this project.
So my question now is if there're any settings in a particular project that can prevent the memory graph debugging tool from showing?
Any hints are appreciated.
I tried a lot of different simulators (iOS 9/10/11). I event tried rebooting my macbook because I read somewhere this could help ;-)
I'm using an objc only project with Xcode 9.1 or Xcode 9.2 beta 2.
This is my diagnostics selection in the scheme if that's related:
Step 1: shut down and restart your iPhone.
Step 2: quit and reopen Xcode.
This should make the button reappear.
For some reason, the button is not there when I test on the device, but it's there when I test on the simulator.
Hi I was having the same issue. It's actually hidden here:
It appears that the memory debugger will only work for newer devices. It definitely does appear on the iPhone 8 running iOS 11. On some of my older devices it does not appear. I'm not sure at this time what the cutoff is.

Xcode 8 | iOS 10 simulator "Error returned in reply: Connection invalid"

While I am try to run an app in the iOS 10 simulator using xcode8 I get these alerts frequently. They randomly appear two at a time and it is not apparent what is triggering them.
Below is Image for Error I got.
I tried Following things.
Clean & Rebuild an app
Restart xcode & Simulator
Clear Derived Data & Rebuild application.
Even I was getting the same error. Issue in my case was I was working on xcode 7.3 and its simulator was open, later on I closed xcode 7 and opened xcode 8 and tried running app and got the above error.
I guess its happening because of both the simulator were open, it got solved when I closed my older simulator. Seem to be some problem while xcode 8 was trying to establish connection with simulator.
You just follow these steps to remove this error it's working fine in my side and i hope these steps work to you also just try it.
i)Remove multiple xcode versions.
ii)Quit all Xcode and simulators.
iii)Only one version you opened.
iv)Go to Xcode -> Preferences
v)Go to Location
vi) Set proper version for command line tools (your Xcode version)
vii)click on Derived Data
viii)Then go to Derived data and delete that folder. see below image
ix) Click on Simulator reset content settings and just quit xcode and simulator and open clear and build the xcode and run it.
Without deleting "Derived data" folder
The same rules as in the past apply to switching between Xcode 8 and
Xcode 9:
Quit Xcode, Instruments, Simulator.app, and Console
xcode-select the version you want to work with
Start the version of Xcode you want to use
If these steps don't resolve the problem for you, you can repeat the steps above > but after #2 add "sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService".
from this https://forums.developer.apple.com/thread/79301
The Same issue I have faced when I have two Xcode version, but the issue was when we are opening the two instances of simulator we will get the same error, the best way to solve this issue is run command
rm -rf ~/Library/Developer/Xcode/DerivedData
to remove the derived data.
None of the above worked for me.
Instead of choosing the simulator and hitting "run" i solved it by opening the simulator form "Open Developer Tool" menu first. After that all worked fine.
I had a similar issue, despite not launching a second instance of the simulator, due to using SimPholders and having the XCode Command Line Tools set to a different version of XCode. To resolve this, open up XCode preferences, and under the Locations tab ensure that the Command Line Tools version matches what version of XCode you're currently working in.
I had the similar issue shown in below screenshot.
Got it solved by closing Xcode 7 and its simulator.
It seems that when you are working on Xcode 8 and its simulator then Xcode 7 simulator should not remain open.
Below is screenshot of simulator state for Xcode 7 when you're working on Xcode 8.
In my case,
I was open a project a Xcode 8, and the emulator for this version, then open this project on Xcode 7.3.1, when I create an emulator it shows the alert.
My Solution: Close all version of Xcode => Clear Derived Data => Quit Xcode => Open Xcode => Choose File => Open Recent.
Force Quit.. Xcode and simulator. This kind of issue happned because maybe you are try to run more than one different version Xcode at same time.
I just had this issue when attempting to debug an iOS application from Xamarin, which uses Xcode to run apps in the simulator. I was initially targeting a 9.7" iPad Pro, attempted to change the simulated device to an iPad Air 2 (still on iOS 10), but the simulator didn't respond. After quitting and relaunching the simulator it appeared to load okay, so I changed back to the previous device - not sure whether changing devices actually did anything but I haven't seen the error message in the few times I've run my app since.
Solved it by closing all xcode and simulator. Don't ask me why. It was happening on the beta version for me
I had similar issue, what I did is I closed the simulator and all the Xcode and I went to the terminal and typed to see any Xcode application running then I killed it. I had one Xcode running in the background.
Command to see if Xcode is running,
ps -e | grep -i xcode
Use kill comment to kill any runing Xcode app, I used
kill -9 <pid>
The Same issue I have faced
in my case i stopped all applications and restarted my mac
and every thing is OK
Simple And fast Remedies..
1.Quit all xCode and reopen the xCode which you need to work...
I had this problem too, but I did below process it's working fine.
You have both Xcode 8.x.x and 9 running on your Mac, which causes the problem. Only run one Xcode at a time (Quit another Xcode, don't let another Xcode runing in background!).
This can occur when you have more than one version of Xcode installed on your computer. Make sure you QUIT (not just close) all versions of Xcode first.
Changing the device seems to have worked for me after doing the other stuff. Didn't have to restart my computer.

How to fix Xcode "DTAssetProviderService could not start.." error?

I have upgraded macOS Sierra Developer Preview, but my Xcode 7.3.1 gives below error while try to run my project on simulator. In addition Generic to archieve gives another error like:
In addition for archive: a cryptographic verification failure has occured.
How can I fix this?
I have tried before Xcode 8.0 Beta, uninstall it deleting derivedData and reset content simulator but still occurs this error.
Update:
I want to share an information who want to use Sierra now. If you decide to do below changes you need to know "Uploading App Store with beta software" not allowed by Apple. Continue with El Capitan and Xcode 7.3.1 for production.
If you want the slow solution, you can reinstall Xcode 7.3.1 by downloading it from https://developer.apple.com/download/more/.
It worked for me and now my Simulator is able to start again without getting the error.
The issue is discussed in depth here:
How to fix Xcode "DTAssetProviderService could not start.." error?
This seems to be a major bug. Until Apple fixes it, you can work around it:
Build app
The app will still install on the simulator, even with the error
Launch the app manually on the simulator
Go to Xcode
Click Debug > Attach to Process > Your App Name
That will enable Xcode debugging features and allow your app to run in simulator. Definitely not ideal, but hopefully you can use this until a real solution comes out.
This is a regression in macOS Sierra that multiple developers have reported in the forums and in the lab sessions at WWDC. Xcode 7.3 is not supported on Sierra. If you want to use macOS Sierra, please use Xcode 8.0 beta or later.
If you must use Xcode 7.3 on Sierra, you can partially workaround this bug by using Xcode.app to install the app through Build & Run, launch the app suspended from the command line (xcrun simctl launch -w booted <app identifier>) and then attach with the debugger and resume the suspended process.
Note that this issue only impact Xcode 7.3.1 downloaded from the Mac App Store. You will not hit this issue if you use Xcode downloaded from http://developer.apple.com (ie, the "drag & drop installer"). Note that you might hit another issue with the same symptoms when using the drag & drop installer. That is discussed in DTAssetProviderService could not start DTXConnection with Simulator
You can still run the debugger, but you have to attach it manually.
You can run your app tapping the icon in the simulator, than switch back to Xcode and select Debug, Attach to Process and pick your app process.
The following steps fixed the issue for me:
Remove both Xcode 7.3.1 and 8 Beta
Remove /Library/Developer and ~/Library/Developer (before removing check the contents and back up whatever you need)
Download the Xcode 7.3.1 DMG file and the Xcode 8 Beta xip file (unless you already have them)
Install 7.3.1 and test the Simulator (should work fine now)
Install 8 Beta and test the Simulator in 7.3.1 again (should work as before)
Restore what you backed up on step 2

Why have my Xcode 6.1.1 simulator options all disappeared?

I recently tried to run a simulation of a new iOS 7 app on Xcode 6.1.1 using my MacBook Pro during a visit to Indonesia. The app was based on AddMusic and made iOS 7 compatible. When I tried to run the simulator abroad iOS simulation targets available while testing in Australia had simply disappeared from the pulldown menu in Xcode. Moreover since I came home these simulators only reappeared when I removed, downloaded and reinstalled Xcode.
Until I reinstalled Xcode the only option Xcode offered was to run the app on an iOS device but I wasn't prepared to do this in front of clients without first being able to test a revision on a simulator.
Thankfully on this occasion I was able to demonstrate earlier versions I had installed on an iPhone 4 and iPhone 5 C before I left home. But it would be really good to know what I might be able to do to avoid this situation during my next visit abroad.
I suspect the issue may have been brought on by differences between my Internet connections at home and abroad.
Has anyone else experienced a similar problem that might be related ?
Top to your Right Click on
Window > Devices
You will see that no devices will be showing Do the following
Bottom Left
Click on the +
And then start adding your devices.
Just closing the projects from the File Menu, quitting Xcode and restarting Xcode worked for me
the version is the latest Xcode 7
Some things which might help you
Check deployment target in your project settings. Switching to lower versions of OS might help you get back all simulators.
Check your xcode version used in the command line tools. Go to Xcode -> Preferences -> Locations -> Command line tools
Quit Xcode and restart your system.
Hope these things help !!

Resources