Open in...

Ludovic THEBAULT ludovic.thebault at laposte.net
Sat Jun 18 18:29:34 CEST 2016


> Le 18 juin 2016 à 17:58, Glen Bojsza <gbojsza at gmail.com> a écrit :
> 
> There are many iPad apps that when I receive a particular file via email
> that I am given a choice which app I can open it with.
> 
> My app uses text files and sqlite files and I want the users to be able to
> email their files to others.
> 
> 1. How do you make a LC iOS app so email attachments can be opened?
> 
> 2. How can you script it so a user can select files on their iOS device and
> email them as an attachment?
> 
> I was hoping their would be a video tutorial showing these and how an app
> can check for updates when opened but I have not found any.
> 
> I don't plan to update the app unless new features are added but I do want
> to update the text and database files it uses.
> 
> Given these questions above are there any constraints on what version of LC
> must be used?
> 
> thanks,

Hello,

I’ve done this by modify the settings.xml file in the /tools/Runtime/iOS/Device XX folder inside the Livecode app (but it seem we can put a copy of this file in the « Copy file » tabs of the standalone settings, but i’ve no tried yet)

here the code i added to the settings.xml file, after the "<string>APPL</string> » line :

### : lines personalized 

<key>CFBundleDocumentTypes</key>
       <array>
            <dict>
             <key>CFBundleTypeName</key>
             <string>Description of Your file</string>  ####
             <key>CFBundleTypeRole</key>
             <string>Viewer</string>
             <key>LSHandlerRank</key>
             <string>Owner</string>
             <key>LSItemContentTypes</key>
             <array>
                 <string>com.compagny.nameoftheapp.extension</string> ###
             </array>
            </dict>
     </array>
     <key>UTExportedTypeDeclarations</key>
        <array>
            <dict>
             <key>UTTypeConformsTo</key>
             <array>
                 <string>public.plain-text</string> ### type of file
                 <string>public.text</string> ###
             </array>
             <key>UTTypeDescription</key>
             <string>Description of Your file</string>  ####
             <key>UTTypeIdentifier</key>
              <string>com.compagny.nameoftheapp.extension</string> ####
             <key>UTTypeTagSpecification</key>
             <dict>
                 <key>public.filename-extension</key>
                 <string>extension</string> #### replace with your extension
             </dict>
            </dict>
     </array>	


More information about the use-livecode mailing list