Link to home
Start Free TrialLog in
Avatar of efz
efzFlag for United States of America

asked on

iOS File Not Found Error

Hello Experts,

I am developing an iOS program for iPad. The program performs some simple calculations and in the course of doing so, it reads a text file containing a lookup table (table.txt). It works fine when I run it in XCode using the iPad simulator, but when I run it on my iPad, it gives a “File not found” error. I’m reasonably sure it’s not finding the table.txt file, but I’m not sure how to verify that the table.txt file is being transferred to the iPad as part of the application test installation. I used Xcode’s “Add Files To …” function to make sure the table.txt file was added to the project, and I also visited the Target|Copy Bundle Resources pane to make sure the table.txt file was one of the items in the list.

Curiously, the program reads another data file (page0.psf) supposedly from the same directory without a problem.

I’m an old Windows programmer new to iOS so I’m not sure what I may be doing wrong. Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Hamidreza Vakilian
Hamidreza Vakilian

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hamidreza Vakilian
Hamidreza Vakilian

If it was due to a character case mismatch then he would also had faced the issue on iOS simulator.
It's probably because the file does not take place in the supposed path, or a simple path calculation mistake.
Programmer-x: It's not absolutely correct. At least on my Mac do not have the case sensitive system and so on the simulator.
Avatar of efz

ASKER

You two are golden. Both were right. Even though I was aware of the case sensitivity issue I had previously placed a mis-capitalized file name on the iPad and later file transfers were not overwriting the file name even though I had corrected it on the Mac. Therefore it was a case senstitivity issue.

However, I could never (ever) have diagnosed this problem without using the iExplorer tool recommended by pgnatyuk. Truly a necessary first step.

Excellent advice.