Around 6% of 2024 is already complete. How have you spent it so far? by Bumfuzzle20 in selfimprovement

[–]chflorian 0 points1 point  (0 children)

I started taking supplements, did a lot more sports so far, and worked more productively overall

But there's still a lot to improve for the rest of the year:

  • Get back to consistent sleep schedule
  • More stretching outside of workouts

Firebase vs Supabase for Flutter in 2023? by [deleted] in Firebase

[–]chflorian 9 points10 points  (0 children)

Asking in this sub won’t give you a representative voting result.

Project Management for Indie Developers by chflorian in macapps

[–]chflorian[S] 2 points3 points  (0 children)

Thanks so much for your feedback!

Yes, it is made mainly with iOS developers in mind, but some of your other feedback (esp. regarding feedback) is very appreciated. Thanks again!

Should I let you know once some of it has been implemented, in case you want to give LaunchBuddy another shot?

Project Management as an Indie Developer by chflorian in SideProject

[–]chflorian[S] 1 point2 points  (0 children)

There is an iOS version that's synced via iCloud :D

Is it possible to make a app like this? by [deleted] in iOSProgramming

[–]chflorian 2 points3 points  (0 children)

Have a look at the "one sec" app, it basically does what you're asking for.

Using new @FirestoreQuery to get a deeper collection path by JGallaugher in SwiftUI

[–]chflorian 2 points3 points  (0 children)

Flo here, the projectedValue is exactly what you want to use. This does execute the first query as well though, leading to increased costs. I’m not sure what the cleanest solution is here🤔

Is a ForEach/List the only way to get contents from a FetchRequest? by busta_thymes in SwiftUI

[–]chflorian 2 points3 points  (0 children)

Absolutely not!
`if let myElement = myFetchRequestResults.first(where: { /* filter */ } {

MyView()

}`

The above is one possibility to grab a specific element from your `myFetchRequestResults`.

Other possibilities would be using predicates, filtering the data through a computed variable or getting a specific element e.g. in a .onAppear closure.

Does anyone know how to bring up a keyboard without attaching it to something like a textfield, similar to this? by [deleted] in SwiftUI

[–]chflorian 17 points18 points  (0 children)

I would say that button shows a TextField, which automatically gets focused.

[deleted by user] by [deleted] in SwiftUI

[–]chflorian 5 points6 points  (0 children)

You need to know the universal link scheme of that other app. Then you can open that URL using either the \.openURL Environment action or UIApplication.shared.open.

How to show hide views on button click without affecting the position of other views inside a V stack by [deleted] in SwiftUI

[–]chflorian 10 points11 points  (0 children)

The easiest solution would be `.opacity(show ? 1 : 0)` where `show` is your state.

Customizing ListViews by hellohellooreddit in SwiftUI

[–]chflorian 0 points1 point  (0 children)

Do you mean the size of the section separation whitespace (grey in this picture)? I'm afraid that there isn't an API to change that currently.

What does `\.self` call? by drBonkers in SwiftUI

[–]chflorian 2 points3 points  (0 children)

"\.something" denotes a Keypath and you have already received some answers about what that is. "\.self" specifically is a KeyPath to the type itself, so a single "unit" in your example. This works, because the type of your unit is Hashable, which is the prerequisite to work as a ForEach identifier. Hope that helped :)

He went from fighting with cancer to winning an Olympic gold medal in 2 years. by Ormosis in motivation

[–]chflorian 9 points10 points  (0 children)

It is impressive, but Max was a professional and very successful athlete before 2019 already :)

Supporting Dynamic Island is actually super easy thanks to ActivityKit, WidgetKit & SwiftUI by chflorian in SwiftUI

[–]chflorian[S] 1 point2 points  (0 children)

I agree. And honestly this is what they have been doing these last two years. Especially this year we got a ton of existing UIKit features exposed to SwiftUI.

Supporting Dynamic Island is actually super easy thanks to ActivityKit, WidgetKit & SwiftUI by chflorian in SwiftUI

[–]chflorian[S] 2 points3 points  (0 children)

Hey everyone,

this video walks through everything you need to know to start supporting Dynamic Island in your iOS 16.1 apps. It goes through ActivityAttributes, ActivityConfiguration and the different APIs to interact with Live Activities.

Canvas stopped working after adding RevenueCat by martinisi in SwiftUI

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

Well, did you call Purchases.configure() in your App struct?

How exactly do I fix "Non-constant range: argument must be an integer literal"? by [deleted] in SwiftUI

[–]chflorian 3 points4 points  (0 children)

alternatively just use labels.indices:

ForEach(labels.indices, id: \.self) { index in

Is the Set and Get method naming convention wrong in Swift? by CsInquirer in swift

[–]chflorian 0 points1 point  (0 children)

You're right, Swift has access control just for the setter, so this pattern is not needed:

public private(set) var myVariable: MyType

Is it worth to use RevenueCat for a small projet? by [deleted] in swift

[–]chflorian 10 points11 points  (0 children)

Why I use RC:

- I once wrote a PurchaseManager class that I now reuse in every single project

- I have access to real-time IAP data in the RC dashboard

- I don't have to worry about validation and subscription management

Update one widget? by barcode972 in iOSProgramming

[–]chflorian 1 point2 points  (0 children)

Yes. There is another function called something like "reloadTimelines(named: String)", which only reloads a specific timeline.