TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Different UITableView behavior on different devices

Forums > Swift

I have an iOS app with a simple UITableView that displays a list of exercises. Users can add their own custom exercises to the list (a new exercise is created in Core Data). I've had a couple of users report that when they create and save a new exercise, it doesn't appear in the list. However, it works on my testing device and in all the simulators I've tried. In other words, I can't recreate the problem

I imagine the fundamental problem could be either it's not being saved in Core Data, or the UITableView isn't refreshing. But I have no idea why it would work on some devices but not others.

I've looked through a lot of my code and can't find anything that could explain it.

So my question is very high level - what approach would you take to try to track down the problem?

   

The open source program DB Browser for SQLite can open the Core Data .sqlite file so you can see whether your program has added the expected records. By default it opens the database with write privileges, in which case it merges the .wal file into the .sqlite file, but it has a menu command to open the database read-only.

github.com/sqlitebrowser/sqlitebrowser

   

I use DB Browser for SQLite, but of course I can only use that on my device or simulators. And the feature works for me.

I'm looking for ideas on what might cause the new exercise to either not be saved to Core Data or if it is saved, to not be shown when the table refreshes on other devices when it works on mine .

   

Hacking with Swift is sponsored by Blaze.

SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!

Reserve your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.