3

I tried this key in plist..

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>All Files</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.data</string>
            <string>public.content</string>
        </array>
    </dict>
</array>

this works for file sharing but in case of file attachment from ms-word app this code does not work while Dropbox and Slack still in menu. Also I have tried lots of examples.

asmad
  • 387
  • 4
  • 13

1 Answers1

1

This is not just Open In menu, this is Activities menu, that means it displays apps with Share extensions inside. To get into this menu you should create Share extension in your app, and this extension will show in MS Word app.
To create Share extension in your app you should add new Target for it, File > New > Target > Application Extension > Share Extension. Here is official documentation about share extensions.

It can be little confusing, so I created simple example with empty extension, you can get it here .

Screeshot with example app in Activities menu:
enter image description here

UPD

To see your app next to DropBox icon in Activities menu you should create Action extension for your app. I created another example with empty Action extension here. How DropBox action extension works: it displays Action extension inside MSWord app and uploads selected file to DropBox server.

Also, you should know, that these extensions are not App launcher, so you should implement you functionality in extension without you app opening, link openURL not work in Action Extension

Screeshot with Action extension icon:
enter image description here

Community
  • 1
  • 1
shpasta
  • 1,913
  • 15
  • 21
  • Wow ... thanks @shpasts this works.. and Please tell me how can my app get functionality of **save to** because my app have save document facility, i want my app view next to **Dropbox** ... – asmad Jan 21 '16 at 12:03