2012-09-06 58 views
0

在檢查了幾個問題之後,下面列出了很多在線教程,我仍然無法讓我的應用程序註冊我的MIME類型。我覺得這裏一定有一些我還沒有意識到的魔法。除了篡改我的plist文件外,是否還有其他措施?還是我醫治這個錯誤?註冊我的應用程序的MIME類型/ etc

我感覺的唯一可能是一個額外的問題是,我改變了我的項目名稱,也許有一些東西沒有與編譯設置和/或設置配置文件對齊?它的檔案,我可以安裝臨時分發,我只是不能在電子郵件中的文件註冊應用程序。

該文件是我使用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>[email protected]</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

嘗試將此代碼添加到您應用程序的delegate.m文件中。根據

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ 

    NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey]; 
    if (url != nil && [url isFileURL]) {} 
} 

這對我有音頻附件工作,但我有我的圖像文件的問題。 jpg,png,tif等

相關問題