Post

Replies

Boosts

Views

Activity

Reply to How to make an updatable ForEach loop SwiftUI
Hi, you are working with a dictionary type. you have some issues in your code: This loop iterates from 0 to flags.count. flags.count returns 1 since there’s one item in the flags dictionary. But the loop will iterate from 0 to 1, meaning it will run two times, which may not be the intended behavior. This could lead to an off-by-one error. AND: you are not showing the dictionary entry in your Text View. You have to iterate over your Dictionary-Type. You are showing just the constant "hey". you have to change the code to something similar to: like ForEach(Array(flags.keys), id: \.self) and... Text("\(flag)") would propose you go to doc about dictionary. https://docs.swift.org/swift-book/documentation/the-swift-programming-language/collectiontypes#app-top)
Sep ’24
Reply to needs -Onone Swift optimization level
hi. I think you should provide more log data from the failing build process. did you made changes in build settings about compiler optimization flags/settings? maybe overwritten by mistake some values? compare with other easypeasy sample project…any difference in build settings? same result? check build setting: SWIFT_OPTIMIZATION_LEVEL -Onone is to my knowledge more or less the default setting. so if missing, just create/modify the entry in the project build settings.
Jul ’24
Reply to Scheme Setting Not Persisting For Associated Target
Hi I think it works the other way around. at least for me in Xcode 15 and also now in Xcode 16: A schema definition is neutral at the beginning and only in the schema definition can you determine or assign the target. Xcode does this for you using Autocreate. But you can also edit it yourself. A schema can contain one (1) target or several. Facit: so, selecting the Target in Project-Navigator does not change Schema. at least for me since "ever". Hope it helps. Take care. Single Schema related to Target: Screenshots (Xcode 16 Beta) Single Schema related to multiple Targets (Build all):
Jun ’24