Useful USB file transfer on iOS - How to hide some files? - iphone

I am building the iPhone application, which will support the USB file transfer function.
I modified the .plist file. And now I can see the files in Documents directory of my own iPhone application, through iTunes on Mac.
Everything is okay. However, there are some important files, which shouldn't show to the users, such as the configuration file, the database file and so on.
So here is my question - is it possible to hide some files?
Just easily, I can keep the important files out of the Documents directory. But when I update the application from appstore, these will be deleted.
Thank you.

I tried to prefix the files with a dot. And it works great.
Thank you, DanZimm.

Related

Which file contains Localization info in an iPhone Xcode project?

I am working on a iPhone app and trying to add a German localization. And we are using TFS for version control.
I have added the German strings file all right, but every time I restart Xcode, the Localizable.strings(German) is gone. The file still exists on disk, but just not included in the project. I believe it's because some controlling file is read-only. I have to find this file and explicitly check it out. I cannot checkout/check-in the whole project because the guy integrate the code will be mad.
It's the xxxxx.xcodeproj folder.

Monotouch and sqlite database

Here's the scenario: I have created a db3 file, attached it to to the solution, changed it to content (tried resource as well), and copying all the time. When I launch the app, I copy this to the document folder of the app. Now, it works flawlessly in the simulator, i.e. I can both read and write. But on the device, it's only in Read-Only mode. How do I make it writable on the device? I am using the latest ios 5 and latest monotouch.
Thanks in advance for any help.
And Merry Christmas everyone :)
Files stored in the .app directory are read-only on device.
If you need to have a read-write version of any of your data files, you need to copy this to your Documents storage area.

iPhone create csv file for export on computer

For testing purpose, I need to create logs in a CSV file in my iPhone application. I'm using Dave DeLong's CHCSVParser to create the CSV, but I don't know what path I should put when creating it to find it on my iPhone disk. I am using a FileBrowser app to go check the file straight from the device, but where to look at?
Also, I'm taking any advices for creating a CSV from the iPhone app and put it on a desktop computer, maybe you have other ways to do that...
Thanks!
Just put it in the Documents directory where you'd put anything else and enable document sharing while testing. Then you can get them straight from iTunes. You could also set up a simple web server that allows PUT and do HTTP PUT from your app. I'd probably do the second personally, especially just for testing.
To enable the file sharing, you need to add the UIFileSharingEnabled key to your Info.plist file and make sure it's set.
For more information on getting the Documents directory, please review the iOS Application Programming Guide, specifically the File System section, which you should have read by now.

iPhone App using MonoTouch - which files/folder binaries do I upload to the AppStore?

I have created a small iPhone app using MonoTouch - got all provisioning files etc set up etc and I have done a Distribution build which has created a Distribution folder (under the bin\iPhone folder).
Now in this Distribution folder I can see two more folders called MyGame.app, MyGame.app.dSym and two files MyGame.exe and MyGame.xcent.
Which of these files or folders do I need to zip and upload to the App store??
My guess is it is the MyGame.app folder which is full of files, images, Info.plist, embedded.mobileprovision but it also seems to contain monotouch.dll's and Microsoft's System.Core.dll etc. ??
Thanks
There is a good tutorial in MonoTouch website
http://monotouch.net/Documentation/Building_for_Distribution
the last lines are
navigating to the bin/Distribution/iPhone directory. Zip the app bundle, and submit it to Apple.
The file with the .app extension is the application bundle. It's really a "folder" disguised as a file. You need to zip it up before you can submit it. Curious, what is the name of your game? I'm interested in seeing one of these "ported" applications.
Good luck, sir

Decompile iPhone app binary

Is there a way to decompile an iPhone binary file in order to extract it's resources like images and sound files?
If you have sync the app to you Mac, just open the following folder:
/Users/YOUR_USER_NAME/Music/iTunes/iTunes Media/Mobile Applications
Or open iTunes and go to Apps and right mouse button on the app and select "show in Finder"
Copy the app you want to inspect, f.e. Demo.ipa
Change the extension ipa to zip => Demo.zip
Extract the zip
Open the folder and then the folder "Payload"
Right Mouse Click Demo.app and select "Show Package Content"
Change your .app file extension to zip and then extract the files. You will be able to get all resource files.
An iPhone .app file is simply a folder. If you're viewing it on a Mac (or even on the iPhone with iFile), just remove the .app extension and you should be able to view the resources. On Windows and Linux (tested with Ubuntu 14.04), it should "just work" and you'll be able to view the folder's contents without any renaming.
Edit: Removed the assumption that images/sound would be used in another application.
First, off you shouldn't be reverse compiling code so that you can get images/sound files from an iPhone or any other application for that matter.
Second, reverse compiling does not always guarantee a successful file generation of whatever file you're looking for. Whether it's an audio or image file.
It would be a much better approach for you in the long run, and in the process of learning that you either contact the authors of the app and ask for permission to use the images/audio that you're seeking (since you think it's such an awesome sound/image that you can't live without). Or you can do an audio mixing or image generation yourself.
If your lacking the time, skills or applications that would get you the quality of work you're looking for. I would recommend bring in a graphic artist or sound engineer/mixer.
You'd be learning how to manage a group or individual, convey your ideas correctly and informative, and you're more likely to build a better application as a result. And that is something you can't get from reverse compiling an iPhone application :-)