简体   繁体   中英

How can I allow user to select photo from iOS Photos app and open in my application? And I don't want to use SHARE EXTENSION

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!!!

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM