uiactivityviewcontroller

Sending an on-the-fly created QR Code UIImage by AirDrop fails

≯℡__Kan透↙ 提交于 2020-01-01 06:10:31
问题 I am creating a QR Code on the fly and storing it as UIImage. Now I want to be able to send it using the UIActivityViewController but somehow it fails: func generateQRCode(from string: String) -> UIImage? { let data = string.data(using: String.Encoding.ascii) if let filter = CIFilter(name: "CIQRCodeGenerator") { filter.setValue(data, forKey: "inputMessage") let transform = CGAffineTransform(scaleX: 3, y: 3) if let output = filter.outputImage?.applying(transform) { return UIImage(ciImage:

Sending an on-the-fly created QR Code UIImage by AirDrop fails

拥有回忆 提交于 2020-01-01 06:09:13
问题 I am creating a QR Code on the fly and storing it as UIImage. Now I want to be able to send it using the UIActivityViewController but somehow it fails: func generateQRCode(from string: String) -> UIImage? { let data = string.data(using: String.Encoding.ascii) if let filter = CIFilter(name: "CIQRCodeGenerator") { filter.setValue(data, forKey: "inputMessage") let transform = CGAffineTransform(scaleX: 3, y: 3) if let output = filter.outputImage?.applying(transform) { return UIImage(ciImage:

UIActivityViewController vs UIDocumentInteractionController in ios

ぃ、小莉子 提交于 2020-01-01 02:25:07
问题 I just read some articles on UIActivityViewController and UIDocumentInteractionController in iOS, but I am very confused about how to use them because both seem the same. So, when do I use UIActivityViewController or UIDocumentInteractionController ? Is there any difference for Open In... & use UIActivityViewController ? I am very confused about how to use them. Please clarify to me their specific use. 回答1: In short, UIDocumentInteractionController deals with files while

Sharing image and text to Facebook Messenger with UIActivityViewController failing

流过昼夜 提交于 2019-12-31 02:13:17
问题 Question What changes to the code below must be made to ensure Messenger plays nicely with UIActivityViewController and shares both the image and text, or at the very least, the image? Background I am using UIActivityViewController to share text and images from my app and send them to email, messages and other sharing apps. UIActivityViewController is great and works in a simple and standard way with most apps… but, I’m having issues with Messenger (Facebook Messenger) which doesn’t want to

iOS 6 - UIActivityViewController items [duplicate]

对着背影说爱祢 提交于 2019-12-29 11:40:54
问题 This question already has answers here : Different data for sharing providers in UIActivityViewController (4 answers) Closed 6 years ago . Hope everyone is aware of iOS 6 contains new style of ActionSheet (UIActivityViewController). The UIActivityViewController can be initiated with the paramentes like string, url, image etc. Below is the code snippet for that (where items is an array with string and url params). UIActivityViewController *activityVC = [[UIActivityViewController alloc]

Facebook is not shown in UIActivityViewController but twitter does

烂漫一生 提交于 2019-12-29 04:37:06
问题 My iOS is 8.1.2 and I am using the UIActivityViewController for social sharing. I click on a button and allow the UIActivityViewController to present - (IBAction)UIActivityTypeButtonClick:(id)sender { NSString* text=@"I am sharing this text"; NSArray* sharedArray=@[text]; UIActivityViewController * activityVC=[[UIActivityViewController alloc]initWithActivityItems:sharedArray applicationActivities:nil]; activityVC.excludedActivityTypes=@[]; [self presentViewController:activityVC animated:YES

iOS APP与APP之间的通信方式

一个人想着一个人 提交于 2019-12-27 13:34:32
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1、URL Scheme 这个最常见了,基本接入分享、支付、地图的,都会用到 2、UIPasteboard 其实就是粘贴板,常见的就是淘口令啥的,也挺常见的 3、Keychain 这个就是一个安全的存储容器,本质其实就是数据库 ,它的位置存储在/private/var/Keychains/keychain-2.db,不过它所保存的所有数据都是经过加密的,可以用来为不同的app保存敏感信息,比如用户名,密码等。iOS系统自己也用keychain来保存VPN凭证和Wi-Fi密码。它是独立于每个App的沙盒之外的,所以即使App被删除之后,Keychain里面的信息依然存在。基于安全和独立于app沙盒的两个特性,Keychain主要用于给app保存登录和身份凭证等敏感信息,这样只要用户登录过,即使用户删除了app重新安装也不需要重新登录。 那Keychain用于App间通信的一个典型场景也和app的登录相关,就是统一账户登录平台。使用同一个账号平台的多个app,只要其中一个app用户进行了登录,其他app就可以实现自动登录不需要用户多次输入账号和密码。一般开放平台都会提供登录SDK,在这个SDK内部就可以把登录相关的信息都写到keychain中,这样如果多个app都集成了这个SDK,那么就可以实现统一账户登录了。

How to name file stored to Files app via UActivityViewController

耗尽温柔 提交于 2019-12-25 19:02:03
问题 I have content stored in String variable in my app and I want to save it as a file to the Files app. Well, it's easy and described for example here Save document to "Files" App in swift but I'm wondering whether is it possible to assign custom name to the file. iOS assigns implicit name Text.txt. Thanks. 回答1: @IBAction func btnExportData(_ sender: Any) { let prompt = UIAlertController(title: "Export data for counter", message: "Provide file name:", preferredStyle: .alert) prompt.addTextField

UIActivityViewController Facebook and Twitter share not working in released iOS version

大憨熊 提交于 2019-12-25 03:34:48
问题 We have recently released iPhone app which share to fb & tw using UIActivityViewController like as zigzag app on app store. My device is working perfect as my device is used for development. But all users who downloaded this app not able to share using this function. NSString *txtToShare = @"Please try this awesome iOS app"; NSArray *objectsToShare = [NSArray arrayWithObjects:txtToShare, nil]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems

restrict airdrop feature for specific app only ios7

本秂侑毒 提交于 2019-12-25 02:26:51
问题 I am creating one application using airdrop feature, I want to pass one message(NSString) from one device to other device. I had completed that part, but I want restrict this feature for my application only. Currently what happen, when I am sending NSString via airdrop (let say Device A) in near by device, the other Device B can receive this string even if my application is not installed in it. My requirement is to share one message from one device to other device only and this thing happen