在检查了几个问题之后,在许多在线教程之后,我仍然无法让我的应用程序注册我的mime类型。我觉得这里肯定有一些魔法,我还没有意识到。除了修剪我的plist文件之外还有其他步骤吗?或者我的医生错了吗?
我觉得唯一的问题可能是一个额外的问题是我更改了我的项目名称,可能还有一些与构建设置和/或配置文件不相符的内容?它存档,我可以安装进行临时分发,我只是无法通过电子邮件获取文件来注册该应用程序。
该文件是我使用NSJSONSerialization准备的JSON数据。
这是我的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>English</string>
<key>CFBundleDisplayName</key>
<string>ClickDesigner</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Clicker Data Document</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.digitaldownbeat.clicker.clk</string>
</array>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string></string>
<string>icon.png</string>
<string>icon@2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.digitaldownbeat.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Clicker</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>db-k6rrg6wgwv4uij1</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>com.digitaldownbeat.clickdesigner</string>
<key>CFBundleURLSchemes</key>
<array>
<string>clickdesigner</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSRequiresiPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackTranslucent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.text</string>
</array>
<key>UTTypeDescription</key>
<string>ClickDesigner Data Document</string>
<key>UTTypeIdentifier</key>
<string>com.digitaldownbeat.clickdesigner.clk</string>
<key>public.filename-extension</key>
<string>clk</string>
<key>public.mime-type</key>
<string>application/clickdesigner</string>
</dict>
</array>
</dict>
</plist>
感谢您提供的任何帮助。
答案 0 :(得分:0)
尝试将此代码添加到您应用的delegate.m文件中。
下- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];
if (url != nil && [url isFileURL]) {}
}
这对我有音频附件,但我的图像文件有问题。 jpg,png,tif等。