Post

Replies

Boosts

Views

Activity

Reply to How to make an updatable ForEach loop SwiftUI
@Claude31 The ForEach is as follows (sorry about formatting): VStack { ForEach(Array(flags.keys), id: \.self) { flag in HStack { Spacer() Button("Delete") { print("delete \(flag)") }.padding() Toggle(isOn: $isActiveToggleOn) {}.padding().onChange(of: isActiveToggleOn) { if isActiveToggleOn { print("activate \(flag)") } else { print("deactivate \(flag)") } } Spacer() Text(flag).padding() Spacer() Text(flag).padding() Spacer() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
what do you expect to get ? display text per child: where are the children defined ? where and how do you add flags ? I wanted the ForEach loop to update every time I added a value. What @B347 told me was helpful because I was able to reduce the amount of incorrect "hey"s added to my view, however did not solve the issue. The children are defined in the same place you add flags. There's a seperate window which opens that allows users to enter flags and values (this works properly). This is a seperate file within the app, however the flags dictionary can be accessed from other files. An advice: study an Apple tutorial on Swift and SwiftUI. It seems there are some basics you are still missing. I have covered the basics many times, I would not call this basic however what I learnt may differ from what you did.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
Thank you for your response, The "hey" constant was intended behaviour, and I tried your answer. I noticed that it did indeed put the flag and only the flag in the view with no extra iterations, however it didn't update (what I wanted). Also I was wondering how to get the flag value in the ForEach (there is no flag.value) This was very helpful though!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Xcode App Export flagged as malware on other user's mac
ok the certificate was revoked and replaced somehow so just make a new certificate and that will fix it.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Xcode App Export flagged as malware on other user's mac
Yes, all of those steps are accurate, For the workflow in step 3 I would press the distribute app button, custom, export app, select a location, then zip the folder, and send that zip file to my testers.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
I found that the solution to this problem would be to dismiss and re-open the ContentView
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to signal SIGABRT when loading a .sks (Swift 5.5)
hello?
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
@DTS Engineer @Claude31 Hi again, Since my project is going to be open readible the link can be found here: https://github.com/SunnyFloppyDiskStudios/FlopFlagger Most relevant files are ContentView and AddFlagView
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
@Claude31 The ForEach is as follows (sorry about formatting): VStack { ForEach(Array(flags.keys), id: \.self) { flag in HStack { Spacer() Button("Delete") { print("delete \(flag)") }.padding() Toggle(isOn: $isActiveToggleOn) {}.padding().onChange(of: isActiveToggleOn) { if isActiveToggleOn { print("activate \(flag)") } else { print("deactivate \(flag)") } } Spacer() Text(flag).padding() Spacer() Text(flag).padding() Spacer() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
what do you expect to get ? display text per child: where are the children defined ? where and how do you add flags ? I wanted the ForEach loop to update every time I added a value. What @B347 told me was helpful because I was able to reduce the amount of incorrect "hey"s added to my view, however did not solve the issue. The children are defined in the same place you add flags. There's a seperate window which opens that allows users to enter flags and values (this works properly). This is a seperate file within the app, however the flags dictionary can be accessed from other files. An advice: study an Apple tutorial on Swift and SwiftUI. It seems there are some basics you are still missing. I have covered the basics many times, I would not call this basic however what I learnt may differ from what you did.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to make an updatable ForEach loop SwiftUI
Thank you for your response, The "hey" constant was intended behaviour, and I tried your answer. I noticed that it did indeed put the flag and only the flag in the view with no extra iterations, however it didn't update (what I wanted). Also I was wondering how to get the flag value in the ForEach (there is no flag.value) This was very helpful though!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Does our app have to be a Mac App?
Might be a bit late, but it depends on what you want to do. The options however are just for what platform you built the app on. It has to be a Swift Playground (.swiftpm) file.
Replies
Boosts
Views
Activity
May ’23
Reply to Submitting to the App Store
If it works properly on the device you want it on, then its most likely ok. Since it is a Swift Playground, you may have to work on converting it into an Xcode App Project before you submit to the App Store.
Replies
Boosts
Views
Activity
May ’23
Reply to Beginner with a question regarding SimulatorTrampoline.xpc
It should be fine. I once denied it from modifying my applications but everything still works. In a future update you may be notified to allow access. From now on, allow access to prevent problems which could occur in the future. Hope this helps
Replies
Boosts
Views
Activity
Jun ’22