lundi 19 mai 2014

objective c - données de base ne chargement pas données dans IOS 6 - Stack Overflow


I have developed an app which works well on iOS 5.1 but after upgrading my IDE to X-CODE 4.5 and simulating my app on iOS 6, CoreData doesn't fetchData from myDataBase.SQLITE and the returned NSInteger from



  • (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section


is always 0. X-CODE 4.5 doesn't show any error! and the App doesn't crash, only shows an empty tableview! why this happens? should I change something in my app?




The data between iOS 5 and iOS 6 simulator is not shared. The two simulators are completely independent. Since you're using sqlite as your core data persistent store, check the .sqlite file in the simulator platform folder that it actually has records.


As an aside, Core Data is NOT a database. It's a common misunderstanding that can lead to all sorts of conceptual issue later on. It can use sqlite as a persistent store, but the model is not a database.




Make sure the data you want to display is really in the data base.



I have developed an app which works well on iOS 5.1 but after upgrading my IDE to X-CODE 4.5 and simulating my app on iOS 6, CoreData doesn't fetchData from myDataBase.SQLITE and the returned NSInteger from



  • (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section


is always 0. X-CODE 4.5 doesn't show any error! and the App doesn't crash, only shows an empty tableview! why this happens? should I change something in my app?



The data between iOS 5 and iOS 6 simulator is not shared. The two simulators are completely independent. Since you're using sqlite as your core data persistent store, check the .sqlite file in the simulator platform folder that it actually has records.


As an aside, Core Data is NOT a database. It's a common misunderstanding that can lead to all sorts of conceptual issue later on. It can use sqlite as a persistent store, but the model is not a database.



Make sure the data you want to display is really in the data base.


0 commentaires:

Enregistrer un commentaire