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

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.

Related

iPhone : How to create .mht file for iPhone?

Is it possible to make .mht (web Archive) file for iPhone ?
.mht(web Archive) where the image is embedded into html file. So it can be easy way to send html in email which contain images.
So How do I make this type of file ?
Apple's Safari browser, which runs on the iPhone, does not support the .mht file extension.
You may try using the Data URI scheme instead, which is more portable.
if what you want to do is only to embed images into your HTML formatted emails, try base64 encoding for your images. all the taste without the pain :)

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?

Reading iTunesMovies file in 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.

What are the technical requirements and reasonable master format for an iphone icon?

I'm looking to commission an icon for an iphone app, and would like to provide the designers with the technical requirements. Also, as this may also be used as a logo for the website I'd like to be have a format that I can reuse and scale myself.
What technical requirements should I give to the designer and does apple have a publically linkable description of these? Is it simply 57x57 and 150x150 png or is there more to it?
Also, what is a reasonable, preferably open, scalable master format to request? I don't have photoshop and don't want to get it just for this.
The iPhone Human Interface Guidelines document about custom icons and images explains it in detail
My icon designers typically provide me with a vector file format version of my icon (usually an Illustrator file), a 512x512px TIFF file (which is submitted to Apple for use in the AppStore), and a 57x57px PNG (which is used as the actual application icon).
Also, If you want to get rid of the pre-rendered glossy bit you'll see on most iPhone apps' icons, go search for UIPrerenderedIcon, which is a flag you can set in your app's Info.plist file.
You don't need to go get Photoshop or Illustrator just for this, but you should have a 'master' file that you can keep in perpetuity in case you ever need another graphics designer to make modifications to the original icon.

Newbie wants to create a PDF reader for ipod touch - what's the best approach?

I want to make a small app that displays a PDF, presenting zoom-able single pages with a previous-next page function.
The Core Graphics API is pretty much the same in Cocoa and Cocoa touch. Read up on CGPDFDocument, it should provide you with everything you will need to render PDF pages. You won't need to read the PDF spec or use a library to parse PDF files directly. You will probably to learn more about Core Graphics / Quartz 2D / etc. to understand how to use those functions inside of a Cocoa app.
Based on the gradually evolving Apple policy of rejecting application submissions that duplicate functionality already on the iPhone I would worry about spending too much time even as a newbie on something that is part of the core iPhone feature-set.
This is pretty trivial. The CGPDFDocument functions will allow you to do anything you'd want to do with a PDF file.
The iPhone and iPod touch can view PDFs already, as one of the TV adverts in the UK shows an email with a .pdf attachment (of swimming lessons) being viewed. It can also view .doc, .xls, and so on, so if he is creating a viewer type application then supporting those as well could be a nice feature addition later on.
This means there is a PDF framework on these devices that you will need to access. Presumably Apple can provide support here if he is a paid up developer. Syncing the PDFs to the device is the actual real difficulty, as this isn't supported by iTunes. I assume that you would need to write a network based synchronisation tool, or have an online cloud for holding people's PDFs.
The device doesn't support Flash, so using PDF to Flash conversion tools will not work.
I found this HTML5 framework that should work on an iPad http://bakerframework.com/
but I didn't test it yet.