Skip to main content
Inspiring
September 25, 2012
Question

IOS File type association

  • September 25, 2012
  • 2 replies
  • 5330 views

I am trying to invoke my air app when a user clicks a text file in something like drop box.  I found the following through a bit of research but when I add it into my InfoAdditions, I get an error.

<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>txt</string>
<string>TXT</string>
</array>
<key>CFBundleTypeName</key>
<string>Text</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>

I am just getting started with IOS development.  What is currently in there right now is:

<key>UIDeviceFamily</key><array><string>1</string><string>2</string><string>2</string></array>

Any thoughts?  I just want to read in text from a text file.

Thanks


This topic has been closed for replies.

2 replies

Inspiring
September 25, 2012

Is that only part of your entry or are you missing the closing </dict></array> that needs to go on the end?

There are also some other keys that can go in there:

                                      <key>CFBundleTypeIconFiles</key>

                                      <array>

        <string>path-to-image64</string>

                                                <string>path-to-image320</string>

                                      </array>

                                      <key>LSItemContentTypes</key>

                                      <array>

                                                <string>public.text</string>

                                      </array>

                                      <key>LSHandlerRank</key>

                                      <string>Alternate</string>

mola2alexAuthor
Inspiring
September 25, 2012

@FLAdude, yep, I was missing those.  It now compiles ok but when I go into drop box and select a text file, I get 'No apps support opening this file'.  I want my app to be supporting of opening that file

Community Manager
November 7, 2012

Just tried Adobe AIR 3.5. Still doesn't work. But it is different now. Instead of "Open with" it now correctly displays "Open with <ApplicationName>" when you tap on a file of registered type. But nothing happens next. Which is quite puzzling actually. I imagine the application launch is controlled completely by iOS. And it is not clear why it displays the application as a possible viewer but does nothing when application is selected.


I tried this for iOS6 and I am able to successfully launch my application.

Could you please share a sample app so that we can reproduce the issue.

You can mail me sources at krgupta@adobe.com

Thanks,

Krati

Nimisha1
Participating Frequently
September 25, 2012

>>To invoke you air app from another native app you have to register your app with custom URI , you can get more information at http://help.adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd1867-8000.html#WS901d38e593cd1bac354f4f7b12e260e3e67-8000

Thanks,

Nimisha

mola2alexAuthor
Inspiring
September 25, 2012

Not really what I need.  I want to invoke my app based on a file type.  So registering my app for a specific file type.  Really need the equivalent to iOS as this is to Android:

<intent-filter>

      <data android:mimeType="text/plain" />

          <action android:name="android.intent.action.VIEW" />

          <category android:name="android.intent.category.DEFAULT" />

      </intent-filter>