Posts

Post marked as Apple Recommended
It would have been really helpful, @eskimo , if you would have just given a practical example. Being visually impaired, my greatest pet peeve of all is lack of good documentation in almost everything tech these days. And companies like Apple, with unlimited cash to hire good tech writers, have no excuse. Because, of course, on macOS, man ulimit does not help (it just spits out the General Commands Manual). Not helpful. Here is an actual manual page for ulimit (because Apple doesn't provide it, because, well, it's using an old version of FreeBSD, so who knows how compatible the other flags are): https://ss64.com/bash/ulimit.html And here is the flag to increase number of open file descriptors: -n The maximum number of open file descriptors. For example, before ulimit: pgbench -c 1000 -T 60 -p 6432 pgbench: error: need at least 1003 open files, but system limit is 256 pgbench: hint: Reduce number of clients, or use limit/ulimit to increase the system limit. OK, well, how? "...use ulimit..." great, thanks. Note the manual page has at least 24 argument flags!!! Increase limit for current Terminal session: ulimit -n 1004 Where 1004 is however many you need, may have to experiment. (Now how hard was that one-liner to document here? But when we all have to look it up, add up all those hours. Multiply that by 100 times per day for each of us.) pgbench -c 1000 -T 60 -p 6432 Now works.
Post not yet marked as solved
4 Replies
I finally found the answer: "Optimize Interface for Mac" Had the same problem: "maximizing" the UIWindow made it about 1/3 too small using UIScreen.main.bounds, and about 50% too large with UIScreen.main.nativeBounds. Now, according to the UI guidelines, - https://developer.apple.com/design/human-interface-guidelines/mac-catalyst/overview/introduction/ "you can choose the "Optimize Interface for Mac" setting, or Mac idiom, in Xcode. With the Mac idiom, your app takes on an even more Mac-like appearance and the system doesn’t scale your app’s layout." This is in the same place where you enable macOS for the iOS/Catalyst app, under your project settings -- your project's target -- General -- Deployment Info. Change "Scale Interface to Match iPad" to "Optimize Interface for Mac." Here is how I changed my SceneDelegate -- scene willConnectTo: code: swift if let windowScene = scene as? UIWindowScene { let window = UIWindow(windowScene: windowScene) #if targetEnvironment(macCatalyst) if let titlebar = windowScene.titlebar, let sizes = windowScene.sizeRestrictions { titlebar.titleVisibility = .hidden titlebar.toolbar = nil sizes.minimumSize = window.screen.bounds.size sizes.maximumSize = window.screen.bounds.size } #endif window.rootViewController = UIHostingController(rootView: contentView) self.window = window window.makeKeyAndVisible() }