Post

Replies

Boosts

Views

Activity

Reply to Progress Indicator not working as expected
I tried a couple of things using a separate thread but still no luck. Below is my latest try? I must be missing something basic with this in seems to be very straightforward? @IBAction func progressStart(_ sender: Any) { // Start the progress animation progressIndicator.startAnimation(self) // Do some work here... let dispatchGroup = DispatchGroup() dispatchGroup.enter() DispatchQueue.global(qos: .background).async { var progress: Double = 0.0 for _ in 0..<100 { // Update the progress value in a loop progress += 1.0 DispatchQueue.main.async { self.progressLabel.stringValue = String(progress) self.progressIndicator.doubleValue = progress / 100.0 } // Do some work here... } dispatchGroup.leave() } dispatchGroup.notify(queue: DispatchQueue.main) { // Stop the progress animation self.progressIndicator.stopAnimation(self) } } }
Jun ’23
Reply to Companion Xcode project
To Clarify, the projects I am Looking for are from WWDC2023-10154. The video says download but no link, Is the link gone after initial play? Thanks "This is a code-along. During this session, I will be building an app with you. Hit pause now, and download the companion Xcode projects: an archive with the prepared starting point, and the finished one. Open the starter project, and go to the ContentView file"
Jun ’23
Reply to Where does SwiftData store the data?
I found these three files which are part of core-data datastore as well as swiftdata 144 -rw-r--r--@ 1 bsoule staff 73728 Jul 29 10:10 default.store 64 -rw-r--r--@ 1 bsoule staff 32768 Aug 7 14:57 default.store-shm 1160 -rw-r--r--@ 1 bsoule staff 564472 Aug 7 14:56 default.store-wal in my library directory --> Library/Containers/CHCS.ArtManager/Data/Library/Application Support I expected to also see a file with an sqlite extension but I did not? Any ideas where the sqlite database is stored?
Aug ’23
Reply to Why does the first image behave differently ?
I have my iPad connected to my Mac and I am running the code above on the iPad. I am using my iPad to test because it has more images to test with than a simulator. This code works as expected on my Mac but not on my iPad. The specifics of all the devices are as follows: Mac Sonoma beta 6 Xcode 15 beta7, iPadOS 17 beta 7. Reducing the frame size makes no difference. I will test on Ventura with Xcode 14 and iPadOS 16 later today or in the morning to see if this makes a difference. Thanks for the help!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’23
Reply to SwiftData Tables disappearing while test my app!
At this point I have a couple of questions. First one is regarding your first response. Were you saying some how swiftdata know I change one of the table models and I need to do a migration? Secondly, I wanted to be able to to a clean build and have the app run as if it was the very first run, so I am thinking I need to delete any and all swiftdata persistent data. For now I am not using cloudkit. So, what you described in your second answer is how to do this? So, I am trying to find the cause and a resolution for the tables being dropped Thanks
Aug ’24
Reply to SwiftData Tables disappearing while test my app!
A few more points to add to this issue: I used another computer which had never been used for testing my app. macOS Sonoma as well as Xcode 15.4 was used. Same issue. To me this suggests I have some in the source or Xcode settings is causing this behavior. I changed my source to I changed this code to print the SwiftData containers etc. var sharedModelContainer: ModelContainer = { let schema = Schema([ ArtPiece.self, Clientele.self, TrackingArt.self, Invoice.self, InvoiceItem.self, AppSettings.self, Pay.self ]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) do { let container = try ModelContainer(for: schema, configurations: [modelConfiguration]) // Add print statements here print("ModelContainer:", container) print("Configurations:", container.configurations) print("Schema:", container.schema) return container } catch { fatalError("Could not create ModelContainer: \(error)") } }() I see this line on the Xcode Debug Console url: file:///Users/bobsoule/Library/Containers/B43D6A46-213E-427E-ACE5-B7EE77071C0C/Data/Library/Application%20Support/default.store However I don't see this folder B43D6A46-213E-427E-ACE5-B7EE77071C0C in /Users/bobsoule/Library/Containers I have the issue on Xcode15 as well as Xcode 16 beta I have attached the Debug Console Log from this test. I am able to create and populate with data three of the tables before this issue arrises. debugConsole.txt
Aug ’24
Reply to Progress Indicator not working as expected
I tried a couple of things using a separate thread but still no luck. Below is my latest try? I must be missing something basic with this in seems to be very straightforward? @IBAction func progressStart(_ sender: Any) { // Start the progress animation progressIndicator.startAnimation(self) // Do some work here... let dispatchGroup = DispatchGroup() dispatchGroup.enter() DispatchQueue.global(qos: .background).async { var progress: Double = 0.0 for _ in 0..<100 { // Update the progress value in a loop progress += 1.0 DispatchQueue.main.async { self.progressLabel.stringValue = String(progress) self.progressIndicator.doubleValue = progress / 100.0 } // Do some work here... } dispatchGroup.leave() } dispatchGroup.notify(queue: DispatchQueue.main) { // Stop the progress animation self.progressIndicator.stopAnimation(self) } } }
Replies
Boosts
Views
Activity
Jun ’23
Reply to Progress Indicator not working as expected
I ended up going a different route, I got it working like I wanted via SwifUI, I wanted to learn more about SwiftUI so this is a better way to go.
Replies
Boosts
Views
Activity
Jun ’23
Reply to Companion Xcode project
To Clarify, the projects I am Looking for are from WWDC2023-10154. The video says download but no link, Is the link gone after initial play? Thanks "This is a code-along. During this session, I will be building an app with you. Hit pause now, and download the companion Xcode projects: an archive with the prepared starting point, and the finished one. Open the starter project, and go to the ContentView file"
Replies
Boosts
Views
Activity
Jun ’23
Reply to Companion Xcode project
Here is the link for the projects. [https://developer.apple.com/documentation/SwiftUI/Building-a-document-based-app-using-SwiftData)
Replies
Boosts
Views
Activity
Jun ’23
Reply to Where does SwiftData store the data?
I found these three files which are part of core-data datastore as well as swiftdata 144 -rw-r--r--@ 1 bsoule staff 73728 Jul 29 10:10 default.store 64 -rw-r--r--@ 1 bsoule staff 32768 Aug 7 14:57 default.store-shm 1160 -rw-r--r--@ 1 bsoule staff 564472 Aug 7 14:56 default.store-wal in my library directory --> Library/Containers/CHCS.ArtManager/Data/Library/Application Support I expected to also see a file with an sqlite extension but I did not? Any ideas where the sqlite database is stored?
Replies
Boosts
Views
Activity
Aug ’23
Reply to How to customize buttons in a SwiftUI view toolbar
Yes I add tried the .tint modifier as well with no success. BTW I am using Xcode 15 beta 7, I think I will give a try with my Ventura Xcode 14 to see if that makes a difference.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to How to customize buttons in a SwiftUI view toolbar
I get the same results on Ventura and Xcode 14
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Why does the first image behave differently ?
I have my iPad connected to my Mac and I am running the code above on the iPad. I am using my iPad to test because it has more images to test with than a simulator. This code works as expected on my Mac but not on my iPad. The specifics of all the devices are as follows: Mac Sonoma beta 6 Xcode 15 beta7, iPadOS 17 beta 7. Reducing the frame size makes no difference. I will test on Ventura with Xcode 14 and iPadOS 16 later today or in the morning to see if this makes a difference. Thanks for the help!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Why does the first image behave differently ?
Does the same thing on Ventura and Xcode 14
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Why does the first image behave differently ?
This is fixed in the Release Candidate code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Deleting CloudKit data
It turns out my iCloud Drive was much bigger than I thought so after cleaning up some automated backups to iCloud I was able to get back to expect size for iCloud content.
Replies
Boosts
Views
Activity
Jun ’24
Reply to SwiftData Tables disappearing while test my app!
Is there a way to start complete fresh? I have made some changes to one of the tables but I don't want to save any data so I can start like this is the first time I am running the app? I tried a couple of actions like removing the scheme and deleting the container from macOS Sonoma but the error persists? Thanks
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftData Tables disappearing while test my app!
At this point I have a couple of questions. First one is regarding your first response. Were you saying some how swiftdata know I change one of the table models and I need to do a migration? Secondly, I wanted to be able to to a clean build and have the app run as if it was the very first run, so I am thinking I need to delete any and all swiftdata persistent data. For now I am not using cloudkit. So, what you described in your second answer is how to do this? So, I am trying to find the cause and a resolution for the tables being dropped Thanks
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftData Tables disappearing while test my app!
A few more points to add to this issue: I used another computer which had never been used for testing my app. macOS Sonoma as well as Xcode 15.4 was used. Same issue. To me this suggests I have some in the source or Xcode settings is causing this behavior. I changed my source to I changed this code to print the SwiftData containers etc. var sharedModelContainer: ModelContainer = { let schema = Schema([ ArtPiece.self, Clientele.self, TrackingArt.self, Invoice.self, InvoiceItem.self, AppSettings.self, Pay.self ]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) do { let container = try ModelContainer(for: schema, configurations: [modelConfiguration]) // Add print statements here print("ModelContainer:", container) print("Configurations:", container.configurations) print("Schema:", container.schema) return container } catch { fatalError("Could not create ModelContainer: \(error)") } }() I see this line on the Xcode Debug Console url: file:///Users/bobsoule/Library/Containers/B43D6A46-213E-427E-ACE5-B7EE77071C0C/Data/Library/Application%20Support/default.store However I don't see this folder B43D6A46-213E-427E-ACE5-B7EE77071C0C in /Users/bobsoule/Library/Containers I have the issue on Xcode15 as well as Xcode 16 beta I have attached the Debug Console Log from this test. I am able to create and populate with data three of the tables before this issue arrises. debugConsole.txt
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftData Tables disappearing while test my app!
I went back to a July 10 version of my app and put most of the changes into this version, and now it works fine. So, I still don't know what I broke to cause this but I was in the process of migrating my app to swift6. At this point I am fine and will put off the migration to swift6 to the future.
Replies
Boosts
Views
Activity
Aug ’24