I'm using SwiftData with an @Model and am also using an @ModelActor. I've fixed all concurrency issues and have migrated to Swift 6. I am getting a console error that I do not understand how to clear. I get this error in Swift 6 and Swift 5. I do not experience any issue with the app. It seems to be working well. But I want to try to get all issues taken care of. I am using the latest Xcode beta.
error: the replacement path doesn't exist:
"/var/folders/1q/6jw9d6mn0gx1znh1n19z2v9r0000gp/T/swift-generated-sources/@_swiftmacro_17MyAppName14MyModelC4type18_PersistedPr> opertyfMa.swift"
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
For iOS 14 and watchOS 7.0, I completely recoded and modernized my app using Swift (was Objective C). I am almost done and am most proud of the job, but I have this issue that I need to fix on the Apple Watch app. I am not able to transfer data to the Apple Watch from the iPhone and get the following console messages. (The [xxx:xxxxxx] are my modification of the console messages.). I am guessing that the first 2 messages are the thing I need to fix and I need to fix this issue before I submit the app.
2020-09-24 08:29:02.873423-0400 WatchApp Extension[xxx:xxxxxx] [default] lookupMainFuncAddressInMachHeader:71: Invalid Swift entry point data
2020-09-24 08:29:02.874413-0400 WatchApp Extension[xxx:xxxxxx] [default] lookupMainFuncAddressInMachHeader:77: Swift entry point addres could not be determined.
2020-09-24 08:29:04.001368-0400 WatchApp Extension[xxx:xxxxxx] [WC] denying activation due to missing delegate
ExtensionDelegate: your iphone is Reachable
ExtensionDelegate: Session activated
2020-09-24 08:29:10.884500-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:29:15.046379-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:29:15.047176-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:29:15.047860-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:29:15.782075-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:29:24.390293-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:31:57.059417-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:32:00.055282-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
InterfaceController: your iphone is Reachable
2020-09-24 08:32:00.058230-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:32:08.427192-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:32:13.374677-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:32:13.375717-0400 WatchApp Extension[xxx:xxxxxx]] [WC] WCSession is missing its delegate
2020-09-24 08:32:13.376426-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:32:51.861915-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
Xcode 15 beta is giving me the following warning for my Mac App (Mac Catalyst), SDK: macOS destination.
Only one native Mac app can be added to the App Store.
I don't see the warning on Xcode 14.3.1.
What gives? I don't see anything about this in the release notes for the beta version.
Running watchOS 9.0.1 and Xcode 14.0.1. Also running iOS 16.0.2. Trying to run my code on the new Apple Watch Ultra and this is what I get (see below). Rebooted everything. Still no go.
Failed with HTTP status 403: forbidden
I have an app that uses Core Data and CloudKit that I am trying to convert into a SwiftData CloudKit app. Things were working very well until this most recent beta (beta 5) of Xcode 15.0. I have image data which the app saves as Data in external storage. I let Xcode convert my Core Data model in to a SwiftData model. As I said, things were working well. I could turn the image data into an Image for SwiftUI. That is, until beta 5. With beta 5, I get the following.
SwiftData/BackingData.swift:210: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON."
Well the data is NOT JSON, it is image data and yet, I get this fatal error. Does anybody else see this?
I have saved data using the app on the beta 5 simulator using SwiftData and I have verified that the data is correct using my core data app. The images are fine.
I get the following message when I try to run this app in Xcode.
Could not launch AppName. Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
Interestingly, the destination Mac (Mac Catalyst) destination does launch. The funny thing is there is a companion app almost exactly like this one that launches fine. Any help with this would be greatly appreciated.
Xcode helped me to file a feedback. The number is FB13206919.
I posted this before and thought I had fixed it, but I did not. I have an app which used to work well but now fails to launch the destination Mac (Designed for iPad). It builds fine, but doesn't launch. It does launch as aa Mac Catalyst app and if I modify the bundle id slightly, it launches as a Mac (Designed for iPad) app. I have a very similar, and I mean very similar, project that does not have this problem. I have automatically managing signing checked. would like and appreciate any help you can give me that would help me to solve this problem. I had a feedback on this, but closed it when I thought I had fixed the problem by changing the bundle id, running and then changing the bundle id back. I get the following error information.
Could not launch “App Name”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
User Info: {
DVTErrorCreationDateKey = "2023-09-27 03:23:51 +0000";
DVTRadarComponentKey = 968756;
IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}
The operation couldn’t be completed. Launch failed.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launch failed.
Launchd job spawn failed
Domain: NSPOSIXErrorDomain
Code: 153
I have a major issue with @ObservedObject.I have the following statement@ObservedObject var model: UserDatain a good number of views and before Beta 5, I did not have to pass this variable into the preview, nor did I have to pass his variable into other views which already have the above statement.But now I do have to and it's a mess. Is there anyway around this?
I currently have a UIKit app which uses a UIStoryboard and which has a tab bar controller. I removed the tab bar controller from the storyboard and created a tab bar app in SwiftUI which has the UIKit views represented as UIViewControllerRepresentable within structs. I changed the visionOS app destination from 'visionOS Designed for iPad' to 'visionOS' because I want to see the tabs on the left side in visionOS. I got a ton of warnings and some errors. I fixed the errors (which were related to user location). But the warnings are with regards to the storyboard and storyboard segue. The app runs perfectly fine but the warnings warn that UIStoryboard and UIStoryboardSegue will not be supported in a future version of visionOS. I wonder first why this was done and second, how much time will I have to fix the warnings? Could I release the app as is and fix later or will the support be dropped in a short timeframe? One of the ways to create views for view controllers in UIKit is through a storyboard. If you kill those in visionOS, then you restrict a big way that one can embed a UIKit view controller in SwiftUI.
I'm getting a lot of warnings of this within my app. I'm trying to migrate to Swift 6.
I have beel fiddling with SwiftUI and it has taken up a huge amount of CPU %. Has anybody else experienced this? It it takes forever to build. I think I have it confused.My Xcode is shut down, but I still have two swift processes running at 98%.Something wrong here....
I have a project where I am upgrading my Apple Watch app to use SwiftUi and the SwiftUI lifecycle. For some reason, my destination views are missing the back button (<) and the navigation title. It all works fine with NavigationView, but I definitely want to go to NavigationStack and use the new API.
Question. Is there a way to hook up the Apple Vision Pro to the Mac for development without using the $299 dongle? I was thinking of a USB-C cable from the battery to the Mac. Someone mentioned wireless, but usually one has to connect first.
I took one of my apps and have gone through the process of making it compatible with Swift 6. I started with Swift 5 and Complete Concurrency Checking and eliminated every warning. I flipped the switch to Swift 6 and I have no compile errors and no warnings. I also created a ModelActor and created async functions to fetch, delete, get an object's persistentID and save model objects. My SwiftData model has a notes property and the user can update or add onto the notes and resave the model object. The app crashes when I save the changes using an explicit save operation. However, the next time the app is launched, the changes did propagate. If I do not use the explicit save operation, the system does not auto-save and does not crash.
When I switched back to Swift 5 and tried it out, I was able to save without a crash. I did need to use an explicit save operation though.
However, I am now getting 3 warnings like the following.
Type 'ReferenceWritableKeyPath<MyModel, Optional>' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
The line of code that produced that warning is
`let fetchDescriptor = FetchDescriptor(sortBy: [SortDescriptor(\MyModel.title)])
However, when I flip the switch back to Swift 6, the three warnings go away and I have zero warnings under Swift 6.
I created a very simple project with a NavigationStack and a NavigationLink as follows.
Code 1.
NavigationLink("Go To Next View", value: "TheView")
.navigationDestination(for: String.self) { val in
Text("Value = \(val)")
}
This code works fine in the simple project. But when I put this simple code into my existing app's project using a NavigationStack, it navigates to the next view fine, but there is no back button. I am updating my Apple Watch target to use SwiftUI and I want to use NavigationStack.
My app does use @ObservedObject and my important data is using @Publish in a singleton class which conforms to ObservableObject. But this NavigationLink code, Code 1, is extremely simple and should work fine, but it does not.
The same problem happens with the following code.
Code 2
NavigationLink { NextView() } label: {
MainRowView(rowText: "Saved")
}
When I switch to NavigationView, Code 1 is grayed out, but Code 2 works fine and has a back button. However, as you know, NavigationView is being deprecated, so I really need to fix this or have it fixed. I can't see how this could be a problem with my code as the code snippet is so simple and worked in the simple project.