使用我的swift2 iOS应用程序打开电子邮件文本文件
我读过这篇文章:它让我可以将我的应用程序视为打开应用程序的选项之一,而且当选择我的应用程序时,它会打开我的应用程序,这一点很好。有两个问题: 首先,当“打开”例如谷歌驱动器说“复制到驱动器”,而我说“复制到(空)”当我想说“复制到HotSpotRIS”。我该怎么做?至少会显示应用程序图标。如果有帮助的话,我整个项目的整体包标识符是www.epicode.com.hospotris。这里有三张图片向您展示了我特别谈论的内容,第一张图片向您展示了通过电子邮件发送的txt文件,第二张图片是用户按住txt文件,第三张图片是“打开方式”菜单,我的应用程序显示为“复制到(空)”: 其次,我知道如何读写文本文件以及如何浏览iOS文件系统,但如何将代码连接到.plist文件以读取通过电子邮件发送的txt文件?我猜需要一些标识符,然后我可以使用它来调用以获取txt数据。这是我迄今为止的info.plist文件,文件的最后一位是我从中获得的代码:使用我的swift2 iOS应用程序打开电子邮件文本文件,ios,swift2,plist,identifier,open-with,Ios,Swift2,Plist,Identifier,Open With,我读过这篇文章:它让我可以将我的应用程序视为打开应用程序的选项之一,而且当选择我的应用程序时,它会打开我的应用程序,这一点很好。有两个问题: 首先,当“打开”例如谷歌驱动器说“复制到驱动器”,而我说“复制到(空)”当我想说“复制到HotSpotRIS”。我该怎么做?至少会显示应用程序图标。如果有帮助的话,我整个项目的整体包标识符是www.epicode.com.hospotris。这里有三张图片向您展示了我特别谈论的内容,第一张图片向您展示了通过电子邮件发送的txt文件,第二张图片是用户按住tx
CfBundledDevelopmentRegion
EN
Cbundlexecutable
$(可执行文件名称)
CbundleIdentifier
$(产品\捆绑包\标识符)
CbundleInfo字典版本
6
CFBundleName
$(产品名称)
CbundlePackageType
应用
CbundleShortVersionString
1
CFBundleSignature
????
循环流化床锅炉
1.
LSREQUIRESPHONEOS
UILaunchStoryboardName
发射屏
UIMainstryBoardFile
主要
UIRequiredDeviceCapabilities
armv7
UI支持接口方向
UIInterfaceOrientationPortrait
UIInterface方向和左视图
UIInterfaceOrientationAndscapeRight
cfbundlegetingfostring
NSLocationWhenUse用途说明
N使用时的位置
LSApplicationCategoryType
CbundleDisplayName
UI支持界面方向~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientation上下方向图
UIInterface方向和左视图
UIInterfaceOrientationAndscapeRight
CbundleDocumentTypes
CbundleTypeName
文本文件
CbundleTypeRole
观众
CbundleTypeExtensions
文本
文本
伊斯汉德兰克
候补
lsItemContentType
www.epicode.com.hospotris.txt
UTExportedTypeDeclarations
Uttypecommisto
public.text
UTTypeDescription
纯文本文档
UTTypeIdentifier
www.epicode.com.hospotris.txt
Uttypetag规范
public.filename-extension
文本
public.mime-type
文本/纯文本
提前谢谢你
<?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>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</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>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleGetInfoString</key>
<string></string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>NSLocationWhenInUseUsage</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleDisplayName</key>
<string></string>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Text File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>txt</string>
<string>TXT</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>www.epicode.com.HotSpotRIS.txt</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.text</string>
</array>
<key>UTTypeDescription</key>
<string>Plain Text Document</string>
<key>UTTypeIdentifier</key>
<string>www.epicode.com.HotSpotRIS.txt</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>txt</string>
<key>public.mime-type</key>
<string>text/plain</string>
</dict>
</dict>
</array>
</dict>
</plist>