The feedback number is FB13188165. I will look into sidebars for the iPad.
Post
Replies
Boosts
Views
Activity
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")
}
}
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.
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.
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.
Check out this information. It may help you.
I assume you've checked this post.
Looks like packages are the culprit.
In Beta 8, the versionIdentifier has been changed to be a Version Structure. Example below.
static var versionIdentifier: Schema.Version = .init(1, 0, 0)
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
}
}
}
Another easter egg hunt suggestion. Try removing the UUID or change it to a UUID.String.
Anybody figure out what is going on here?
Here's how I turned my data into a UIImage.
var myImage: UIImage? = nil
if let imageData = modelEntity.imageData {
myImage = UIImage(data: imageData)
}
I don't see '@Model' above the class definition.
@Model
public final class Note: Identifiable {...
It looks like the following works as well.
data.variable?.starts(with: SomeString) == true
data.variable?.contains(SomeString) == true
Here's the fix that I found.
let searchPredicate = #Predicate<SectionsSD> {
$0.toArticles?.contains(filter) ?? false
}