Post

Replies

Boosts

Views

Activity

Reply to SwiftUI ScrollView scrollTo not consistently scrolling to latest message
The above approach did improve the scrolling behavior to some extent, but it wasn’t fully reliable in the long run. After that, I tried a different solution by bridging SwiftUI with UIKit and switching to a UICollectionView. With this approach, the scrolling issues were completely resolved, and I no longer see any unexpected behavior, even with large, continuously streaming responses.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3h
Reply to SwiftUI ScrollView scrollTo not consistently scrolling to latest message
Thanks for the quick response 🙌 I was actually doing the same thing already using onChange, and it works fine in simpler scenarios. In my case, I’m building an AI chat app where responses are streamed and can get very long (for example, asking it to write a 1000-word essay). When these large streaming responses come in repeatedly, and the user scrolls somewhere in the middle of the chat and sends a new message, I noticed that sometimes the scroll doesn’t return to the expected position based on the message .id. What helped a lot in my case was flipping the scroll view upside down so new messages naturally appear at the bottom. After doing this, the scrolling behavior became much more stable with long, continuously updating content. .flippedUpsideDown() func flippedUpsideDown() -> some View { self .rotationEffect(.radians(.pi)) .scaleEffect(x: -1, y: 1, anchor: .center) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3d
Reply to In-App Purchase Products Not Fetching via Unity IAP in TestFlight Builds
@FaizanKhan255 I also faced this issue. Based on my observation, it occurs in specific regions—for example, in Pakistan, sometimes some of Apple's APIs don’t work properly. Try connecting to a VPN and then fetch the products; in my case, I was able to retrieve products that way. Additionally, under the Developer settings on iPhone where you log into the Sandbox account, I wasn’t able to log in without using a VPN. After connecting to a VPN, all of these issues were resolved.
May ’25
Reply to "Unable to Complete Request" error
@jezekilj @App Review I resolved this issue—the problem was with the view hierarchy. If your subscription controller is the root view controller, the purchase process works as expected. However, the issue arises when the subscription controller is presented, and StoreKit 2 attempts to present another view on top of an already presented view, causing it not to appear. To fix this, instead of presenting the subscription controller, push it onto the navigation stack and then initiate the purchase. This should work correctly.
Mar ’25
Reply to "Unable to Complete Request" error
I am encountering an error where, on some devices, the purchase process works fine, but on others, I receive the error: "Unable to complete request," with no additional information. The products are loading correctly, but the error occurs when I attempt to make a purchase. What could be the possible causes for this error, and under what conditions might it occur?
Jan ’25