简体   繁体   English

如何从默认的iOS相机应用程序向我的应用程序发送照片?

[英]How to send a photo to my app from default iOS Camera app?

I know my app can read the photos saved in iOS photo-library; 我知道我的应用程序可以读取iOS照片库中保存的照片; also my app can save a new photo in the default iOS photo-library. 我的应用程序也可以在默认的iOS照片库中保存新照片。 But what I am trying to achieve is something like this: the default Photos app should be able to send a photo to my iOS app, just like you can share a photo to Facebook or send to iOS Mail app. 但我想要实现的是这样的:默认的照片应用程序应该能够将照片发送到我的iOS应用程序,就像您可以将照片分享到Facebook或发送到iOS Mail应用程序一样。

在此输入图像描述

I want my application to be listed in this screen. 我希望我的应用程序列在此屏幕中。 Note: this is a screenshot of iOS6 Photo application. 注意:这是iOS6 Photo应用程序的屏幕截图。

POSSIBLE!!! 可能!!!

This thing is very interesting on iOS. 这个东西在iOS上非常有趣。

You have to tell iOS what kind of files your app can open (see pic below) 你必须告诉iOS你的应用程序可以打开哪种文件(见下图)

在此输入图像描述

You have to implement -application:handleOpenURL: in AppDelegate 您必须在AppDelegate实现-application:handleOpenURL: .

-(BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url {
      //url is a local url of photo you've chosen, iOS copied it into document folder of your app
      //do what you want
}

================================================ ================================================

If you want to see how some app (Dropbox, GoogleDrive ...) can open some kind of files, you can see their info.plist files 如果你想知道一些应用程序(Dropbox,GoogleDrive ......)如何打开某种文件,你可以看到他们的info.plist文件

Good luck 祝好运

It's not possible to add your app in the iOS "Photos" app. 无法在iOS“照片”应用中添加您的应用。 But it's possible if you want other (3rd party) apps to be able to open files in yours. 但是,如果您希望其他(第三方)应用程序能够打开您的文件,则可能。 Please refer below links. 请参考以下链接。

http://support.apple.com/kb/PH3268 , http://support.apple.com/kb/PH3268 ,

http://www.iphonehacks.com/2013/09/ios-7-photos-app.html http://www.iphonehacks.com/2013/09/ios-7-photos-app.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将我的应用程序中的视频保存到 iOS 中的用户照片库中? - How to save a video from my app in to the users photo library in iOS? 我的应用程序如何发送带有照片的彩信? - How can my app send MMS with a photo? 通过我的应用程序分享来自Camera Roll的照片 - share photo from Camera Roll via my app 从相机拍照后如何将数据写入我的App文档? - How to write data to my App document after take a photo from Camera? 如何从ios应用程序将图像或文本发送到whatsapp? - How to send an image or text to whatsapp from my ios app? 如何在iOS上从应用程序的文档文件夹中的一个相册中复制所有照片? - How to copy ALL photos from one photo album my app's document folder on iOS? iPhone:如何通过iPhone照片应用程序等“编辑”功能从照片库或相机中获取图像 - iPhone:How to fetch image from photo library or camera with “edit” funcitionality like iPhone photo app 默认的相机iPhone应用程序如何设置如此快速地保存照片? - How does the default Camera iPhone app manages to save a photo so fast? 相册共享未显示我的应用程序ios - Photo Gallery Share not showing my app ios 如何从IOS应用访问iPhone / ipad本机摄像头应用? - How to access iPhone/ipad native camera app from IOS app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM