|
Has anyone seen this error and what might cause it? MessageSendFailure: Message send failure for update ==================================
This error appears when I press the Canvas Diagnostics button. I can't figure out what I've done to cause this.... |
||||
|
Here is the Swift Code that caused the error it was modeled after "Bookworm" Core Data project:
|
||||
|
This seems totally unnecessary:
Why? Why are you wrapping a text view in an HStack? HStacks are for, well stacking views next to each other. What are you stacking here? Clearly this isn't the issue. If you remove all these unnecessary HStacks from your code, you reduce your search by half, or more. |
TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and more! Sponsor Hacking with Swift and reach the world's largest Swift community! |
|
This error feels like a JAVA error. Are you trying to link your customer to a remote JAVA service?
Keywords here:
I don't think @twostraws covered any of these in any CoreData tutorial. I could be wrong. (Often!) Gut instinct is you are attempting a remote data call and the message reply handler to read your remote data is failing. |
|
|
|
Thanks for the responce, I will keep looking into this and update if I find a solution. |
|
Hmm. Weird. Post a screen shot of your entitlements file and your "signing and capabilities" screen in xcode. I agree that this seems to be an issue with something trying to reach out and touch something that either isn't at the end point, or isn't responding in an expected manner. That's how it seems. Things aren't always as they seem, but the #1 skill in software development is a thorough understanding of logic flow and diagnostics theory. You may have inadvertantly brought in a dependency or turned on a remote feature without consciously meaning to do so. I'm probably unfairly making an assumption about your level of experience with Apple development and with using XCode, so apologies if it seems like I'm sending you back to square 1. Again, diagnostics theory. It's what I do. :) Do you have icloud syncing on, are you using syncing with core data, are you logged into icloud on the device/simulator if so, and a host of other questions come to mind. I don't know that your XCode installation is corrupted, but a quick check to see if your project files have gone off a bit is to create a new project, basic template thing, run it... then start transplanting your code files into it, cleaning, building, and running it along the way, and see what results you get. I'd suggest doing so regardless of your efforts downloading and re-running Paul's project. |
|
I looked at my entitlements file and it only shows one entilement file: App Sandbox Type: Boolean and Value = Yes I tryed creating a new project file just to see what shows up under entilements with a "clean and empty" file. It shows two entitlements: App Sandbox Type: Boolean and Value = Yes com.apple.security.filesuser-selected.read-only Type: Boolean Value: 1 So that created more questions. I'm not doing iCloud syncing as when I created the project I didn't check the add CoreData and or the iCloud syncing check boxes. I added the .xcdatamodeld in myself and copied over the DataController.swift file from the Bookworm project. The only thing Network related on the Signings & Capabilities was outgoing Connections (Client) that was checked under the App Sandbox. But when I do the new project it is checked as well. Is this correct? |
|
|
|
So this discussion begs the question is there a "course/video/source" online that covers the Xcode app only. I've looked around Apple's developer site and either missed it or there isn't one. I'm looking for how to use it, what all the settings are, pitfalls, do's, don'ts. From a complete newbie to programming of any kind perspective it can be a little overwhelming. |
|
I moved the project to another computer and ran it again, strange behavior still happens will compile and run on my iPad (3rd generation 12.9 iPad Pro) but on my iPhone 11 Pro Max it will compile load on phone but when I try to use the app it freezes and crashes on iPhone??
I did notice a Thread error : Thread 1: EXC_BAD_ACCESS (code=1, address=0x1dfd85298) . Which I might have missed earlier. So not sure what that is and what I did that caused it. But I'm sure I'm guilty of doing something wrong... :) |
|
I have found a fix that allows the code to function on my iPhone. Simply moving the .navigationBarItems just outside the NavigationView let the app compile and run on the iPhone? This code was in a different "CustomerView" and effected the use of the DetailView... |
|
|
|
I have had the same problem. Recipe:
If this doesn't work, make sure your persistence.swift, any file that uses a @fetchrequest, accesses .managedObjectContext or accesses PersistenceController.shared, is referencing the correct swift files, project and app throughout. |
GO FURTHER, FASTER Unleash your full potential as a Swift developer with the all-new Swift Career Accelerator: the most comprehensive, career-transforming learning resource ever created for iOS development. Whether you’re just starting out, looking to land your first job, or aiming to become a lead developer, this program offers everything you need to level up – from mastering Swift’s latest features to conquering interview questions and building robust portfolios.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.