Post

Replies

Boosts

Views

Activity

Reply to App Startup with Debugger in Xcode 26 is slow
I am now using Xcode 26.4 and an iOS 26.4.1 device iPhone 16 Pro, and the app performance at the start is still absolutely unusable, the app stutters. While on Xcode 16.4 everything is as fine as it was. Can somebody please take a look? Makes it really unproductive when working on Liquid Glass specific stuff. @Developer Tools Engineer @fpiovezan
1w
Reply to App Startup with Debugger in Xcode 26 is slow
@fpiovezan Thank you for joining the conversation. You have requested for me to: validate the state of Accessibility options run an experiment and file a new FB with logs attached After gathering our bearings, it's clear to me that I will not be able to provide anything new that was not already provided in FB20359822 . Can you please consult that FB ticket as it has all the extensive info and logs of using Xcode 26.2 with iOS 26.2, and what's also important, a project that reproduces the issue. As for the accessibility options, we are certain that we do not really enable anything on by hand, never. We are going to attach a video recording of our accessibility options to the same FB20359822.
Feb ’26
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
@DTS Engineer I am expecting the part on the left, in SwiftUI to animate exactly like the counterpart in UIKit on the right. But they do not; UIKit animation affects both UIView.center and UIView.bounds, and they travel using the same timing curve over the same duration, which makes it seem that the top of the UIKit view is attached to the top of the screen. However, this illusion is not preserved for SwiftUI view because UIHostingController.view.center is not animated; it's teleported to the end position. And I also happen to know that really bounds are not animated either, the UIView actually just fully teleports to the new state, while only the SwiftUI content is animated. And my question is - what is the way to make UIHostingController animate along its SwiftUI content? Can you maybe confirm that there isn't a built-in support for that?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’26
Reply to App Startup with Debugger in Xcode 26 is slow
I have attempted to use Xcode 26.2 with a device running iOS 26.2, same configuration as in the original post, and I don't find the user experience to have improved one bit: app startup takes ages before I even see my UIWindow and UIViewController on screen starting without debugger and attaching afterwards causes the app to lag horribly, which was not a problem originally when I only started to try Xcode 26.0
Feb ’26
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
Alright, I have tried to follow your advice and I don't see how this can help. I have this setup: struct AnimatedView: View { @ObservedObject var viewModel: ViewModel var body: some View { let width = viewModel.isExpanded ? 120.0 : 50.0 let height = viewModel.isExpanded ? 400.0 : 100.0 let cornerRadius = viewModel.isExpanded ? 42.0 : 8.0 Color(uiColor: .red) .frame(width: width, height: height) .cornerRadius(cornerRadius) } } The hosting controller is mounted to the top of its parent via constraints. Then I do this in my tap handler for a totally separate button: @objc func tap() { withAnimation(Animation.easeInOut(duration: 0.5), { viewModel.isExpanded.toggle() }) } And what I observe here is that my hosting controller's view immediately teleports to the new frame - its center is immediately in the position where it should be only at the end of the animation. Meanwhile, the SwiftUI content is animating correctly, except it has already teleported. I have tried to use your answer @DTS Engineer I have assigned hostingController.sizingOptions = [.intrinsicContentSize, .preferredContentSize] and added a KVO observation to the \.preferredContentSize. observation = hostingController.observe( \.preferredContentSize, options: [.new] ) { [weak self] controller, change in guard let self else { return } UIView.animate( withDuration: 0.5, delay: 0, options: [.curveEaseInOut], animations: { self.view.layoutIfNeeded() }) } Because my UIHostingController is laid out via constraints, I don't see what else I can do to animate the content other than to ask for a relayout on the parent. This however, doesn't work. Also, in the KVO handler of the preferredContentSize, I have found that when the closure is called, the center value has already been set to the final value! So even if I launch UIView.animate, there will be no frame updates in the animation transaction, and nothing will be animated. You can see the problem I am describing in this video: https://github.com/user-attachments/assets/bb7c9d7c-ef6a-47d9-85fd-27fcc6f12b13 So I don't think that your answer answers my question. And I would like to inquire once again - what is the correct canonical way to animate the UIHostingController changing its position along with the SwiftUI animation?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’26
Reply to CollectionView: Sync `center.y` of UIView outside collection view and a view in a cellinside
how to animate self sizing cell size change due relayout? Turns out: collectionView.performBatchUpdates { UIView.animate(withDuration: 0.25, animations: { cellViewReference.updateState(state: state, animated: false) cellViewReference.layoutIfNeeded() }) collectionView.collectionViewLayout.invalidateLayout() } how to synchronize outside views with collection views? Just don't, it doesn't end well...
Topic: UI Frameworks SubTopic: UIKit Tags:
Feb ’25
Reply to App Startup with Debugger in Xcode 26 is slow
I am now using Xcode 26.4 and an iOS 26.4.1 device iPhone 16 Pro, and the app performance at the start is still absolutely unusable, the app stutters. While on Xcode 16.4 everything is as fine as it was. Can somebody please take a look? Makes it really unproductive when working on Liquid Glass specific stuff. @Developer Tools Engineer @fpiovezan
Replies
Boosts
Views
Activity
1w
Reply to App Startup with Debugger in Xcode 26 is slow
@fpiovezan Thank you for joining the conversation. You have requested for me to: validate the state of Accessibility options run an experiment and file a new FB with logs attached After gathering our bearings, it's clear to me that I will not be able to provide anything new that was not already provided in FB20359822 . Can you please consult that FB ticket as it has all the extensive info and logs of using Xcode 26.2 with iOS 26.2, and what's also important, a project that reproduces the issue. As for the accessibility options, we are certain that we do not really enable anything on by hand, never. We are going to attach a video recording of our accessibility options to the same FB20359822.
Replies
Boosts
Views
Activity
Feb ’26
Reply to How to disable highlight state on Link in LA widget
Actually, they don't become blue, but rather they become semi-transparent, and this causes them to mix with the background (and my background was blue, that's why it was becoming blue)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
@DTS Engineer I am expecting the part on the left, in SwiftUI to animate exactly like the counterpart in UIKit on the right. But they do not; UIKit animation affects both UIView.center and UIView.bounds, and they travel using the same timing curve over the same duration, which makes it seem that the top of the UIKit view is attached to the top of the screen. However, this illusion is not preserved for SwiftUI view because UIHostingController.view.center is not animated; it's teleported to the end position. And I also happen to know that really bounds are not animated either, the UIView actually just fully teleports to the new state, while only the SwiftUI content is animated. And my question is - what is the way to make UIHostingController animate along its SwiftUI content? Can you maybe confirm that there isn't a built-in support for that?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
@DTS Engineer Can you please take a look?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to App Startup with Debugger in Xcode 26 is slow
I have attempted to use Xcode 26.2 with a device running iOS 26.2, same configuration as in the original post, and I don't find the user experience to have improved one bit: app startup takes ages before I even see my UIWindow and UIViewController on screen starting without debugger and attaching afterwards causes the app to lag horribly, which was not a problem originally when I only started to try Xcode 26.0
Replies
Boosts
Views
Activity
Feb ’26
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
Here is slide show of the behavior that I am observing. On the right you can see the same UI done in plain UIKit.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
Alright, I have tried to follow your advice and I don't see how this can help. I have this setup: struct AnimatedView: View { @ObservedObject var viewModel: ViewModel var body: some View { let width = viewModel.isExpanded ? 120.0 : 50.0 let height = viewModel.isExpanded ? 400.0 : 100.0 let cornerRadius = viewModel.isExpanded ? 42.0 : 8.0 Color(uiColor: .red) .frame(width: width, height: height) .cornerRadius(cornerRadius) } } The hosting controller is mounted to the top of its parent via constraints. Then I do this in my tap handler for a totally separate button: @objc func tap() { withAnimation(Animation.easeInOut(duration: 0.5), { viewModel.isExpanded.toggle() }) } And what I observe here is that my hosting controller's view immediately teleports to the new frame - its center is immediately in the position where it should be only at the end of the animation. Meanwhile, the SwiftUI content is animating correctly, except it has already teleported. I have tried to use your answer @DTS Engineer I have assigned hostingController.sizingOptions = [.intrinsicContentSize, .preferredContentSize] and added a KVO observation to the \.preferredContentSize. observation = hostingController.observe( \.preferredContentSize, options: [.new] ) { [weak self] controller, change in guard let self else { return } UIView.animate( withDuration: 0.5, delay: 0, options: [.curveEaseInOut], animations: { self.view.layoutIfNeeded() }) } Because my UIHostingController is laid out via constraints, I don't see what else I can do to animate the content other than to ask for a relayout on the parent. This however, doesn't work. Also, in the KVO handler of the preferredContentSize, I have found that when the closure is called, the center value has already been set to the final value! So even if I launch UIView.animate, there will be no frame updates in the animation transaction, and nothing will be animated. You can see the problem I am describing in this video: https://github.com/user-attachments/assets/bb7c9d7c-ef6a-47d9-85fd-27fcc6f12b13 So I don't think that your answer answers my question. And I would like to inquire once again - what is the correct canonical way to animate the UIHostingController changing its position along with the SwiftUI animation?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to App Startup with Debugger in Xcode 26 is slow
Meow we really need you DTS Engineer Ed Ford... We are still trapped in the Xcode 16.4 realm...
Replies
Boosts
Views
Activity
Oct ’25
Reply to App Startup with Debugger in Xcode 26 is slow
Please help... I think my debugger is scanning all of the disk operations that I am doing...
Replies
Boosts
Views
Activity
Sep ’25
Reply to Does Xcode 26 only run on the new macOS 26?
No, you don't need macOS 26 to run Xcode 26, you do need the latest version of macOS 25 though.
Replies
Boosts
Views
Activity
Sep ’25
Reply to Why my CADisplayLink runs at low framerate, but UIScrollView doesn't?
Nevermind, my Info.plist did not contain <key>CADisableMinimumFrameDurationOnPhone</key><true/>, it was misconfigured, it is all my fault.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to CollectionView: Sync `center.y` of UIView outside collection view and a view in a cellinside
how to animate self sizing cell size change due relayout? Turns out: collectionView.performBatchUpdates { UIView.animate(withDuration: 0.25, animations: { cellViewReference.updateState(state: state, animated: false) cellViewReference.layoutIfNeeded() }) collectionView.collectionViewLayout.invalidateLayout() } how to synchronize outside views with collection views? Just don't, it doesn't end well...
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to How to statically link a Swift framework to a Swift framework?
If A was a library that was built to be linked dynamically (at least if it was a dynamically-linked Framework), then the symbols and the implementation of B would be copied into A automatically. But if it needs to stay a statically linked library, then Perform Single-Object Prelink build setting might just do the trick!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to How to single-object prelink a framework?
No, there is no way to automatically copy the resources if the regular Embed Frameworks isn't used. It has to be done manually.
Replies
Boosts
Views
Activity
May ’23