Reading iTunesMovies file in iPhone? - iphone

In iPhone, the iPod app saves the media files (audio, video) with strange names and in weird folders (F00,F01 etc). There is a file named iTunesMovies in iPhone, which contains all the information about the metadata of those video files and how they are to be displayed in iPod app. I copied that to my Mac also, and when i tried to open that file in textEdit, it showed some alien characters which made me believe that it is encrypted may be(Thats just a wild guess).
I want to read/change the contents of that iTunesMovies file. Can i do that? Is there any Framework which deals with that iTunesMovies file?
Thanks in advance

I don't think there's a framework to do this, but you can probably do it yourself by reading the file into an NSData object, then manipulating how you would like. Your app will have to be running outside the sandbox, as well. Something I don't know how to do.
Keep in mind that this isn't allowed by Apple, so any apps you make that use this would have be distributed through other means.

Related

xcode move audio files

I am creating iPhone application using PhoneGap. In that I have used navigator.captureAudio method to record the audio. Normally the recorded audio files stored inside the Application(tmp folder). So the application size getting increase each time while recording. I don't want to keep the recorded file inside my application.
Is there any way to move this file from application storage to outside(like music)? How to move this files in Xcode? Any suggestion on this?
Thanks
AFAIK any files your application will create must be stored within the Application directory structure. This is because each iOS app operates within its own sandbox.
See Apple's docs on this: File System Programming Guide.
You can interact with other applications such as the music app using MPMusicPlayerController, but I've never tried adding files to this, only playing files.
You could always experiment with iCloud integration? Although this will still appear in your sandbox I think.

picking a file from the memory of iphone?

i am making a client server program for iphone communication with the sever i want to know
that how can i pick a file (jpg, 3gp, bmp or some word document ) from the memory of the
iphone and send it to the server please explain in some detail as i m new in iphone
programming and give some code for it if possible, and how can i convertv an adobe reader and
msword compatible file to jpg file.
Slow down there buster.
There is no "memory of the iPhone." You'll have to get that file in somehow besides a traditional file system. There are ways to send files to other apps… check the docs. To start with, why don't you bundle in a couple files with your .app to test with.
Once you have the file, use something like the ASIHTTPRequest library (google it) to send it to the server.
Clear?

Where is the file of the recording located on the iPhone SpeakHere example?

It is as simple as that.
When you use the SpeakHere example it should create a file somewhere on the iPhone that contains the data from the recording.
Does anyone know how I can find this?
Thanks!
EDIT 1
To be clear, I want to do operations on the wav file within my application. I have some code that needs the URL of a wav file. What would that be in the SpeakHere example? (Keep in mind this is all within the same app).
EDIT 2
I appreciate the suggestion #sudo rm -rf, but I would really like to stick to the SpeakHere example as it serves my purpose well. Have you looked at the mRecordFile variable in AQRecorder.mm? Could that be it?
Well, I tried the app and it looks like it doesn't even save it to disk (it should be in the Documents directory); I'm not sure how it's holding it. Maybe in memory? Anyway, if I were you, I'd not use that sample code for recording audio. It's meant for iOS 2, and is quite outdated. Try visiting THIS question and read about how to use AVAudioRecorder.
Edit:
Found where it saves the audio file to recordedFile.caf. However, it's saving it to a temporary directory. So, to access it you need to use:
recordFilePath = (CFStringRef)[NSTemporaryDirectory() stringByAppendingPathComponent: #"recordedFile.caf"];
player->CreateQueueForFile(recordFilePath);
An App can only store data inside it's own sandbox. This means, it's stored inside the bundle of your example App and can't be read by any other App, except by the example App.

Making ringtone of music files on Iphone

Is it possible to edit music files stored on iphone in app and create ringtone from them?
Any help would be appreciated.
If I understand correctly, you want to extract the music from an existing iPhone app, and then turn that music from the app into a ring tone?
The short answer is no, not if you keep your iDevice up to date and within apple's licensed operating paradigm.
The longer answer is maybe. If you jailbreak the device, you may be able to hack access to the application and extract the desired data.
If I don't understand correctly, and you're just looking to change any old mp3 into an iPhone ringtone, try googling for iPhone ringtone hacks. Of course your mileage may vary but google is again your friend.
Sorry to not provide any code. This question didn't seem to warrant it.
No, for a number of reasons. The SDK doesn't give you access to the actual file data from the music library (just an object that will play music back for you), and while you can probably export an M4A file, with an "m4r" extension that iTunes will recognize as a ringtone, you'll have to get the user to take the file off their device and import it into iTunes manually for it to be usable as an actual ringtone on their phone.

In iPhone OS, what UTI represents a plain ol' text file?

I'm attempting to make use of the UIDocumentInteractionController mechanism in iPhone OS 3.2, but I'm struggling to figure out exactly how to construct a UTI that it likes.
I've gotten as far as attempting to set public.plain-text, but it's hard to test whether this is the correct UTI for a plain text document, since I can't tell whether the issue is that my iPad doesn't have any apps that support plain text import. (I figured Pages would, but I suppose perhaps not, since it will attempt and fail to load any files with the extension .pages, regardless of UTI).
Any seasoned OS X developers that can help on this?
According to the Uniform Type Identifiers Reference, public.plain-text appears to be the correct UTI for plain text files.
If you want to see what UTIs an application responds to, you could grab its .ipa file (from the Mobile Applications directory in your iTunes library), rename it to a .zip file, extract the contents, and find the Info.plist within its application bundle. Within that property list should be a CFBundleDocumentTypes key, underneath which should be a list of UTIs handled by that application.
You could then test your UIDocumentInteractionController by specifying one of these known-good UTIs.