Got it working. I wrapped my SwiftUI View to be printed(and displayed) in a local function like this:
private func generateView() -> some View {
VStack { .... }
}
Then I created a func to save the some View as a PDF in the document directory using ImageRenderer. The func also returns the PDF's URL which was created using URL.documentsDirectory.appending(path:)
Then I created another func using UIPrintInteractionController and the PDF's URL to present the print controller for the saved pdf.
Post
Replies
Boosts
Views
Activity
I'm having the same problem. Is this only with Intel computers?
This works as well.
let _ = print()
Suggested by an Apple Frameworks engineer:
xcrun simctl --set previews delete all
My Previews folder was 110GB and went to 6GB. Everything seems to be working well.
After selecting Xcode's menu File->New->File, select View in the User Interface group. View will create a .xib file. (This applies to iOS, MacOS and TVOS but not WatchOS.)
I received the same error. In my case, closing and reopening the project fixed the problem.
It's curious that Apple says a launchScreen.storyboard is required but no longer includes one in Xcode 12's App project template for SwiftUI.
Yeah! Just tried my app on Xcode 12.5 Beta and it's working.
On Xcode 12.4 beta the same app will show the errors posted and then crash on code that is something this:
SKNode().run(SKAction.playSoundFileNamed(....
These permission errors occurred with a project opened in Xcode 12 beta. Then when opening the project in Xcode 11, everything was fine.
SVG files have been added as of Xcode 12.
From Apple's Xcode 12 release notes:
Asset Catalogs
New Features
Added support for Scalable Vector Graphic (SVG) image assets. These preserve their vector representation with deployment targets of macOS 10.15 or later, iOS 13 or later, and iPadOS 13 or later. (18389814)
Yes, as of Xcode 12.
From Apple's Xcode 12 release notes:
Asset Catalogs
New Features
Added support for Scalable Vector Graphic (SVG) image assets. These preserve their vector representation with deployment targets of macOS 10.15 or later, iOS 13 or later, and iPadOS 13 or later. (18389814)
"Invalid parameter not satisfying: [name length] > 0"This error message occurred when I removed the value for key "Storyboard Name" in Xcode 11's info.plist. I was attempting to remove references to Main.storyboard and create the storyboards programmatically. The solution for me was to remove the "Storyboard Name" key/value altogether or add a value to "Storyboard Name" depending on the situation.info.plist/Application Scene Manifest/ Scene Configuration / Application Session Role / Item 0 / Storyboard Name
Thank-you! That fixed it for me. Do you know why this fixes this error? I don't understand the relationship between the main queue and this error.
For me, it was a spotty internet connection. Once the connection was stable, no problem occurred when rerunning the app. I made no setting changes.
Did you discover an answer?I am receiving this console message using Xcode while testing a Mac app. The app has a drag and drop feature for images. The message occurs only when dropping large jpg images (287 kb, 564kb) but not smaller images, and not large png files (525kb).