Post

Replies

Boosts

Views

Activity

How to disable highlight state on Link in LA widget
I am working on a Live Activity widget. In it, I want some of the elements to open different deeplink URLs. I have found that assigning multiple widgetURL doesn't work, only one of the URLs gets opened no matter where you tap. I also found that Buttons don't seem to do anything, tapping them actually just open my app as if I just tapped a naked Live Activity. I have found that really only Link elements work if I want to open different URLs upon tapping different elements. And Links are cool and fine, but I am seeing that on tap, my elements become tinted... As in, there is a highlighted state, and it makes the elements inside blue. I have tried to use button style API on a link, but it didn't work. How can I disable the highlighted state for a Link element in a live activity widget?
1
0
172
Feb ’26
How to animate `UIHostingController.view` frame when my View's size changes?
I have a UIHostingController on which I have set: hostingController.sizingOptions = [.intrinsicContentSize] The size of my SwiftUI content changes with animation (I update a @Published property on an ObservableObject inside a withAnimation block). However, I notice that my hostingController.view just jumps to the new frame without animating the change. Question: how can I animate the frame changes in UIHostingController that are caused by sizingOptions = [.intrinsicContentSize]
6
1
334
Feb ’26
Why my CADisplayLink runs at low framerate, but UIScrollView doesn't?
I have a tiny iOS app project set up. I instantiate a CADisplayLink and then log the time that passes between its calls to target-action. This is on an iPhone 15 Pro, so 120 hertz. However, I am observing that in user space, the actual tick rate of my target-action being called is actually fluctuating around 70-80 hertz. But then, I instantiate a UIScrollView and give it a delegate. In the delegate I am observing that scrollViewDidScroll gets called with the correct 120 hz. And if I set a breakpoint inside scrollViewDidScroll, I can see that this is called from a CADisplayLink handler inside UIScrollView. How comes they can have 120hz, and I don't? Of course, I did set UIScreen.maximumFramesPerSecond to preferredFramerateRange, minimum, maximum and preferred. Also, I don no virtually no work in the handler - I am just setting UIView.transform = CGAffineTransform(translationY: 100). Also, my info.plist does indeed contain <key>CADisableMinimumFrameDurationOnPhone</key><true/>
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
196
Jul ’25
`UIGraphicsImageRenderer` + `drawHierarchy` gives very flat colors
My setup: a UILabel with text in it and then let aBugRenderer = UIGraphicsImageRenderer(size: aBugLabel.bounds.size) let aBugImage = aBugRenderer.image { context in aBugLabel.drawHierarchy(in: aBugLabel.bounds, afterScreenUpdates: true) } The layout and everything is correct, the image is correct, but I used my colors in the displayP3 color space to configure the source UILabel.textColor And unfortunately, the resulted image ends up being sRGB IEC61966-2.1 color space and the color appears way bleaker than when it's drawn natively. Question: how can I set up the renderer so that it draws the same color.
0
0
222
Jun ’25
CollectionView: Sync `center.y` of UIView outside collection view and a view in a cellinside
I have a setup: Collection view with compositional layout a self sizing cell inside a subview inside the cell and unrelated view outside the collection view I would like to: modify the layout (constraints) of the cell inside the collection view with UIView.animate trigger an animated layout update of collection view synchronize the position of an unrelated view to the position of one of the subviews of a collection view cell What I tried: UIView.animate(withDuration: 0.25) { cellViewReference.updateState(state: state, animated: false) collectionView.collectionViewLayout.invalidateLayout() collectionView.layoutIfNeeded() someOtherViewOutsideCollectionView.center = cellViewReference.getPositionOfThatOneViewInWindowCoordinateSystem() } What I'm expecting: after invalidateLayout, the layout update of the collection view is merely scheduled, but not yet performed layoutIfNeeded forces an update on the collectionViewLayout + update on the frames of the views inside the UICollectionViewCells all the frames become correct to what they will look like after the animation is performed I call getPositionOfThatOneViewInWindowCoordinateSystem and it gives me the position of the view after the uicollectionview AND the cell's layout has updated What happens instead: getPositionOfThatOneViewInWindowCoordinateSystem returns me an old value I am observing that the bounds of the cell didn't actually change during layoutIfNeeded And moreover, the bounds change without animation, instantly Question: how to animate self sizing cell size change due relayout how to synchronize outside views with collection views
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
324
Feb ’25
How to statically link a Swift framework to a Swift framework?
I have 2 frameworks, which are both Swift Statically-linked frameworks. This means that my Mach-O Type is Static Library for both of the targets. One of the targets (A) depends on another target (B). I successfully archive A, and then I successfully archive B, linking against A. Embedding is enabled, however I don't seem to find any mentions of A in the exported build artifacts. However, when I import archived and exported B in another target, it gives me a compilation error: ld: warning: Could not find or use auto-linked framework 'A' Undefined symbols for architecture x86_64: "A.someMethodInsideA() -> Swift.Int", referenced from: B.someMethodInsideB() -> Swift.Int in B(B.o) ld: symbol(s) not found for architecture x86_64 You see, I set the A's Mach-O Type to Static Library, so I expect A's binaries to be completely embedded into B with static linkage, but this doesn't happen for some reason. How can I embed a static framework inside a static framework?
1
0
1.5k
May ’23
How to single-object prelink a framework?
My situation: I am developing a dynamically linked framework called A, wrapped into .xcframework I depend upon other frameworks B and C that are linked statically However, I don't want the consumers of A to learn about the existence of B and C And because of this, I would like to perform single object pre-link during the linkage of A so that B and C are totally consumed by A and are to be never seen again. This task would be relatively easy if instead of static frameworks (.framework), I used static libraries (.a). In this case, I would be able to easily plop the path to the .a into the Prelink Libraries setting, set Perform Single-Object Prelink to YES, disable the embedding - and the goal would be accomplished. However, I am facing the linkage against frameworks, not libs. The problem is that it has resources and bundles inside of it. If I put a path to the .xcframework or .framework into the Prelink Libraries Build Setting, the build fails: Command MasterObjectLink failed with a nonzero exit code can't map file, errno=22 file '/Users/*****/B/B.xcframework/ios-arm64/B.framework' And if I put a path to the actual executable inside the framework (B.xcframework/ios-arm64/B.framework/B), the build succeeds. However, none of the resources of B.framework are present in the resulting output. Is there a way to automatically copy resources during Single-Object Prelink?
1
0
1.2k
May ’23
Use `merchantId` from another development team
I am developing an SDK that other apps will be integrating. In the SDK code base, I provide a billing user interface that features calls to the ApplePay. I would like to use my merchantId so that the payments get billed to my benefit. This is intended behavior and the integrators of the SDK will be fully aware of circumstance. At the same time, the integrators of my SDK also might have Apple Pay integrated into their own app. And they might have their own merchantId's that they created in their Apple Developer portal. Can they use my merchaintId, putting it into the entitlement so that my SDK integrated into their app will be using my merchantId to create Apple Pay payments while being a part of an app signed under a different Apple Development team?
2
0
1.9k
Sep ’21
App Startup with Debugger in Xcode 26 is slow
My app start up has became horrid. It takes 1 minute to open SQLlite database for my rust core. Impossible to work... I have Address Sanitizer, Thread Perf Checker and Thread Sanitizer disabled...
Replies
25
Boosts
6
Views
2.5k
Activity
Apr ’26
How to disable highlight state on Link in LA widget
I am working on a Live Activity widget. In it, I want some of the elements to open different deeplink URLs. I have found that assigning multiple widgetURL doesn't work, only one of the URLs gets opened no matter where you tap. I also found that Buttons don't seem to do anything, tapping them actually just open my app as if I just tapped a naked Live Activity. I have found that really only Link elements work if I want to open different URLs upon tapping different elements. And Links are cool and fine, but I am seeing that on tap, my elements become tinted... As in, there is a highlighted state, and it makes the elements inside blue. I have tried to use button style API on a link, but it didn't work. How can I disable the highlighted state for a Link element in a live activity widget?
Replies
1
Boosts
0
Views
172
Activity
Feb ’26
How to animate `UIHostingController.view` frame when my View's size changes?
I have a UIHostingController on which I have set: hostingController.sizingOptions = [.intrinsicContentSize] The size of my SwiftUI content changes with animation (I update a @Published property on an ObservableObject inside a withAnimation block). However, I notice that my hostingController.view just jumps to the new frame without animating the change. Question: how can I animate the frame changes in UIHostingController that are caused by sizingOptions = [.intrinsicContentSize]
Replies
6
Boosts
1
Views
334
Activity
Feb ’26
Why my CADisplayLink runs at low framerate, but UIScrollView doesn't?
I have a tiny iOS app project set up. I instantiate a CADisplayLink and then log the time that passes between its calls to target-action. This is on an iPhone 15 Pro, so 120 hertz. However, I am observing that in user space, the actual tick rate of my target-action being called is actually fluctuating around 70-80 hertz. But then, I instantiate a UIScrollView and give it a delegate. In the delegate I am observing that scrollViewDidScroll gets called with the correct 120 hz. And if I set a breakpoint inside scrollViewDidScroll, I can see that this is called from a CADisplayLink handler inside UIScrollView. How comes they can have 120hz, and I don't? Of course, I did set UIScreen.maximumFramesPerSecond to preferredFramerateRange, minimum, maximum and preferred. Also, I don no virtually no work in the handler - I am just setting UIView.transform = CGAffineTransform(translationY: 100). Also, my info.plist does indeed contain <key>CADisableMinimumFrameDurationOnPhone</key><true/>
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
0
Views
196
Activity
Jul ’25
`UIGraphicsImageRenderer` + `drawHierarchy` gives very flat colors
My setup: a UILabel with text in it and then let aBugRenderer = UIGraphicsImageRenderer(size: aBugLabel.bounds.size) let aBugImage = aBugRenderer.image { context in aBugLabel.drawHierarchy(in: aBugLabel.bounds, afterScreenUpdates: true) } The layout and everything is correct, the image is correct, but I used my colors in the displayP3 color space to configure the source UILabel.textColor And unfortunately, the resulted image ends up being sRGB IEC61966-2.1 color space and the color appears way bleaker than when it's drawn natively. Question: how can I set up the renderer so that it draws the same color.
Replies
0
Boosts
0
Views
222
Activity
Jun ’25
CollectionView: Sync `center.y` of UIView outside collection view and a view in a cellinside
I have a setup: Collection view with compositional layout a self sizing cell inside a subview inside the cell and unrelated view outside the collection view I would like to: modify the layout (constraints) of the cell inside the collection view with UIView.animate trigger an animated layout update of collection view synchronize the position of an unrelated view to the position of one of the subviews of a collection view cell What I tried: UIView.animate(withDuration: 0.25) { cellViewReference.updateState(state: state, animated: false) collectionView.collectionViewLayout.invalidateLayout() collectionView.layoutIfNeeded() someOtherViewOutsideCollectionView.center = cellViewReference.getPositionOfThatOneViewInWindowCoordinateSystem() } What I'm expecting: after invalidateLayout, the layout update of the collection view is merely scheduled, but not yet performed layoutIfNeeded forces an update on the collectionViewLayout + update on the frames of the views inside the UICollectionViewCells all the frames become correct to what they will look like after the animation is performed I call getPositionOfThatOneViewInWindowCoordinateSystem and it gives me the position of the view after the uicollectionview AND the cell's layout has updated What happens instead: getPositionOfThatOneViewInWindowCoordinateSystem returns me an old value I am observing that the bounds of the cell didn't actually change during layoutIfNeeded And moreover, the bounds change without animation, instantly Question: how to animate self sizing cell size change due relayout how to synchronize outside views with collection views
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
324
Activity
Feb ’25
How to statically link a Swift framework to a Swift framework?
I have 2 frameworks, which are both Swift Statically-linked frameworks. This means that my Mach-O Type is Static Library for both of the targets. One of the targets (A) depends on another target (B). I successfully archive A, and then I successfully archive B, linking against A. Embedding is enabled, however I don't seem to find any mentions of A in the exported build artifacts. However, when I import archived and exported B in another target, it gives me a compilation error: ld: warning: Could not find or use auto-linked framework 'A' Undefined symbols for architecture x86_64: "A.someMethodInsideA() -> Swift.Int", referenced from: B.someMethodInsideB() -> Swift.Int in B(B.o) ld: symbol(s) not found for architecture x86_64 You see, I set the A's Mach-O Type to Static Library, so I expect A's binaries to be completely embedded into B with static linkage, but this doesn't happen for some reason. How can I embed a static framework inside a static framework?
Replies
1
Boosts
0
Views
1.5k
Activity
May ’23
How to single-object prelink a framework?
My situation: I am developing a dynamically linked framework called A, wrapped into .xcframework I depend upon other frameworks B and C that are linked statically However, I don't want the consumers of A to learn about the existence of B and C And because of this, I would like to perform single object pre-link during the linkage of A so that B and C are totally consumed by A and are to be never seen again. This task would be relatively easy if instead of static frameworks (.framework), I used static libraries (.a). In this case, I would be able to easily plop the path to the .a into the Prelink Libraries setting, set Perform Single-Object Prelink to YES, disable the embedding - and the goal would be accomplished. However, I am facing the linkage against frameworks, not libs. The problem is that it has resources and bundles inside of it. If I put a path to the .xcframework or .framework into the Prelink Libraries Build Setting, the build fails: Command MasterObjectLink failed with a nonzero exit code can't map file, errno=22 file '/Users/*****/B/B.xcframework/ios-arm64/B.framework' And if I put a path to the actual executable inside the framework (B.xcframework/ios-arm64/B.framework/B), the build succeeds. However, none of the resources of B.framework are present in the resulting output. Is there a way to automatically copy resources during Single-Object Prelink?
Replies
1
Boosts
0
Views
1.2k
Activity
May ’23
Use `merchantId` from another development team
I am developing an SDK that other apps will be integrating. In the SDK code base, I provide a billing user interface that features calls to the ApplePay. I would like to use my merchantId so that the payments get billed to my benefit. This is intended behavior and the integrators of the SDK will be fully aware of circumstance. At the same time, the integrators of my SDK also might have Apple Pay integrated into their own app. And they might have their own merchantId's that they created in their Apple Developer portal. Can they use my merchaintId, putting it into the entitlement so that my SDK integrated into their app will be using my merchantId to create Apple Pay payments while being a part of an app signed under a different Apple Development team?
Replies
2
Boosts
0
Views
1.9k
Activity
Sep ’21