0

i developed an app which is meant to read books(pdf book reader).i loaded 25 books(total size of 320MB) into the app using absolute path.all the books are been seen in the simulator and also i can load all the books into my device through xcode(build and run).

my requirement:

when i loaded the above obtained ipa file into the same device or other device which are in ad-hoc distribution using itunes , it is strange that only few books are being seen in the device.

note: i made sure that all the books are present in the .ipa file,i deleted old app in the device which i run via xcode. the device is in ad-hoc distribution.

while code signing i used the iphone developer certificate. is it necessary to use distribution certificate instead iphone developer certificate which i feel that might be one reason for my problem?

plz anyone suggest me with exact solution to the scenario.
tnx in advance

3 Answers 3

0

I know I have seen problems going from simulator to live device. The simulator is not case sensitive, but the device is. Recheck all your actual files in bundle vs what you are requesting when you open the file. They need to match exactly for device, but not so much for simulator.

I would also try seting the apps-Info.plst to have "Application supports iTunes file sharing" on so you could see what is in the documents folder (this is if your moving files in that area).

2
  • Thank you very much RAZ for giving answer.can you please provide me some more information it is more important for me because while loading app from itunes we must get all the content which we are having in the ipa.
    – ajay
    Feb 24, 2011 at 8:44
  • Recheck your bundle asset files names and open statements. Make sure they are exactly the same. If you bundle up "AbC.pdf" then try and open with "abc.pdf" in all lowercase might not find it on device but could in simulator.
    – RAZ
    Feb 25, 2011 at 5:19
0

One problem might be as RAZ suggested that iPhone is case sensitive, but there could be other problems.

For starters I would check the that ipa does contain everything you think should be there. Take the ipa, change the extension to zip and open it. You'll get a folder containing you're app. Right click the .app and choose show package. You'll now see all the files/resources included in your app. If the files that won't load in the app are there then you'll need to provide more information about the problem.

If they're not you need to make sure xCode knows to copy them to the app resources.

7
  • thank you ron..i ensured all the resources are in the .ipa file.what more information do you need from me.
    – ajay
    Mar 7, 2011 at 14:29
  • Can you elaborate on how you're loading the files?
    – Ron Srebro
    Mar 11, 2011 at 15:17
  • NSString *bundleBooksPath = [[NSBundle mainBundle] pathForResource:__BOOKS_PATH ofType:nil]; NSString *booksPath = [[self applicationDocumentsDirectory] stringByAppendingPathComponent:__BOOKS_PATH]; NSFileManager *fileManager = [NSFileManager defaultManager]; if (![fileManager fileExistsAtPath:booksPath]) { [fileManager copyItemAtPath:bundleBooksPath toPath:booksPath error:nil]; } this is sample code i am using.
    – ajay
    Mar 13, 2011 at 10:41
  • is there anything problem with memory leaks..i am using absolute path file placing books in my project.
    – ajay
    Mar 13, 2011 at 10:50
  • I would start with actually passing an NSError object to the function, maybe you'll get something back that will shed some light on the issue.
    – Ron Srebro
    Mar 13, 2011 at 14:24
0

You might have resources that you haven't copied into the project, and you're only referencing the files on your hard disk. Then when you make the .ipa file it's not included. Try re-importing all your resources and select "copy to project".

1
  • after creating ipa i checked that bundle with extension changed from .ipa to .zip which is giving all the books,and more over i am getting five to six books so i am taking books as a right way.
    – ajay
    Mar 11, 2011 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.