• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Opening Documents in iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening Documents in iOS


  • Subject: Opening Documents in iOS
  • From: Pax <email@hidden>
  • Date: Sat, 26 Jul 2014 19:57:40 +0100

I'm writing an iOS program that stores data in a text file (UTF-8) that contains custom tags which are only meaningful to my app.  Loading the files, and doing useful work with them is not a problem - but I would like these files to be sharable, so that one user can send his data files to another user (via email) and so forth.  To this end, I would like users to be able to tap on the file in mail, for example, and have it open in my app.  For some reason, I can't get this to work.

My guess is that the problem isn't with the code, I suspect that the problem is with the info plist.  My info plist has been set up as follows (I've extracted the relevant sections, rather than pasting the whole lot):

	<key>CFBundleDocumentTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeIconFiles</key>
			<array>
				<string>sddDataDoc.png</string>
			</array>
			<key>CFBundleTypeName</key>
			<string>Harvert Space Delimited</string>
			<key>CFBundleTypeRole</key>
			<string>Viewer</string>
			<key>LSHandlerRank</key>
			<string>Owner</string>
			<key>LSItemContentTypes</key>
			<array>
				<string>com.pax.harvert.sdddata</string>
			</array>
		</dict>
		<dict>
			<key>CFBundleTypeIconFiles</key>
			<array>
				<string>csvDataDoc.png</string>
			</array>
			<key>CFBundleTypeName</key>
			<string>Harvert Plist</string>
			<key>CFBundleTypeRole</key>
			<string>Viewer</string>
			<key>LSHandlerRank</key>
			<string>Owner</string>
			<key>LSItemContentTypes</key>
			<array>
				<string>com.pax.harvert.plistdata</string>
			</array>
		</dict>
	</array>

and

	<key>UTExportedTypeDeclarations</key>
	<array>
		<dict>
			<key>UTTagTypeSpecification</key>
			<dict>
				<key>public.filename-extension</key>
                		<array>
                    			<string>sdd</string>
                   			 <string>SDD</string>
                		</array>
                		<key>public.mime-type</key>
               			 <string>text/plain</string>
			</dict>
			<key>UTTypeConformsTo</key>
			<array>
				<string>public.text</string>
			</array>
			<key>UTTypeDescription</key>
			<string>Harvert Space Delimited File</string>
			<key>UTTypeIdentifier</key>
			<string>com.pax.harvert.sdddata</string>
			<key>UTTypeSize320IconFile</key>
			<string>sddDocLrg</string>
			<key>UTTypeSize64IconFile</key>
			<string>sddDocSml</string>
		</dict>
		<dict>
			<key>UTTagTypeSpecification</key>
			<dict>
				<key>public.filename-extension</key>
                		<array>
                    			<string>hpd</string>
                    			<string>HPD</string>
                		</array>
                		<key>public.mime-type</key>
                		<string>text/plain</string>
			</dict>
			<key>UTTypeConformsTo</key>
			<array>
				<string>public.text</string>
			</array>
			<key>UTTypeDescription</key>
			<string>Harvert Plist Data File</string>
			<key>UTTypeIdentifier</key>
			<string>com.pax.harvert.plistdata</string>
			<key>UTTypeSize320IconFile</key>
			<string>hpdDocLrg</string>
			<key>UTTypeSize64IconFile</key>
			<string>hpdDocSml</string>
		</dict>
	</array>

Clearly I've missed a step - but what? Thank you for any help that you can provide.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Prev by Date: 10.10 NSSlider continuous mode sends gazillions of action messages
  • Next by Date: OS X play a video?
  • Previous by thread: 10.10 NSSlider continuous mode sends gazillions of action messages
  • Next by thread: OS X play a video?
  • Index(es):
    • Date
    • Thread