Cannot preview in this file - SwiftUI Testing.app may have crashed - swift

I got this error after launching Xcode 11 beta with a newly upgrade OS whenever I tried previewing (Resume button). Preview not working.

Solution was to make sure Command Line Tools were set to Xcode 11 in
Preferences -> Locations -> Command Line Tools

Related

How to debug quicklook plugin on macOS Catalina?

I have a quicklook plugin which generates Finder thumbnails and QuickLook Previews for my custom file extension for files in my Virtual File System (developed via FUSE).
The problem is that on macOS Catalina, QuickLook Preview doesn't work for files with specified extension.
Usually, I debug this by having GenerateThumbnailForURL.m 'echo' debug text to a file on Desktop OR NSLog or os_log so that content is visible in Console.app.
However, when Console.app displays the log text from my plugin, it is shrouded with <private> items instead of actual content.
Is there a way to circumvent this for Console.app or some other way in which QuickLook plugin can be debugged on macOS Catalina?
I tried this but it doesn't seem to work on macOS Catalina 10.15.3.
You should not use GeneratePreviewForURL for quicklook preview generation on Catalina.
Instead, one should implement the QuickLook Preview Extension target. Launching the target will open the debug session where everything can be debbuged in classical way.
Btw, echo-ing from GenerateThumbnailForURL.m should no longer work on Catalina because the extension doesn't have write permissions.
Yes, you can still debug Quick Look Plugins on macOS Catalina.
I am on 10.15.6 and using the following:
Add NSLog(...) statements to your code.
Build your .qlgenerator file and install it into ~/Library/QuickLook
run qlmanage -r to activate your new plugin
run qlmanage -p someFile to run the preview generation and see the NSLog statemnts of GeneratePreviewForURL in the Terminal.
run qlmanage -t someFile to run the icon generation and see the NSLog staments of GenerateThumbnailForURL in the Terminal.

Finder Synch Extension Waiting to Attach in XCode 7.0.1 OSX 10.10

I have written a Finder Synch extension with Swift and add to my project target in XCode 7.0.1. At first run, it works as normal but after several runs, it stall on Extension Waiting to Attach. If I open a Finder window, nothing happened and my class init never called.
Do you face any problem like this? Using Mac OSX 10.10.5 Yosemite with XCode 7.0.1.
This happened to me also, make sure your entitlements and certificates / signing are set correctly. Working with a non signed finder sync extension caused exactly the problems you described.
edit: one more thing, the optional relaunch (alt + right click on finder) also helps attach to the extension after it is launched.

Terminal: Swift Build command does not work

When I am using Swift Package builder in the OSX terminal, it does now work.
swift build
I get:
:0: error: no such file or directory: 'build'
REPL works and all the snapshots seem to be installed. Does anyone know the issue?
Yes. It helps. By Default command line tool will have nothing selected. Once you click a drop down will come and you can select the latest xCode. This will associate the XCode tool chain to the command line and you can use swift build, swift package init etc. You may not have to set the path also.
The solution is to download the development snapshot, not the release one - https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a-osx.pkg
/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin should be appended before $PATH in your .bashrc:
PATH=/Applications/IBM/node/bin:/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:$PATH
A simpler solution is to install latest Xcode and change the command line tools to point to latest XCode Version. It can be done by going to Xcode > preferences > Locations > Command line tools.
Change it to Xcode (version number).

Filemerge application not working from svnX after installing xCode4.3?

I just installed xcode 4.3, since they moved filemerge application inside xCode package. filemerge is not working through svnX app(I have set default application as filemerge in svnX) to find the difference. How to fix this one(Xcode4.3 + svnX + filemerge)?
It appears that the system does not know about the new path to the Developer directory. I executed the following command in Terminal and restarted svnX. This did the trick.
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/
After installing the Xcode 4.3 all the utilities apps are moved in the Xcode.app folder in the applications. just do a "Show Package Contents" and navigate to :
/Applications/Xcode.app/Contents/Applications and you'll find it there, u can drag it to your dock back again

Is possible build an iPhone project from mac os x terminal and without an xcode project?

is possible build an iPhone project from Mac os x terminal and without an xcode project?
I'd like to make an iPhone static library without create and using xcode project and only with the terminal.
Thanks
For subsequent builds, after the first one, you can look at the command lines that Xcode executes in its Build window (there's a little command disclosure tab) and copy all those command lines into a script or suitable makefile template.