I just filed the following radar and I thought I'd share it. (Of course, if 
this is one of those things that "everybody knows", please be kind.)

rdar://14766402

 -[NSBundle URLForResource:withExtension:subdirectory] is case sensitive

Create a file named "Index.html" (notice the leading 'I' is capitalized). Place 
the file somewhere inside the application bundle. Examine the result of the 
following statement (where self.helpFolderName describes the folder containing 
the file).

NSURL * indexURL = [[NSBundle mainBundle] URLForResource:@"index" 
withExtension:@"html" subdirectory:self.helpFolderName];

I expect indexURL to be non-null (and to contain the appropriate URL). However, 
in actual devices, this function returns nil; on the IOS Simulator it returns a 
valid URL. If I change the resource name to exactly match the actual file name 
(i.e., change either the filename or the argument to exactly match) I get a 
correct result on both the actual and simulated devices.


Cheers,

Rick Aurbach
Aurbach & Associates, Inc.

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to