I'm currently developing a SwiftUI application that utilizes SwiftData for data management. I am facing a challenge when trying to filter a query. Specifically, I want to filter a list of Item objects to match a Product instance that is passed to my View.
error :
Instance member 'product' cannot be used on type 'MainItemListEncap'; did you mean to use a value of this type instead
The view
//
// 311.1.1. MainRefToItem.swift
// ComparePrice
//
// Created by Herman VAN CAUWELAERT on 11/12/2024.
//
import SwiftUI
import SwiftData
struct MainItemListEncap: View {
@Bindable var product: Product
@Query(
filter: #Predicate { item in
item.productGroup == product
},
sort: [SortDescriptor(\Item.name)]
)
var items: [Item]
@Environment(\.modelContext) var modelContext
var body: some View {
ForEach(items) { item in
VStack(alignment: .leading) {
Text(item.name)
Text(item.description)
}
}
}
}
the product class.
import SwiftData
import Foundation
@Model
final class Product: CustomStringConvertible, CustomDebugStringConvertible {
@Attribute(.unique) var productName: String
var productDescription: String
var outputCurrency: String
// Gebruik een `String` als opslag voor `outputSystem`
var outputSystemRawValue: String = MeasurementSystem.metric.rawValue
// Computed property om `MeasurementSystem` te gebruiken
var outputSystem: MeasurementSystem {
get {
MeasurementSystem(rawValue: outputSystemRawValue)
}
set {
outputSystemRawValue = newValue.rawValue
}
}
// er zijn verschillend item versies voor een product
// als er een hoofdproduct gedelete wordt, dan zullen alle onderliggende items ook gedelete worden
@Relationship(deleteRule: .cascade, inverse: \Item.productGroup) var refToItems = [Item]()
init(productName: String = "", productDescription: String = "what is this product", outputCurrency: String = "EUR", outputSystem: MeasurementSystem = MeasurementSystem.metric) {
self.productName = productName
self.productDescription = productDescription
self.outputCurrency = outputCurrency
self.outputSystem = outputSystem
}
}
the item class
import Foundation
import SwiftData
@Model
final class Item: CustomStringConvertible, CustomDebugStringConvertible {
var timestamp: Date
@Attribute(.unique) var name: String
var productGroup: Product?
var shop: String //TODO: becomes Shop
var price: Double
var currency: String
var quantity: Double
var unit: String //TODO: becomes Unit
var isShown : Bool
var minimumQuantity: String
var rateStr: String {
conversionRate != nil ? " (rate: \(ValueFormatter.shared.format(conversionRate!)))" : ""
}
init(timestamp: Date = Date()
, name: String
, shop: String = "Colruyt"
, price:Double = 1.00
, currency: String = "EUR"
, quantity: Double = 1.0
, unit: String = "g"
, isShown:Bool = true
, conversionRate: Decimal? = 1
, minimumQuantity: String = "1"
) {
self.timestamp = timestamp
self.name = name
self.shop = shop
self.price = price
self.currency = currency
self.quantity = quantity
self.unit = unit
self.isShown = isShown
self.conversionRate = conversionRate
self.minimumQuantity = minimumQuantity
}
}
Apple Developers
RSS for tagThis is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and foster a supportive community.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I attempted to reset the Watch SE, which is currently running 10.6.1 and enrolled in Beta updates. My iPhone is updated to 18.2, but the Watch app isn't showing any available updates.
Apple TV
Samsung TV
SONOS Soundbar + S1 stereo speakers
Apple TV Preferences
Sound output = SONOS soundbar
Samsung Preferences
Sound Output = SONOS HDMI eArc soundbar
start with Apple TV movies and as I switch from movie to movie, sound comes out stereo as it should
however when I switch to Netflix or YouTube TV with stereo content, sound comes out mono .. until I manually change the ATV Preferences to stereo.
As ong as I stay with Netflix content, stereo output. But change to YouRube TV or ATV, it automatically changes to mono.
?????
Topic:
Community
SubTopic:
Apple Developers
OS
macOS 15.4.1
What steps will reproduce the problem?
(0) Make sure you have other third-party browsers on your computer, and that their names start with a letter before "M", for me it is Arc browser.
(1) Install a previous version of Edge Mac Canary (it can be downloaded from official web site:https://www.microsoft.com/en-us/edge/download/insider?cc=1&cs=426423789&form=MA13FJ). If you don't have an older version, you can download and save the current version, and then try the below steps after a day or two.
(2) Eject the DMG from the Finder Sidebar.
(3) Switch to the System Settings panel, set the "Default web browser" as Edge Mac Canary just installed.
(4) Click a URL link from Notes, it will open in Edge Mac Canary.
(5) Navigate to "Settings"->"About Microsoft Edge" in Edge and wait for the update information to show that update is complete (it will auto update to the latest version).
(6) Check current result of "Default web browser" in System Settings again.
What is the expected result?
The "Default web browser" should still be Edge Canary.
What happens instead?
The "Default web browser" in System Settings will change to Arc. But this time, when you click the link from Notes, it will open in Safari, which means that "Default web browser is shown as Arc, but it is actually Safari.
It is worth noting that if you start Edge Mac in step (3) and then set it as Default Browser in the "edge://settings/defaultBrowser" page, this problem will not occur after the update is completed.
Chrome Mac has the same issue.
Other
Please see the video (https://youtu.be/ymWAanLqz1Y) for more details.
Topic:
Community
SubTopic:
Apple Developers
In the public release of iOS 18.4.1 and iPadOS 18.4.1, external input support for keyboards and mice is critically degraded. This issue affects both Apple-branded and third-party HID-compliant devices, over both wired USB-C and Bluetooth.
Tested Hardware:
• iPhone 16 Pro Max (256GB)
• iPad Pro (USB-C, latest gen), last gen iPad as well
Affected Devices:
• Apple Magic Mouse and Keys (wired USB-C/Bluetooth)
• Redragon K580RGBPRO (Bluetooth/wired USB-C)
• Razer Naga V2 Pro (Bluetooth/USB-C)
Symptoms:
• Severe keystroke delay and dropped input
• Modifier keys (Shift, Command, Option) fail intermittently
• Input degrades further with multiple HID devices connected
• Mouse input via Bluetooth exhibits pointer lag and jitter
• Occurs in all apps: Notes, Safari, Mail, text fields, password entries, etc.
• Identical results using Apple USB-C cables
Reproducibility:
100%. Clean boots, minimal background activity, and isolated environments (including Airplane Mode) do not resolve the issue. Identical behavior across both iPhone and iPad.
Expected Behavior:
All HID-compliant external input devices — particularly Apple-branded ones — should provide low-latency, reliable, and consistent input over both USB-C and Bluetooth, especially in a production iOS/iPadOS release.
Actual Behavior:
External keyboards and mice exhibit:
• Lag
• Dropped characters
• Failed modifiers
• Degraded mouse tracking
Even with the latest hardware and clean configurations.
Severity:
Critical.
This is a platform-level failure affecting I/O at the user interaction layer. Input reliability is non-negotiable — especially on $2000+ flagship devices using Apple’s own peripherals.
Closing Note (for Apple engineering & peer devs):
This is not a beta regression — it’s a public release flaw that undermines iOS and iPadOS usability for power users, professionals, and accessibility communities alike. That Apple Magic Keyboard, Redragon, and Razer gear all fail equally and consistently should be a wake-up call.
Apple: this needs to be escalated. Now.
External input — one of the most basic subsystems in any OS — is broken on your highest-end devices.
Some users of my app complain that it stops responding to touch after a while. The screen is still updating, and the app seems to be working normally otherwise. It just doesn't respond to any touches anymore.
It is not a problem with the touchscreen itself, because the user is able to swipe up to get to the home screen, and then interact with other apps as normal. When re-opening my app, it is still unresponsive to touch.
The only way to solve it, is to restart the app.
Does anybody have a similar experience, and knows what could cause it?
The app is based on UIKit, and still written in Objective-C, if it matters. The iOS version involved does not seem to matter, it happened with a couple of them.
Topic:
Community
SubTopic:
Apple Developers
iOS 18 System Bug Causes URL Scheme Failure
A bug in iOS 18 causes URL Schemes to become invalid through the following steps, resulting in failure to open apps via URL Scheme.
Reproduction Steps:
Long-press the app icon
Select "Require Face ID"
Choose "Hide and Require Face ID" to hide the app
Go to the App Library and locate the hidden app in the "Hidden" folder
Uninstall the hidden app
reinstalling the hidden app
After reinstalling the app, all configured URL Schemes will become invalid, causing failure when attempting to open the app via URL Scheme.
The issue appears to be that after uninstalling a hidden app and reinstalling it, the system fails to restore the app's URL Scheme functionality.
Topic:
Community
SubTopic:
Apple Developers
So I downloaded and installed iOS26 on my iPhone 15 Pro and after that it does not want to boot anymore. It shows a battery with one red line. Which is weird because before it restarted it had 80% of the battery and I had the power cable connected at all time. Now I can't boot it up anymore. Not even with the volume button up, down, power button trick. Please help!
I just downloaded ios 26 atm i was upgrading my phone battery was 50% and charging , now when i fully installated ios 26 it shows battery 1% and even i try to charge it still stays at 1% any idea how to fix it
Topic:
Community
SubTopic:
Apple Developers
just updated macos to 15.5 beta 2, cannot login anymore!
i reach the login screen, i enter the correct password, the loading bar stops at around 10%, after about 1 minute the system restarts, it return to the login screens, and so on…
any suggestion about debugging this type of situation?
我们App的搜索功能,以前使用系统键盘进行输入中文搜索时,只有当输入完整,点击键盘上的对应词后,才会开始搜索, 现在没按下一个字母,就会触发搜索。
Topic:
Community
SubTopic:
Apple Developers
Since the last Mac software upgrade, PDF's off my IMac are not being printed or aligned correctly.
I have multiple printers and multiple apps and it all prints the same. This is not a "printer driver" issue or an app issue. I am suspecting that this may be an issue since upgrading to Sequonia 15.4.1.
Looking to see if others have had this issue.
Thanks.
Topic:
Community
SubTopic:
Apple Developers
One of my clients keeps having Zoom crash when teaching classes.
They do have 1 external monitor attached.
Using Macbook Pro 15-inch 2017.
Running Ventura 13.7.4.
Bug in client of libplatform: os_unfair_lock is corrupt, or owner thread exited without unlocking
Abort Cause 8192
Any idea what is happening?
Do I need to submit all of the crash report?
Thank you for your assistance.
Topic:
Community
SubTopic:
Apple Developers
Здравствуйте я хочу стать тестировщиком приложений App Store
Topic:
Community
SubTopic:
Apple Developers
So, I was attempting to rename my Finder Tags. Unfortunately, I’m also trying Apple’s Intelligent Writing Tools to proofread it, but I’ve encountered a bug in it. Here’s an example:
For reference, my macOS version is macOS Sequoia 15.3.2 (24D81)—a stable version.
I hope that bug is fixed soon.
What is the best way to adhoc report bugs in an Apple OS? For example I'm experiencing a bug with macOS where the following occurs:
In home office I have connected network drives that are part of my login items. I want them to mount in Finder automaticallly.
When out of the office I get prompts about the missing drives that are persistent and cannot be dismissed with one click.
Macos 15.2 and earlier has, since I can recall, REPEATEDLY prompted about these missing drives to the point I want to put a fist through the screen. I'm not sure why people aren't setting the world on fire over this bug or why Apple allows it to remain.
Why spinner is not showing while downloading dynamic data.
User can select multiple time Choose and most up to date data is not showing.
Below methods are never get called?
optional func handle(intent:
optional func confirm(intent:
only:
provideDeviceOptionsCollection(for intent:
Hi !
I am trying to insert interstitial ads in my app with facebook ads.
I found app id, placement id and when I am running my app I have the following error :
Interstitial ad failed to load with error: Error Domain=com.facebook.ads.sdk Code=1001 "No fill" UserInfo={NSLocalizedDescription=No fill, FBAdErrorDetailKey={
msg = "No fill";
}}
Could you help me ?
Hello, why is apple won’t adding Just-In-Time compiler to ”Emulators” in the app store. And/or hypervisor for newer devices.
i feel like UTM (which is a PC Emulator) or other Apps that emulate need JIT to work properly, and will consume significantly less battery to emulate/virtualize, And will have a noticeably better performance than just not enabling JIT, and by the way jit is already being used on iPadOS/iOS 18.3/18.3.1 and newer/older version of that so being enabled by the choice of the developer of the App is more convenient than doing it with tools.
and by the why apple wont let emulators on iPads and newer iPhones do hypervisor, it’s better than JIT but requires a good cpu, like making it available to people with newer/powerful devices, hypervisor is better than JIT by a lot and removing it in iPadOS/iOS 18.4 was an unnecessary choice?, becuase it had a better potential in virtualization instead of emulating, and I feel like enabling it In M1-M2 iPads and A14-18pro and newer devices is just better from having it disabled, to unlock the fullest potential of the iPad it needs to have a app or something to do instead of just running high graphics games/or Apps.
Hello,
I'm trying to publish my app, but I'm constantly getting rejected by Apple. They're telling me I'm having issues with tracking user data.
This item has been rejected for the following reasons:
5.1.2 Legal: Privacy - Data Use and Sharing
I've indicated that I don't use this data for ads, that it's only used for personalization and to understand who saves items.
I added the NSUserTrackingUsageDescription property to the info.plist.
I run AppTrackingTransparency.requestTrackingAuthorization() when the user logs into the app, displaying a warning message.
I'd say I meet all the requirements they've set for me, but they still haven't approved my app. What do you recommend? How can I speak to a physical person who can help me?
Thank you very much and best regards.