efz
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Programmer-x: It's not absolutely correct. At least on my Mac do not have the case sensitive system and so on the simulator.
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.
However, I could never (ever) have diagnosed this problem without using the iExplorer tool recommended by pgnatyuk. Truly a necessary first step.
Excellent advice.
It's probably because the file does not take place in the supposed path, or a simple path calculation mistake.