2

对于我一直在开发的应用程序,我已经为此工作了一段时间。该应用程序能够从其他应用程序(例如邮件)打开不同的文件。我让它在 iPad 上工作,但我也需要它在 iPhone 上工作。但是,我在 iPhone 上测试它时遇到了问题,因为我在应用程序的 info.plist 文件的 UTExportedTypeDeclarations 部分中拥有的导出文件扩展名无法在 iPhone 上的邮件中被触及。

这是我在 UTExportedTypeDeclarations 部分中的内容:

       <key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeIdentifier</key>
        <string>com.myapp.ext</string>
        <key>UTTypeDescription</key>
        <string>Generic</string>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.data</string>
            <string>public.content</string>
        </array>
        <key>UTTypeTagSpecification</key>
        <dict>

            <key>public.filename-extension</key>
            <array>
                <string>ext</string>
    </array>
        </dict>
    </dict>

</array>

我在相应的 CFBundleDocumentTypes 中也有这个:

     <dict>
        <key>CFBundleTypeName</key>
        <string>Generic</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.myapp.ext</string>
        </array>
    </dict>

总之,它不是在 iPhone 上读取 .ext 文件扩展名,而是在 iPad 上。任何帮助将非常感激。

谢谢

4

0 回答 0