Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

foundation slider with active thumbnail in the visible area

I'm using the orbit modul from foundation that works fine. I have reused the area of the bullets for the thumbnails of the large slider images. This also works so far, the active thumbnail is also ...
m.orange's user avatar
-1 votes
1 answer
31 views

XMLElement has no accessible initializers on Linux

I am trying to generate an XML document using Swift on Linux. But the following code doesn't compile: let rootElement = XMLElement(name: "feed") rootElement.setAttributesWith(["xmlns&...
Kevin Renskers's user avatar
0 votes
1 answer
77 views

How can I retrieve the CPU usage of my Mac in the form of a percentage and put that into an updating variable?

I'm coding a Mac app in SwiftUI 6.0.3 and Xcode 16. My Mac is up to date with macOS Sequoia 15.3.1. I'm trying to have a menu bar item that updates at an interval with the percentage of the CPU that I ...
thefearsomeshrub's user avatar
0 votes
0 answers
102 views

CMake unable to 'find' Foundation framework on macOS 15.1.1 (24B91)

When I try a build, this is the error I see: -- Adding CPU backend variant ggml-cpu: CMake Error at ggml/src/ggml-metal/CMakeLists.txt:1 (find_library): Could not find FOUNDATION_LIBRARY using the ...
user2153522's user avatar
0 votes
0 answers
67 views

How can I transfer data between the application target and the UI test target?

I have an application that needs to be tested (UI). The application uses different feature configurations, and I'm looking for a convenient way to turn features on/off for proper testing. What are ...
lexemz's user avatar
  • 11
-6 votes
1 answer
154 views

Is there Swift 6 number formatting in string interpolation without "import Foundation"?

I like being able to do this: print( "\("YYYY") \(454.90008)" ) but I want to do this: print( "\("YYYY") \(String(format: "%.3f", 454.90008))" ) ...
igouy's user avatar
  • 2,702
1 vote
1 answer
80 views

Rounding/truncating decimal places from floats with NumberFormatter (Ubuntu 22.04)

i need 2 digits after the comma consistently but there are certain floats that just wont be formatted correctly? (as seen below) are the tricks around this? code: import Foundation let floatNumber: ...
lain's user avatar
  • 11
1 vote
1 answer
89 views

CPU Usage not updating

I’ve written SwiftUI code that uses Combine to display CPU usage metrics such as User, System, Nice, and Idle values for each core on the system. The functionality works initially in the sense that ...
Karl Ehrlich's user avatar
-1 votes
1 answer
54 views

Unbox Error for override property in Swift?

import Foundation enum OperationError: Error { case ioError(_ message: String) var localizedDescription: String { switch self { case .ioError(let message): return ...
Itachi's user avatar
  • 6,620
1 vote
1 answer
80 views

How to determine the continent name by a country code in Swift

I have an ISO two-letter country code (e.g., "US") and need to determine its continent's name. I know about the continent property of Locale.Region, which is also a Locale.Region instance, ...
lazarevzubov's user avatar
  • 2,342
0 votes
0 answers
38 views

Capturing Video and Audio from a USB device using Media Foundation on Windows

I am trying to capture video and audio from webcam using Media Foundation. The issue is that when I enumerate video devices and then audio devices, I don't know how to match the two devices because ...
hateom's user avatar
  • 31
0 votes
0 answers
23 views

Read and write file tags with URLResourecKey.tagNamesKey on iOS

URLResourecKey.tagNamesKey is only available on macOS, so apparently there's no way of reading or writing file tags on iOS. Why is this the case, given that file tags can be set via Finder on macOS ...
Nickkk's user avatar
  • 2,667
0 votes
1 answer
47 views

Exclusion of a directory from backup : NSURLIsExcludedFromBackupKey does not always stick even though setResourceValue has reported success

I want to exclude a directory in documents storage class from backup. Setting exclusion attribute like so + (BOOL)kit_addSkipBackupAttributeForItemAtURL:(NSURL *)url { if (![[NSFileManager ...
Anton Tropashko's user avatar
1 vote
0 answers
51 views

exclude files from iCloud backup

I have a bug on my hands where icons, etc are being backed up to iCloud backup. My first knee jerk reaction was that it's in the documents directory class but they are properly stowed in the ...
Anton Tropashko's user avatar
0 votes
2 answers
43 views

How to display "3 of 10 files" using localizedAdditionalDescription of NSProgress

I would like to utilize NSProgress localizedAdditionalDescription but I cannot figure out the combination to get it to format file count. Either i am not getting any suffix or I get bytes. progress....
Marek H's user avatar
  • 5,576

15 30 50 per page
1
2 3 4 5
66