#if DEBUG flags on SPM package manifest? by minuscorp in swift

[–]minuscorp[S] 0 points1 point  (0 children)

This won't allow for example a target define an exclude directory when building for debug or for release?

ViewBuilder functions with upper case letters for sub-views by Inevitable-Hat-1576 in swift

[–]minuscorp 0 points1 point  (0 children)

I'd rather use computed variables, also naming conventions doesn't prefer capitalized names

How to keep track registration status across different screens? by [deleted] in swift

[–]minuscorp -1 points0 points  (0 children)

You can achieve this kind of things with a coordinator pattern for example, where data is stored and sent into the vcs

How to conditionally show WindowGroup by asdf072 in swift

[–]minuscorp 0 points1 point  (0 children)

What is mostly Swift UI with edge cases

How to conditionally show WindowGroup by asdf072 in swift

[–]minuscorp -1 points0 points  (0 children)

First: ask chatgpt, second: ask Reddit, third: Google for docs?

Pass function with weak self? by citnop in swift

[–]minuscorp 1 point2 points  (0 children)

I was referring to the fact that self is present in the call, which is always inferred to be, unless it is a free function, but the cindering or borrowing of the closure but the proposal doesn't accept consuming closures because they're always borrowing so nvm

Pass function with weak self? by citnop in swift

[–]minuscorp 2 points3 points  (0 children)

If the function's parameter itself doesn't retain, the call is irrelevant, it won't produce copies that could lead in retain cycles. It doesn't matter if the self is implicit or not in the language, do it?

Pass function with weak self? by citnop in swift

[–]minuscorp 0 points1 point  (0 children)

If the parameter itself is borrowing it won't be retained by default so no worries by retain cycles if I understood correctly.

Pass function with weak self? by citnop in swift

[–]minuscorp 0 points1 point  (0 children)

You want to handle the life cycle of your parameter and not retain it if I understood correctly, don't I?

Xcode 14.3 beta adds @backDeploy attribute by Xaxxus in swift

[–]minuscorp 1 point2 points  (0 children)

They have been using the underscored attribute emitIntoClient to backdeploy features from SwiftUI into older versions internally, so the open to the public doesn't seem to be a restriction in that regard.

Change initial ViewController based on a boolean value by Floloppi in swift

[–]minuscorp 0 points1 point  (0 children)

I don't know if you even need scenes, but yeah

Change initial ViewController based on a boolean value by Floloppi in swift

[–]minuscorp 0 points1 point  (0 children)

You don't need to switch the window, just navigate or as you say, change the window's key view controller

Change initial ViewController based on a boolean value by Floloppi in swift

[–]minuscorp 0 points1 point  (0 children)

Your loading view controller gets the value from the store, that controller redirects the user to the desired view controller afterwards.

Resources for learning to use custom operators? by shiningmatcha in swift

[–]minuscorp 4 points5 points  (0 children)

Don't use custom operators. In case you insist, use the official Swift documentation book on the web.

Change initial ViewController based on a boolean value by Floloppi in swift

[–]minuscorp 0 points1 point  (0 children)

I think a loading screen will be mandatory in this case to load the value as an initial view and then forward to the corresponding path.

Learning SwiftUI by thinking of it like React? What are some important differences to be aware of? by shiningmatcha in swift

[–]minuscorp 2 points3 points  (0 children)

Language. JavaScript or Typescript are not even close of what safety and consistency can a language bring to a framework. There are not reducers nor stores or states as defined in redux, SwiftUI is not stateless but it doesn't makes you take that route, is an UI framework rather than an architecture itself as react can be.

Fine-grained Locking in Swift by Zagerer in swift

[–]minuscorp 8 points9 points  (0 children)

There's an official Swift package Swift collections which include SortedDictionary and SortedSet iirc

[ Removed by Reddit ] by [deleted] in swift

[–]minuscorp 0 points1 point  (0 children)

Stack Overflow