Registering an App to receive file types (.docx)

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Registering an App to receive file types (.docx)

Post by Nakia » Thu Jan 17, 2013 11:26 pm

Hi,

I need to make some changes to my settings.pList to register my Apps ability to recieve the .docx document type.

I have attached this below example but have a few questions for anyone that may have attempted this.
1. Do I need to declare images as its a known file type to IOS? If I don't need it do I just remove that Key?
2. When modifying the pList do I just add this to the end of the file, before the final </plist> key?

Code: Select all

<dict> 
   <key>CFBundleTypeName</key> 
   <string>My File Format</string> 
   <key>CFBundleTypeIconFiles</key> 
       <array> 
           <string>MySmallIcon.png</string> 
           <string>MyLargeIcon.png</string> 
       </array> 
   <key>LSItemContentTypes</key> 
       <array> 
           <string>com.example.myformat</string> 
       </array> 
   <key>LSHandlerRank</key> 
   <string>Owner</string> 
</dict> 

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Registering an App to receive file types (.docx)

Post by Nakia » Fri Jan 18, 2013 12:07 am

Okay,

so I have ended up with the following but can't seem to get it working..
I am only new to this so there is something simple I have messed up...

Happy to send someone a copy of my pList file if they are willing to help?

Code: Select all

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>WesTec Form File</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.word.doc</string>
        </array>
    </dict>
</array>

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Registering an App to receive file types (.docx)

Post by Nakia » Sat Jan 19, 2013 11:24 am

Update..

Have been able to apply the following to my pList file and the App now shows up as compatible for .Doc files (in open In etc) but unfortunately still no .Docx.
Reading a little more documentation I can't seem to find a system UTI for the .Docx format so I believe I will need to add in an applications specific UTI.

Anyway, what is below will at least work with .Doc format :)

Code: Select all

	<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>WesTec Form File</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.word.doc</string>
        </array>
    </dict>
</array>

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Registering an App to receive file types (.docx)

Post by Simon » Sun Jan 20, 2013 1:57 am

Nice Work!
Just opening the plist file and adding your code to the bottom and it's done?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Registering an App to receive file types (.docx)

Post by Nakia » Sun Jan 20, 2013 3:16 am

Yep it works for me at least..

You will then need to use the URLwakeup message to handle the document
you have been handed..

Still working in finding a sustem UTI that handles both .Doc and .Docx format.
The .Docx format is not new so surely there would have to be system UTI somewhere but just can't seem to find
It in any of apples documentation..

Post Reply