0

How can I allow user to select photo from iOS Photos app and share/open in my application? And I don't want to use SHARE EXTENSION. Can anyone help me to implement it using "Uniform Type Identifiers" ? My plist source code snippet:

 <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>public.image</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image</string>
            </array>
        </dict>
    </array>

This is not working for me!!!

enter image description here

Community
  • 1
  • 1
Rameez
  • 312
  • 4
  • 20
  • Do you mean that you want your user to hit a button from inside your app (or maybe a different interaction) that opens the Photos app for him to pick the photo he wants? – TawaNicolas Oct 16 '17 at 11:45
  • Nope!!! 1)User will open the Photos App. 2) Select a Photo and click on share icon. 3) In the list of apps which supports photo sharing I need my app to be listed. – Rameez Oct 16 '17 at 11:48

1 Answers1

1

There are 2 main solution

  1. use any ImagePicker Library or use UIImage picker native API.
  2. get access of photos library and enumerate every folder and file(probably image file) then show it to user.
M Faheem Rajput
  • 768
  • 2
  • 9
  • 27
  • I am sharing a photo from iOS Photos App to My App through share option. Image shown in the question is from Photos App. As shown in Picture above I wanted my application to be listed along with Messages, Mail, iCloudPhoto Sharing etc. – Rameez Oct 16 '17 at 12:07