Property list not copied into document directory - objective-c

I have manually created a property list (Config.plist) using Xcode 4.3 and saved it in "Supporting Files/Config.plist".
However, when building the project and running the app in the simulator, the property list is not copied in the document directory (as supposed) nor any other directory in the simulator.
Any help would be highly appreciated.
Thank you!

It will go to NSBundle mainBundle by default. You will require to copy that file to document directory. Check my code for copy file to document directory over here:
Plist

Related

NSFileManager Create a .app like file/folder in cocoa

I'd like to create a folder/file (similar to how the .app files/folders work) so that I can have a directory within my file. But still show the document icon that I setup via the xcode project interface under the info panel.
No idea how to go about this, any ideas?
Solution:
So basically, you just hit an option in Xcode under the document saying that you do want it to be a bundle. Then you just create a folder with the extension you have in your document (info.plist). Thanks y'all.
I think what you are looking for are Packages.
See About Bundles and Document Packages for more details.

File not found error in xcode

I have imported the folder containing SUPQueueConnection.h to the project and to the project root too. Still it is showing the same error SUPQueueConnection.h file not found.
And we imported all such needed .h and .m files to the project root.
Is there any other way for doing it?
Can anyone please help me in solving this problem?
In project navigation bar of your project check the folder you imported that it actually contains SUPQueueConnection.h file or not and if it is there try to import header file in the class in which you are using "SUPQueueConnection.h" file.Also if project is showing SUPQueueConnection.h file then right click on this file and click "Show IN Finder" option to see where actually the file is.Make sure it is copied in project folder.
If it does not solve the problem try deleting this file and drag and drop SUPQueueConnection.h again in project directly and make sure while copying on target your project is check marked.
Have you made sure that the files that aren't found are actually in your Xcode project? Make sure you can see the files somewhere in the sidebar. I've never actually tried it, but I don't think you can simply access files in the project directory root, they must be in your project. Xcode has changed since I used it last (been doing other things) but I think you can still add files by right clicking somewhere in your sidebar, also unless its changed you can add external files using a button in the file menu

put icons under Resources subfolder

When I tried to archive one of my iOS projects, I got this warning message:
Validate MyApp.app ...in ....
Icon specified in the Info.plist not found under the top level app wrapper: Images/icon.png
I have put all images files under Resources/Images and created folder reference to Images folder in the project. What value I should give to Info.plist for icons images under a folder reference?
This is my current values:
Make sure that folder reference is setup properly. This can happen when the folder path is not specified correctly in relation to the project folder.
Just noticed, where is the itunesartwork.png file? I see it listed in your plist, but not in the folder.

open .chm file from my.resources when a buttons clicked

I already have this code from another question on this website.
Help.ShowHelp(ParentForm,
("C:\Users\Beaudean\Desktop\Help.chm"),HelpNavigator.TableOfContents, Nothing)
That works fine except i need the location of the chm help file to point to "my.resources" where it exists because i need to install my program but in that code example it only works with strings?
Thanks you :)
You cannot make this work. The .chm help file viewer is an external program, hh.exe. It doesn't know anything about managed resources, it needs a .chm file on disk.
Setup your project so that the .chm file is available in your build directory. Project + Add Existing Item and pick your .chm file. Select the added file and set its Build property to Content (so it gets installed with the rest of your files) and its Copy to Output Directory to "Copy if Newer" (so it gets copied to your build directory).
And modify your code so it can always find that file:
Dim path = System.IO.Path.Combine(Application.StartupPath, "Help.chm")
Help.ShowHelp(ParentForm, path, HelpNavigator.TableOfContents)

Are java files supported by Objective-C's NSBundle pathForResource method?

I'm trying to obtain the path for a java file which I want to load into an NSString.
Currently this line of code is returning nil.
[[NSBundle mainBundle] pathForResource:#"LockDialog" ofType:#"java"]];
I added my file "LockDialog.java" to the project via the menu, File>New>New File. The pathForResource method seems fine for returning the path of txt files or html files but completely fails when I'm trying to get the path of a java file.
Any help or insight massively appreciated,
Thanks,
James
File type should not matter, but chances are the file is not actually being copied to your application bundle. Check your Target>Build Phases>Copy Bundle Resources settings to ensure it's there, and if not, drag it over to this list.
In addition to adding the file to the project, you need to make sure that it gets added to the output bundle.
Open the project in Xcode, navigate to your target, switch to the "Build Phases" tab, and add "LockDialog.java" to the "Copy Bundle Resources" list.