Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/93.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS7自定义UTI_Ios_Ios7_Uti - Fatal编程技术网

iOS7自定义UTI

iOS7自定义UTI,ios,ios7,uti,Ios,Ios7,Uti,这一次我的头撞到了墙上,但我的自定义UTI似乎无法正常工作 我正在努力让AirDrop在我的应用程序中实现,这样我就可以在设备之间共享文件。我能够成功地将文件传输到其他设备,但安装了我的应用程序的其他设备将无法打开我的应用程序中的文件 以下是my app.plist的转储文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http

这一次我的头撞到了墙上,但我的自定义UTI似乎无法正常工作

我正在努力让AirDrop在我的应用程序中实现,这样我就可以在设备之间共享文件。我能够成功地将文件传输到其他设备,但安装了我的应用程序的其他设备将无法打开我的应用程序中的文件

以下是my app.plist的转储文件:

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>MYAPP</string>
    <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeIconFiles</key>
            <array>
                <string>57x57</string>
            </array>
            <key>CFBundleTypeName</key>
            <string>MYAPPNAME Shared Assignment</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.MYAPPNAME.SIAASSIGNMENT</string>
            </array>
        </dict>
    </array>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>57x57 2.png</string>
                <string>114x114 2.png</string>
                <string>72x72 2.png</string>
                <string>144x144 2.png</string>
            </array>
        </dict>
    </dict>
    <key>CFBundleIdentifier</key>
    <string>com.MYAPPNAME.${PRODUCT_NAME:rfc1034identifier}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>4.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>4.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSMainNibFile</key>
    <string>Main_Window</string>
    <key>NSMainNibFile~ipad</key>
    <string>Main_Window_iPad</string>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>remote-notification</string>
    </array>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UIStatusBarTintParameters</key>
    <dict>
        <key>UINavigationBar</key>
        <dict>
            <key>Style</key>
            <string>UIBarStyleDefault</string>
            <key>Translucent</key>
            <false/>
        </dict>
    </dict>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.text</string>
            </array>
            <key>UTTypeDescription</key>
            <string>MYAPPNAME Shared Assignment</string>
            <key>UTTypeIdentifier</key>
            <string>com.MYAPPNAME.SIAASSIGNMENT</string>
            <key>UTTypeSize320IconFile</key>
            <string>72x72</string>
            <key>UTTypeSize64IconFile</key>
            <string>57x57</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.MYAPPNAME.SIAASSIGNMENT</key>
                <array>
                    <string>SIAASSIGNMENT</string>
                                <key>public.mime-type</key>
                                <string>application/xml</string>
                </array>
            </dict>
        </dict>
    </array>
</dict>
</plist>

CfBundledDevelopmentRegion
EN
CbundleDisplayName
MYAPP
CbundleDocumentTypes
CbundleTypeConfigiles
57x57
CbundleTypeName
MYAPPNAME共享分配
CbundleTypeRole
编辑
伊斯汉德兰克
所有者
lsItemContentType
com.MYAPPNAME.siassignment
Cbundlexecutable
${EXECUTABLE_NAME}
彩铃
CFBundlePrimaryIcon
CFBundleIconFiles
57x57 2.png
114x114 2.png
72x72.png
144x144 2.png
CbundleIdentifier
com.MYAPPNAME.${PRODUCT_NAME:rfc1034identifier}
CbundleInfo字典版本
6
CFBundleName
${PRODUCT_NAME}
CbundlePackageType
应用
CbundleShortVersionString
4
CFBundleSignature
????
循环流化床锅炉
4
LSREQUIRESPHONEOS
NSMainNibFile
主窗口
NSMainNibFile~ipad
主窗口
UIBackgroundModes
取来
远程通知
UIRequiredDeviceCapabilities
armv7
UIStatusBartint参数
导航栏
风格
UIBarStyleDefault
半透明的
UI支持接口方向
UIInterfaceOrientationPortrait
UI支持界面方向~ipad
UIInterfaceOrientationPortrait
UTExportedTypeDeclarations
Uttypecommisto
public.text
UTTypeDescription
MYAPPNAME共享分配
UTTypeIdentifier
com.MYAPPNAME.siassignment
UTTYPESIZE320I配置文件
72x72
UTTYPESIZE64I配置文件
57x57
Uttypetag规范
com.MYAPPNAME.siassignment
SIAASSIGNMENT
public.mime-type
应用程序/xml
我尝试了许多不同的方法来实现这一点,但我似乎无法让iOS7认识到这是我的文件类型。我知道你不应该为你的UTI使用“public.xxx”名称空间,因为这些名称空间是苹果预先指定的。 任何帮助都将不胜感激

确保让iOS知道将你的应用程序显示为打开它们的选项


另外,请确保您实现通过AirDrop或文档交互控制器接收文件。

您是否尝试过将其类型设置为非公共的。*?您的意思是不要使用public.text,而是使用其他内容?是的,只是作为一个实验,看看这是否与问题有关。是的,我刚刚尝试过,运气不好:(以下是XCode5中UI显示的一些图像:这就是我的窍门,但我还必须将UTTypeTagSpecification节点从“com.MYAPPNAME.siAssignment”更改为“public.filename extension”,正如您在提供的链接中所说的那样。