我在這一塊上撞牆,但似乎無法讓我的自定義UTI工作。iOS7自定義UTI
我正在努力讓AirDrop在我的應用程序中實現,所以我可以在設備之間共享文件。我能夠成功地將文件傳輸到其他設備,但安裝了我的應用程序的其他設備不會打開我的應用程序中的文件。
這裏是我的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>
我已經嘗試了許多不同的事情,使這項工作,我似乎無法得到iOS7認識到,這是我的文件類型。我知道你不應該爲你的UTI使用'public.xxx'命名空間,因爲這些命名空間是由Apple預先分配的。 任何幫助將不勝感激!
您是否嘗試過將其設置爲不公開的類型?*? – RyanR
你的意思是不要使用public.text,但是別的嗎? –
是的,就像試驗一樣,看看是否與問題有關。 – RyanR