Post

Replies

Boosts

Views

Activity

Reply to Could Not Launch Mac (Designed for iPad) App in Xcode
Here's more info on this. Could not launch “MyAppName” 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
Sep ’23
Reply to Ornament Toolbar disappears
I am experiencing a similar issue. I have a UIKit MapViewController() where I declare a UIHostingOrnament. This is one view of a SwiftUI TabView. I have the below code in my viewIsAppearing. #if os(visionOS) mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height)) let ornament = UIHostingOrnament(sceneAnchor: .bottom, contentAlignment: .center) { ToolbarView() .glassBackgroundEffect() } self.ornaments = [ornament] #else Do other stuff here #endif When I select the tab for the Map View the first time, I see the ornament at the bottom, but when I select another tab and then select the Map tab, the ornament has disappeared. I can see that the viewIsAppearing is executing every time I click on the Map tab.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’23
Reply to 'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
When my destination is 'visionOS Designed for iPad', I get no errors and no warnings. But my tabs are now at the bottom and not on the left side. It's okay to use a Storyboard and StoryboardSegue with visionOS if it's run as an iPad app, but not as a standalone app. It doesn't make sense to me at all. Oh yeah, interface builder products are being deprecated as well.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’23
Reply to SwiftData Aggregation
import SwiftData @Model public class Person { var name: String var age: Int init(name: String, age: Int) { self.name = name self.age = age } } You'll probably want to do the below differently. The below ViewController is just given to you for ideas. import UIKit import SwiftData class ViewController: UIViewController { var container: ModelContainer? var context: ModelContext? override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. do { let schema = Schema([Person.self]) let modelConfig = ModelConfiguration(schema: schema, cloudKitDatabase: .private("iCloud.com.yourcompany.ClassStats")) container = try ModelContainer(for: schema, configurations: [modelConfig]) if let container = container { context = ModelContext(container) context?.autosaveEnabled = true } } catch { print(error) } } func getStats() { let minAge = 20 let maxAge = 40 let predicate = #Predicate<Person> { person in person.age >= minAge && person.age <= maxAge } let sortBy = [SortDescriptor<Person>(\.name)] var descriptor = FetchDescriptor<Person>(predicate: predicate, sortBy: sortBy) if let persons = try? context?.fetch(descriptor), persons.count > 0 { let count = persons.count } } }
Aug ’23
Reply to Could Not Launch Mac (Designed for iPad) App in Xcode
Here's more info on this. Could not launch “MyAppName” 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
Replies
Boosts
Views
Activity
Sep ’23
Reply to No ObservableObject of type AuthViewModel found, but only on Mac
You need to define a class where you publish your data, similar to the below. Perhaps you have done this already as you say it works on the iPhone and iPad. class AuthViewModel: ObservableObject { @Published var profilePicIsLoading = false etc... }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Ornament Toolbar disappears
I filed a feedback on this. It is FB13199930.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Ornament Toolbar disappears
I am experiencing a similar issue. I have a UIKit MapViewController() where I declare a UIHostingOrnament. This is one view of a SwiftUI TabView. I have the below code in my viewIsAppearing. #if os(visionOS) mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height)) let ornament = UIHostingOrnament(sceneAnchor: .bottom, contentAlignment: .center) { ToolbarView() .glassBackgroundEffect() } self.ornaments = [ornament] #else Do other stuff here #endif When I select the tab for the Map View the first time, I see the ornament at the bottom, but when I select another tab and then select the Map tab, the ornament has disappeared. I can see that the viewIsAppearing is executing every time I click on the Map tab.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to SwiftUI tabItem Label Text Cut Off on iPad
The feedback number is FB13188165. I will look into sidebars for the iPad.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to SwiftUI tabItem Label Text Cut Off on iPad
A lame workaround (note the extra space), but this still needs to be fixed and I filed a feedback. .tabItem { if horizontalSizeClass == .compact { Label("Saved", systemImage: "lock.fill") } else { Label("Saved ", systemImage: "lock.fill") } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to 'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
So, no Storyboards and no xib files. I have taken two of my apps and completely revamped the views. They are all done programmatically. No Storyboards, no segues. This way, I will be able to have the tabs on the side in visionOS and not have any warnings about deprecation.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to 'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
When my destination is 'visionOS Designed for iPad', I get no errors and no warnings. But my tabs are now at the bottom and not on the left side. It's okay to use a Storyboard and StoryboardSegue with visionOS if it's run as an iPad app, but not as a standalone app. It doesn't make sense to me at all. Oh yeah, interface builder products are being deprecated as well.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to 'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
I sent feedback to Apple. If nobody from Apple replies to this thread in a couple of days, I'll mark @Polyphonic 's answer as correct.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Initial sync of watchOS app using Core Data and CloudKit
Check out this information. It may help you.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to SwiftData Project crashes since beta 6
I assume you've checked this post. Looks like packages are the culprit.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Error in SwiftData migrationPlan execution
In Beta 8, the versionIdentifier has been changed to be a Version Structure. Example below. static var versionIdentifier: Schema.Version = .init(1, 0, 0)
Replies
Boosts
Views
Activity
Sep ’23
Reply to SwiftData Aggregation
import SwiftData @Model public class Person { var name: String var age: Int init(name: String, age: Int) { self.name = name self.age = age } } You'll probably want to do the below differently. The below ViewController is just given to you for ideas. import UIKit import SwiftData class ViewController: UIViewController { var container: ModelContainer? var context: ModelContext? override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. do { let schema = Schema([Person.self]) let modelConfig = ModelConfiguration(schema: schema, cloudKitDatabase: .private("iCloud.com.yourcompany.ClassStats")) container = try ModelContainer(for: schema, configurations: [modelConfig]) if let container = container { context = ModelContext(container) context?.autosaveEnabled = true } } catch { print(error) } } func getStats() { let minAge = 20 let maxAge = 40 let predicate = #Predicate<Person> { person in person.age >= minAge && person.age <= maxAge } let sortBy = [SortDescriptor<Person>(\.name)] var descriptor = FetchDescriptor<Person>(predicate: predicate, sortBy: sortBy) if let persons = try? context?.fetch(descriptor), persons.count > 0 { let count = persons.count } } }
Replies
Boosts
Views
Activity
Aug ’23
Reply to Swift compiler crashes with simple SwiftData model
Another easter egg hunt suggestion. Try removing the UUID or change it to a UUID.String.
Replies
Boosts
Views
Activity
Aug ’23
Reply to Xcode 15 beta - Only one native Mac app can be added to the App Store
Anybody figure out what is going on here?
Replies
Boosts
Views
Activity
Aug ’23