Xocde canvas crashes - xcode

I am creating and running a simple hello world app in Xcode 11.3.1. When I try to preview it in canvas the build succeeded and the canvas collapses. I am using Catalina version 10.15.3. The same issue is shown in Xcode 11.4 beta 3.

In my case, choosing Show Current Editor in Focused Editor solves the problem.

Related

Swift UI Canvas not showing with macOS 10.15 and Xcode 11.1

Canvas does not appear in my 2-year old project even though I recently upgraded to macOS 10.15 (19A547) and Xcode 11.1 (15405). I have selected Editor menu/Canvas to show it. Simulator works fine, and building a new project shows Canvas working properly. Must I enable/select/configure other parts of my project?
Read before looking at image
Canvas is actually for SwiftUI, Also you can use the benefits of it by porting your UIKit elements into the SwiftUI preview. But sometimes for some un/known reason, canvas can not reload the view in time and it's not working.
For example:
When you work on a catalyst project and select mac as a target.
When you use a custom run script that cause a change on the xcworkspace during the build process (like auto build number increment script or etc.)
When you have a long task that triggers the watch dog event. (like recursion or massive loop)
Syntax error
Complex swift code
etc.
These are just a few of them that I faced and conformed. For more information about the issue, most of the time the canvas itself reports the issue and you can read about it with clicking on Diagnostics button above the canvas window:
But some times you can't even see this pan. Sometimes disable and enable the canvas works for that situation and sometimes restarting Xcode (or even mac) works, but some times not!
Hope it helps you save some time.

How to assign dynamic text styles in Xcode 11?

Edit: Probable Bug. Seeking fix or workaround…
How can I get the system’s text styles to be available in the interface builder when using Xcode 11?
I just started using Xcode 11 this week. In the interface builder (storyboard mode), when I go to assign a dynamic type text style to a Label or Button, using the Font -> Style pop-up, all the text styles are missing from the popup menu.
I do have the Dynamic Type “Automatically Adjusts Font” checkbox checked, as well.
I’m not sure if this is a bug, an intentional change I can’t find documentation for, or something else.
The expected behaviour is described in Apple’s developer documentation “Scaling Fonts Automatically”. Specifically, in the “Configuring Text Styles Using Interface Builder” section.
Further exploration: I’ve tried it with new projects, old projects (from Xcode 10), projects targeting iOS 12.2 and 13.1. All had the same problem of no text styles in the popup menu.
I experience the same problem when upgrading from Xcode 11.0 to Xcode 11.1 or 11.2 beta 2:
Xcode 11.0:
Xcode 11.1:
I also filed a bug report (FB7415999) with Apple and also opened an issue with them.
**My curren solution at the moment is a downgrade to Xcode 11.0 for UI development and a parallel install of Xcode 11.2 beta for on device runs **
This is probably a bug in Xcode 11.1. I ran into the same thing and filed a bug with Apple (FB7368959). A colleague running Xcode 11.1 on Catalina did not have the same problem, nor did another running Xcode 11.1 on Mojave.
Here is a workaround that got me back on track: I opened the problematic project in both Xcode 10.3 and 11.2 beta. In both, the dynamic type styles were available in IB. I didn't change anything, but reverted to Xcode 11.1, and now the styles are there, too. Hopefully this works for Grant and anyone else that runs into this annoyance.
Edit Mar. 17, 2020: This problem has reoccurred for me on Xcode 11.3.1. It seemed to happen with a specific project, and the problem spread to a second machine as soon as I opened that project. My workaround didn't help when I opened the project in 11.4 beta 3.

SDL 1.2 and SDL 2.0 show black screen on MACOS Mojave when rendering OpenGL

While working OpenGL code using SDL 1.2 and 2.0 on MAC Mojave, the SDL window is now showing a black screen (It was working perfectly before updating to MACOS Mojave).
I googled a solution for a while and I didn't find any.
The only thing that solved the issue was updating to Mojave 10.14.3 and Xcode 10.1 . I recommend you to do the same
Downgrading is not treating the problem, it's just masking the symptoms.
the SDL window is now showing a black screen
To me this looks like an issue with double buffer configuration and/or use. But it's hard to tell without seeing some code.

Xcode 10 storyboard UI components are not visible and painfully slow?

My code was working fine (showing UI properly) when I had Xcode 9 and I removed it from the application folder (could not update as it had installed using another apple id) and reinstall the Xcode 10 from the Appstore.
Now Xcode storyboard not showing any added UI elements colors or anything and I removed Xcode 10 and installed Xcode 9 again but problem remains same.
UI screen shot of storyboard.
I tried removing Xcode in this way:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
Then I tried installing macOs Mojave and install XCode 10 again from the Appstore. Issue still remains. I tried cleaning derived data, xuserdata and everything.
Try cleaning your project using "Command + K"
and run your project again!
Hope it works!
I encountered the same issue that you are facing in my case i had xCode 10.0 installed and everything was working fine. As soon as I installed version 10.1 I faced the same issue that you're facing but the good thing was i had xCode 10.0 installed at the same time so I switched back and everything was working fine.
From my point of view my system(Mac-mini mid 2011) was lacking hardware specification that was required for xCode 10.1 also had very low graphic processor in my mac mini. If you install the same version in a MacBook or any other system having higher specification you'll face the issue. I hope that helps.
I was stuck on this all day. One of my coworkers suggested removing occurrences of IB_DESIGNABLE & #IBDesignable. This fixed the issue for me. It still lags sometimes but doesn’t go invisible anymore.
If you have multiple xib files then just try to switch between or Try moving to launchScreen storyboard and then switch to main storyboard. I think this is just loading issue.
Reinstall Xcode. That worked for me.
Click on library button(Circular Button) which is left to hamburger sign(Top Bar Right Side). Elements will be popup on your screen then you can choose elements.
try
xcrun simctl erase all
it helped me with the same problem

xcode 6.x simulators are not showing up

I have a xcode 6.x project in which i made small changes. Now i want to submit it to app store.
But none of the simulators are showing up.
i was using xcode 6.4 but then i download xcode 6.2 and it still doesn't work. How do archive it and submit it to appstore?
I cannot use latest xcode because the project is in swift so will have to make alot of changes, it's a big project.
This issue can happen if the width of the Xcode window is too narrow. Try resizing the window wider, and they should re-appear.

Resources