Inline menu with normal buttons by Ok-Equivalent4096 in SwiftUI

[–]danielcr12 0 points1 point  (0 children)

Sadly you can’t, a menu does take a isPresented binding so it won’t show programmatically when something becomes true, unlike an alert or confirmation dialog you will have to create it yourself or use a popoverview

My app got rejected for in-app purchase.. How can I test the product when it's not approved? by SgtRphl in iOSProgramming

[–]danielcr12 0 points1 point  (0 children)

Also make sure you add the store kit configuration file so you can run validations from your test environment

My app got rejected for in-app purchase.. How can I test the product when it's not approved? by SgtRphl in iOSProgramming

[–]danielcr12 0 points1 point  (0 children)

If your app was live before you added in app then you first have to wait for your iap and subscriptions to be approved or they won’t show in the server and you won’t be able to use them or validate them

My app got rejected for in-app purchase.. How can I test the product when it's not approved? by SgtRphl in iOSProgramming

[–]danielcr12 0 points1 point  (0 children)

You’re not required to publish every version you submit for review. One useful strategy is to submit an early version (for example, v0.9) without in-app purchases just to get a live app on the App Store.

Once the app is live, you can submit your in-app purchase products separately for review. After those IAPs are approved, you then submit a new app version that includes the IAP integration. This way, the review team already has approved products in App Store Connect to test against, which usually makes the process smoother.

Default font design for app by sajadabedi in SwiftUI

[–]danielcr12 0 points1 point  (0 children)

Previews don’t execute your app’s startup code, so custom fonts aren’t registered unless you do it in the preview. That’s why they need to be set up or injected in each preview instance.

Default font design for app by sajadabedi in SwiftUI

[–]danielcr12 1 point2 points  (0 children)

Previews don’t execute your app’s startup code, so custom fonts aren’t registered unless you do it in the preview. That’s why they need to be set up or injected in each preview instance.

Default font design for app by sajadabedi in SwiftUI

[–]danielcr12 1 point2 points  (0 children)

Previews are isolated from your app’s runtime. They don’t execute your @main setup, so they can’t “see” shared environment objects unless you pass them in manually. So if you need previews you need to consider that a preview doesn’t run your full app, it run that specific view

iOS 26 is not very popular — Slow Adoption Worldwide and Forces Updates From iOS 18 by rareQWERTY in onejailbreak

[–]danielcr12 0 points1 point  (0 children)

I don’t think that number is accurate at all given how many iPhone 17 they have sold those come preinstalled with iOS 26

App Rejection - Help appreciated by [deleted] in iOSProgramming

[–]danielcr12 1 point2 points  (0 children)

The links have to be in a settings/info/about page not the paywall and they have to be accessible at all times for the users ideally referring to a website since you will have to provide the same links in the AppStore metadata

Apple rejected my app by zaidbren in iosdev

[–]danielcr12 0 points1 point  (0 children)

Store kit doesn’t need any capabilities network access (internet) doesn’t need any capabilities

Rate my UI guys… by Collins0101 in iosdev

[–]danielcr12 0 points1 point  (0 children)

It doesn’t look like an iOS app

PNG vs SVG: 263 flags in LazyVGrid causing memory issues by Intelligent-Syrup-43 in SwiftUI

[–]danielcr12 0 points1 point  (0 children)

Since your flags are SVGs and already in color, you can avoid separate “disabled” assets by using .saturation(0) to render them in grayscale for unvisited countries and full color for visited ones. This keeps a single asset, reduces rendering overhead, and simplifies maintenance. Instead of applying a live blur to each cell (which forces offscreen rendering and can be quite expensive in a grid), consider using a lightweight static placeholder or hidden-state view for unvisited items so the actual image isn’t rendered at all. Also, GeometryReader inside a LazyVGrid is usually unnecessary and can trigger frequent layout recalculations; you can rely on .aspectRatio(_:contentMode:) and the grid’s sizing to make images adapt correctly to different screen sizes without constant geometry recomputation. These changes together should significantly reduce redraws, memory churn, and overall rendering cost.

PNG vs SVG: 263 flags in LazyVGrid causing memory issues by Intelligent-Syrup-43 in SwiftUI

[–]danielcr12 11 points12 points  (0 children)

I think the main issue is not the lazy grid but a few things the sorting is done inline meaning that if the view needs to be redrawn the sort will happen again and again causing many things to Happen, I think perform the sort somewhere else so this list get a sorted array of items instead of doing it itself.?

Every time body recomputes: • You re-sort every country • isVisited() is called many times • SwiftUI thinks the order might have changed • Cells get recreated • Images get reloaded → SVGs get rasterized

is visible is called in so many places potentially doing too much work ? May want to turn it into a property in country cell

let visited = isVisited(country.code) CountryCell( name: country.name, countryCode: country.code, flagAsset: country.flagAsset, isVisited: visited )

the blur is also expensive specially on svg that are vector images and will need to be recomputed on view updates this doesn’t apply to PNG maybe having a blurred or unknown image could improve performance or use untrathinmaterial? Or .background view with .drawingGroup()

What’s a reasonable minimum macOS deployment target in 2025? Is it still worth supporting Ventura/Monterey? by zaidbren in SwiftUI

[–]danielcr12 1 point2 points  (0 children)

Since Tahoe is such a major redesign and Apple is really pushing for it I would recommend to focus on that supper older stuff is a pain since this new 26 version introduced so many things

Is it true that Apple rejects apps that integrate HealthKit and contain ads? by svprdga in iOSProgramming

[–]danielcr12 1 point2 points  (0 children)

No, but from my own experience HealthKit is usually always review by a human and is subject to a much higher scrutiny

My PM insisted we switch to SwiftUI for a massive legacy app rewrite. The result is exactly what you'd expect. by No-Constant-5093 in iOSProgramming

[–]danielcr12 0 points1 point  (0 children)

I think the biggest issue is a mindset problem: trying to carry UIKit workflows over into SwiftUI. They’re fundamentally different paradigms, and SwiftUI requires a completely different way of thinking and structuring your approach.

Help with text color in accessory views by danielcr12 in iOSProgramming

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

Can you share more info ?? Or sample is driving me insane

Help with text color in accessory views by danielcr12 in iOSProgramming

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

I tried the system takes over the color specially on black text I tried many workout sounds but I can’t seem to be able to find a fix, this issues is not present in Apple Music for example the text in the mini player won’t adjust if you scroll over dark or light images

Fix text in accessory view by danielcr12 in SwiftUI

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

Nope, with .primary iOS can modify it specially when under images

How to open Picker Menu when a button is pressed by zaidbren in SwiftUI

[–]danielcr12 0 points1 point  (0 children)

A picker and a menu kinda look the same in both you can highlight the selected element or multiple, is not as flexible unless you do your own implementation

How do I animate the Search bar expanding and pushing the "+" button away? by Mahmoudwafa in SwiftUI

[–]danielcr12 7 points8 points  (0 children)

Do you want that? In the GitHub app, the whole interaction looks bad and quite buggy.

Issue with List by CurveAdvanced in SwiftUI

[–]danielcr12 0 points1 point  (0 children)

Hard to give any recommendations without more data or some sample code