Assigning propertyWrapper
Hi, I am learning propertyWrappers in Swift last days and I found something strange on the internet. In this article https://nshipster.com/propertywrapper/
import Foundation
@propertyWrapper...
For??
the
for
word is throwing me off here, he could've used any other word right? it's not anything syntaxt related?
( the for
in func setAge(for person: String, to value: Int) {
)...
menubar extra swiftui open main window on tray click?
Like title menubar extra swiftui open main window on tray click?
There seem
To be no way to just implement this.
...
Can progress reporting be added to this style of https transfer?
```swift
import Foundation
func fetchData() async throws -> Data {
let url = URL(string: "https://gist.github.com/khaykov/a6105154becce4c0530da38e723c2330/raw/41ab415ac41c93a198f7da5b47d604956157c5c3/gistfile1.txt")!...
Can't run Xcode at all
Hi. I'm using a MacBook Air M1, running Xcode Version 15.0 beta 2, on macOS Sonoma 14.0. When running a simple playground code of swift, i get an error: failed to launch proccess. this operation couldn't be complete. StackOverflow claims the solution is to disable Rosetta for xcode by going to the xcode app file, selecting get info and unchecking the Rosetta checkbox. However, I don't have such a box. I tried to run some command someone said and it shows i'm using 2 different architectures as showin in picture. Is that okay?
Anyways, I don't know what to do. Apprecieate any help, thanks....

XCode concern please help
Hello, I am a user on Macbook, and I am looking to make a simple website on XCode, preferably with HTML/CSS/Java but it seems incredibly confusing to do so.
I see that most people use swift on XCode but I was just wondering if there was a way to make a regular html site on Xcode...
AR Measurement app using RealityKit
#swift-development
Value of type - 'ARViewContainer' has no member 'parentSession'
can anyone please help me with the error in the image...

opensource / full version paddle alternative opensource?
Hi everyone im building a swift ui app with a free version and an upgraded features for a small payment.
Is there anywhere in the xcode swiftui world
For licensing software with a femote api like paddle does?
...
Is it possible to replicate Mac's standard Help menu Search item?
Old programmer but Apple programming noob. I wanted to make a menubar-only app that had a text entry field in its submenu, just like Help/Search.
It compiles with no errors and runs with no errors and no log output but the
TextField
between the "Button
s" dosn't appear.
```swift...
How to position vertical Slider
I'm an old programmer but new to Mac and SwiftUI. I'm trying to get a vertical Slider positioned right up against the right edge of the window. Apparently this requires rotation:
But this rotation is just an effect. All measurements, bounding boxes, alignment, etc that effect its size and position behave as though it's still horizontal, which makes it incredibly unintuitive and frustrating to reason about, especially when new and unfamiliar with how positioning etc is done even for normal UI elements....
Slider(value: $vx).rotationEffect(.degrees(v1))
Slider(value: $vx).rotationEffect(.degrees(v1))
View Changing in Simulator not Preview
I've noticed that these lines of code, whenever I run them in the simulator, it would preview the changes in view.
However, whenever I run them in the Xcode preview, it wouldn't change the view at all? I'm quite confused about this.
```swift
import SwiftUI
...
NSScreen visibleFrame / safeAreaInsets not adding up right?
I'm trying to compare
visibleFrame
and frame
to figure out whether the dock is currently showing on a given screen. Of course, I need to account for the menubar and any inset caused by a macbook notch as part of this. However, the number I'm getting don't quite add up right!
For example, on my M2 Macbook Air:
frame
has a height of 956 (as expected)
visibleFrame
has a height of 919...SideMenuView help please, I don't have long
I have a completely fine SideMenuView and no errors but nothing comes up on the app preview, I will probably send a the code and that tomorrow
Changing a Boolean when a key is pressed.
Does anyone know how I would be able to change a Boolean when a key is pressed on a keyboard?
AngularGradient issue
Hello! I'm trying to replicate a 4 point gradient you see on the left, but I'm getting this weird line that doesn't let black and red connect and it looks like that colors do not start from corners, but are a bit off. Any help is appreciated
```swift
AngularGradient(
gradient: Gradient(colors: [.black, .black, .white, .red]), ...

MacOS user-level custom FAT16 USB volume
There's a slightly tweaked FAT16 implementation used on some Akai samplers. I've created an emulator of one of those samplers. It supports r/w USB volumes with a custom FAT16 implementation. All of this works, but currently goes via the deprecated
AuthorizationExecuteWithPrivileges
for achieving raw USB volume access.
Yesterday I looked into migrating to SMJobBless
, but it also turns out to be deprecated. It's an incredible amount of work, and this SMJobBless example gave the same error as the "Hello job bless" I tried adding directly to my project, which is "Error Domain=CFErrorDomainLaunchd Code=4".
Then I looked into using FUSE, but from what I understand, opening a raw USB volume still requires the user-level process to be elevated. Is this correct?...Can someone please send code for a side menu view?
I just saw it in a forum here and am curious and it sounds like a fun interesting challenge, please tell me how and I will experiment and adapt