Post

Replies

Boosts

Views

Activity

UITableView behaving differently: Xcode build vs. TestFlight build
The UITableView that I am using in my App updates content dynamically as you scroll. When you get to the bottom of the tableview, more posts will render... The idea is that it will render 20 cells when you have reached the 10th to last cell... This is exactly what is happening when I build the App using Xcode, and it is working perfectly... However, after publishing the app to TestFlight, and downloading, I noticed something wasn't right. It took me awhile to figure out what was going on, but after coding some labels to display on the screen (since I can't view console), I noticed there is a clear difference between how the content is getting rendered with the TestFlight app compared to the Xcode app... When reaching the bottom of the Xcode version, it will look like this: scrolling Current Cell: 10 Total Cells: 30... scrolling Current Cell: 20 Total Cells: 30 Triggers rendering more cells After more cells are rendered: Current Cell: 21 Total Cells: 50 It is the same exact code as the TestFlight code. I test the app using Xcode, publish without making any changes... However, what ends up happening on the TestFlight version is: Triggers rendering more cells After more cells are rendered: Current Cell: 41 Total Cells: 50 The new cells are being inserted in the right spots... They are being placed at the bottom, but the scroll position of the UITableView is at the bottom where it should not be... Now I would understand if this was happening in my Xcode build too, but it's not... I thought: "hey, maybe it is because I need to be performing the updates in a batch..." So I tried doing tableview.performBatchUpdates() which didn't make any real noticeable difference in the Xcode build, however, in the TestFlight build, the App crashes when trying to render more posts... Makes no sense why the builds are behaving differently. They are being tested on the same device, and it is using the same code and everything... I generally figure out issues like these on my own, and I find it likely that I will come up with a workaround for it, but if anyone working at apple cares to help me figure out exactly why there is a difference between the Xcode app and the TestFlight app - that would be appreciated. PS - written in Swift
1
0
734
Mar ’21