Post

Replies

Boosts

Views

Activity

Xcode Launch Fails for Destination: Mac (Designed for iPad)
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
8
0
1.4k
Sep ’23
Could Not Launch Mac (Designed for iPad) App in Xcode
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.
8
1
3.2k
Sep ’23
SwiftUI tabItem Label Text Cut Off on iPad
I have an app with a TabView. The tabItems look fine on the iPhone, but one is cut off on the iPad. See the picture below. The code is simple. Here it is. .tabItem { Label("Saved", systemImage: "lock.fill") } On the iPhone, the image is positioned below the text. On the iPad, the image is positioned before the text. 'Save' would work, but that's not correct either. I'm using Xcode 15 and my minimum deployment is iOS 17. Anybody have a work around for this?
4
0
863
Sep ’23
Xcode 15 RC - CKError: Account temporarily unavailable due to bad or missing auth token
I have two apps which uses the CloudKit public folder so that my users can access data. There's also a private database for them to save data. One is supposed to be able to access the public database without being logged into an iCloud account. And it was working fine. But now, with the simulator, I get the titled error message. It's fine on a device. But, if I log into the simulator with my iCloud account, I can access the public data.
0
0
482
Sep ’23
'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
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.
6
0
932
Sep ’23
SwiftData Predicate Issue Workaround
I actually have found a workaround to an issue I reported on earlier. Here it is by example. let predicate = #Predicate<Data> { data in data.result == result && data.variable?.starts(with: SomeString) ?? false } Note the data.variable?. and the ?? false. This works. I still don't think I should have to discover these things. Something needs to be fixed on Apple's end.
3
0
1.2k
Aug ’23
SwiftData Predicate Issue
I'm in the process of converting one of my apps to SwiftData. I converted the other ones over. This app has a much more involved Schema, but SwiftData seems to handle it well. My issue is when I try to fetch data based on a. #Predicate. Here's my code. let predicate = #Predicate<Data> { data in data.result == result && data.variable!.starts(with: SomeString) } let sortBy = [SortDescriptor<Data>(\.result] let descriptor = FetchDescriptor<Data>(predicate: predicate, sortBy: sortBy) if let theData = try? context?.fetch(descriptor) { The if let at the bottom fails. Note that 'variable' is optional while result is not. I have to use ! in the predicate since it's a bool that is returned. If my predicate were just data.result == result, then all is well. I can then check the received data for the second condition in the predicate just fine. It just doesn't work inside of the Predicate. The same is true if I used contains. Anybody else having this issue? I'm using Xcode 15.0 beta 6.
3
1
1.6k
Aug ’23
UICalendarView on Mac Catalyst - Command Key for Multiple Date Selection
A good while back, I created a Mac Catalyst version of an app. The app uses UICalendarView for both iOS and Mac. I have multiple date selection enabled. In the past, I thought I could select multiple dates on the Mac without needing to use the Command key modifier. And now I can't. Is this a change or am I dreaming? How can I go back to being able to select multiple dates without using the command key modifier?
0
0
430
Aug ’23
Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
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.
11
6
2.1k
Jul ’23
SwiftUI MagnifyGesture Suggestion
I am testing out the new MagnifyGesture SwiftUI feature. My suggestion is to bring the view being magnified to the top of all views in the hierarchy while it is being magnified. I've submitted the suggestion in Feedback Assistant. Any comments on this suggestion?
0
0
343
Jul ’23
SwiftData, CloudKit and UIKit - Updating View When Data Changes
I have SwiftData and CloudKit working on a new version of my UIKit app. The current version uses CoreData/CloudKit I have a question. How does one know when there there is new or deleted data to update a view in a UIKit app with SwiftData? CoreData has NSPersistentStoreRemoteChangeNotificationOptionKey. What does SwiftData have that's equivalent? It's not feasible to redo my whole app to use SwiftUI at this stage.
1
1
1.2k
Jun ’23
CKAssets Download Even When desiredKeys Excludes Them
I have an app with a CloudKit Public Database in which a CKRecord can contain a CKAsset or two that holds the url of image data. I don't want to always obtain the image data so my desiredKeys excludes the CKAsset key in the CKRecord in that case. I use the following Swift function. var (matchResults, queryCursor) = try await database.records(matching: query, desiredKeys: desiredKeys) The desiredKeys variable could be an array of strings with the keys of CKRecord fields I want to return or nil if I want all of the data including the asset data. After I have the records, I do the following. if let imageAsset = record["ImageAsset"] as? CKAsset, let url = imageAsset.fileURL, let data = try? Data(contentsOf: url) { self.imageData = data } However, when I exclude the "ImageAsset" key from the desiredKeys array, my if let imageAsset contains the asset information. Looking at the received data, I can see that other keys that I exclude are not being downloaded, but the CKAsset url appears to be downloaded. Why? I expected that the if let would have been nil and the code within the if let would not have been executed.
3
0
703
May ’23