Post

Replies

Boosts

Views

Activity

SwiftData adding INTs from records of the same date
Hi All, Looking for some help. I have an app that uses Charts and SwiftData. I have created @Query that filters the records and charts displays Ints in a line graph by the date. Easy. Most dates have two or more records. What I need to do is add all the ints from the same day and use that result in the chart. Any help you can send my way? Thanks so much. Blessings, --Mark
0
0
249
Jun ’24
@FocusState problem
Hi I have an enum of the TextFields in an Update SwiftData view. When the view opens, the focus is correct, and the button in the .toolbar keyboard sets the focus to nil and dismisses the keyboard. It works just fine. But, if I tap on a different TextField other than the original field that the focus was set in a .onAppear, the button on the keyboard dims out and no longer works. This same code works as expected in another view, the only difference in the Update view is that the data in the fields comes from an @Bindable variable. Any clue what is going on? Thanks so much! Blessings, --Mark
9
0
689
Jun ’24
CloudKit container error
Hi, The last two apps I created report the same error: <CKError 0x283e221f0: "Bad Container" (1014); "Couldn't get container configuration from the server for container "iCloud.bundleID""> Since the bundleID and the iCloud container are the same text, I figure there must be something wrong in the profile or certificate. No? My other apps are working as expected. I have the entitlement checked in the identifier, identical to the apps that are working. Any idea? Thanks. Blessings, --Mark
1
0
860
Mar ’23
Core Data Error
Hi the Log is showing the following error after the app adds data to Core Data from a sheetView: CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate tearDown:]_block_invoke(782): <NSCloudKitMirroringDelegate: 0x28379abc0>: Told to tear down with reason: Store Removed I can't seem to find a reference to what is going on. Can someone point me in the right direction? Thanks. Blessings, --Mark
1
0
693
Sep ’22
Xcode 13.2.1 preview canvas not responding to keyboard
Hi, The canvas shows correctly all updates to the code, but when the run button is clicked, the keyboard is not working. I have tried a new project, deleted the simulator plist in the preferences, of course, cleaned and built again. Nothing works, and it is driving me nuts. I run the code on a device or a simulator, works as expected, just not in the canvass. Thought? Thanks so much! Blessings, --Mark
6
0
2k
Dec ’21
iOS 14 background image not changing.
Hi all, Can anyone tell me why the following code works perfectly when it runs the first time, or when the app reloads? It does not however change the VC background image, although I can see it step through the code. The image does load correctly when the app is swiped away and reloaded. I am stumped. Any thoughts would be much appreciated. Blessings, --Mark if CacheManager.getIsUserBackGround() { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;//get a refrerence to the the documents for the app &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let fileManager = FileManager.default &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;//get the path from Constants &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let imagePath = Constants.getImage() &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;//check if not nil, and if not set the background pict &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if imagePath != "" { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if fileManager.fileExists(atPath: imagePath!) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;DispatchQueue.main.async { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let backgroundImage = UIImageView(frame: UIScreen.main.bounds) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;backgroundImage.image = UIImage(contentsOfFile: imagePath!)! &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;backgroundImage.contentMode = UIView.ContentMode.scaleAspectFill &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;self.view.insertSubview(backgroundImage, at: 0) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}else{ &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;DispatchQueue.main.async { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;print("error") &#9;&#9;//&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;Alerts.showAlert(title: "Attention", message: "A user selected image from the Photos Library has not been saved. \n \n Tap the Gear icon on the 'Lists' screen and select the 'Set background from Photos' option to save an image.", vc: self) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}
6
0
1.7k
Oct ’20