【问题标题】:Adding my iphone app as a content menu in the device [duplicate]将我的 iphone 应用程序添加为设备中的内容菜单 [重复]
【发布时间】:2013-07-30 04:51:01
【问题描述】:

我需要安装我的 iPhone 应用程序作为快捷方式。
如果用户长按电子邮件附件中的图像,此选项应与 “打印”“保存到相机胶卷”“Facebook”一起出现“推特”
谁能帮我这个?任何帮助将不胜感激。

【问题讨论】:

标签: iphone ios objective-c


【解决方案1】:

如果您希望您的应用打开.png、.jpeg或.pg类型的文件,您必须在您的文件的Info.plist中列出Document type Key,如下所示:

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>files</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>.png</string>
                <string>.jpegf</string>
                <string>.jpg</string>
            </array>
        </dict>
    </array>

参考:
http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html

【讨论】:

  • 我应该在 info.plist 的哪里添加这个。在信息属性列表里面?
  • 是的..打开你的.plist作为源代码并添加它..告诉我它是否有效..
  • 一切都很完美。我添加了相同的代码。还是行不通。但是当我长按图像时找不到我的应用程序图标。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-18
  • 2013-01-09
  • 2010-12-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多