Post

Replies

Boosts

Views

Activity

Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I have come up with this singleton that holds the values. @MainActor private final class SafeAreaInsetsHolder { static let shared = SafeAreaInsetsHolder() let topSafeAreaInset: CGFloat let bottomSafeAreaInset: CGFloat private init() { if let window = UIApplication.shared.mainWindow { topSafeAreaInset = window.safeAreaInsets.top bottomSafeAreaInset = window.safeAreaInsets.bottom } else { topSafeAreaInset = 0 bottomSafeAreaInset = 0 } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I can also see some warnings in console. Observable object key path '\_UICornerProvider.<computed 0x00000001852600cc (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <UILayoutContainerView: 0x104eda520; frame = (0 0; 402 874); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000036ef80>; backgroundColor = kCGColorSpaceModelRGB 0.0352941 0.0352941 0.0352941 1; layer = <CALayer: 0x600000e2f660>> Observation tracking feedback loop detected! Make a symbolic breakpoint at UIObservationTrackingFeedbackLoopDetected to catch this in the debugger. Refer to the console logs for details about recent invalidations; you can also make a symbolic breakpoint at UIObservationTrackingInvalidated to catch invalidations in the debugger. Object receiving repeated [layout] invalidations: <UILayoutContainerView: 0x104eda520; frame = (0 0; 402 874); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000036ef80>; backgroundColor = kCGColorSpaceModelRGB 0.0352941 0.0352941 0.0352941 1; layer = <CALayer: 0x600000e2f660>>
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to UIApplication.shared.open iOS 18
Same here, it seems that Swift does not understand which method to use because of default options and completion parameters, so I managed to use it like that: UIApplication.shared.open(url, options: []) But still, this is a bug and should not be like that.
Topic: UI Frameworks SubTopic: UIKit
Sep ’24
Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
Seems fixed in latest Xcode RC
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I have come up with this singleton that holds the values. @MainActor private final class SafeAreaInsetsHolder { static let shared = SafeAreaInsetsHolder() let topSafeAreaInset: CGFloat let bottomSafeAreaInset: CGFloat private init() { if let window = UIApplication.shared.mainWindow { topSafeAreaInset = window.safeAreaInsets.top bottomSafeAreaInset = window.safeAreaInsets.bottom } else { topSafeAreaInset = 0 bottomSafeAreaInset = 0 } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I think I have found the cause of the problem. It seems like calling to main window's safe area insets in SwiftUI View causing endless updates. I tried to remove the call and it works fine. But still I don't know how to use it properly then
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I can also see some warnings in console. Observable object key path '\_UICornerProvider.<computed 0x00000001852600cc (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <UILayoutContainerView: 0x104eda520; frame = (0 0; 402 874); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000036ef80>; backgroundColor = kCGColorSpaceModelRGB 0.0352941 0.0352941 0.0352941 1; layer = <CALayer: 0x600000e2f660>> Observation tracking feedback loop detected! Make a symbolic breakpoint at UIObservationTrackingFeedbackLoopDetected to catch this in the debugger. Refer to the console logs for details about recent invalidations; you can also make a symbolic breakpoint at UIObservationTrackingInvalidated to catch invalidations in the debugger. Object receiving repeated [layout] invalidations: <UILayoutContainerView: 0x104eda520; frame = (0 0; 402 874); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000036ef80>; backgroundColor = kCGColorSpaceModelRGB 0.0352941 0.0352941 0.0352941 1; layer = <CALayer: 0x600000e2f660>>
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to URLSession is broken in iOS 18.4 RC Simulator
How long would it take to ship the fix? We are encountering the issue in release version of Xcode.
Replies
Boosts
Views
Activity
Apr ’25
Reply to Transaction.updates emits a transaction while purchasing on the same device through product.purchase()
Figured out that it only occur with auto-renewable subscriptions, but not with consumables
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Transaction.updates emits a transaction while purchasing on the same device through product.purchase()
I have this problem on both sandbox and production environments all the time. I have verification on backend side and the requests are just getting doubled. Is there any way to fix this?
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to StoreKit purchase failed with UI anchor
I have the same issue, but only in unit tests. I use purchase(options:) method. It does work in launched app, but not in unit tests.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to UIApplication.shared.open iOS 18
Same here, it seems that Swift does not understand which method to use because of default options and completion parameters, so I managed to use it like that: UIApplication.shared.open(url, options: []) But still, this is a bug and should not be like that.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Sep ’24