share-extension

Background upload with share extension

北慕城南 提交于 2021-02-07 11:57:16
问题 I created an macOS ShareExtension which I want to use to upload pictures. I'm still testing this so any requests will be sent to https://beeceptor.com. The share extension works fine and it shows up in Preview, once I run it: I add some text and hit "Post" But the image is then not uploaded. This is my code that initiates the background upload: let sc_uploadURL = "https://xyz.free.beeceptor.com/api/posts" // https://beeceptor.com/console/xyz override func didSelectPost() { // This is called

UISwipeGestureRecognizer and ShareExtension: Different behaviour on iOS 12.4 and 13.0 and latest (bug or undocumented?)

对着背影说爱祢 提交于 2020-06-26 05:56:23
问题 I am creating a Share extension and faced with a strange behaviour during my tests on iOS 13.0 and later. I use UISwipeGestureRecognizer to interpret user's swiping gestures on the main view on my extension. This simple code provides below as an example of that I want and works perfectly on 12.4 and older: @interface ShareAndSwipeRootController () @end @implementation ShareAndSwipeRootController - (void)loadView { [super loadView]; [self.view setBackgroundColor:[UIColor redColor]]; [self.view

How to read the string in an attached file, not sharing the string directly, using Share Extension from other APP to my APP in Swift?

廉价感情. 提交于 2020-06-17 14:36:09
问题 In the following code I can read text in this way and print the text in the code. But I do not know how to share txt file as an attachment and read it out in the following code. import UIKit import Social import CoreServices class ShareViewController: SLComposeServiceViewController { private var textString: String? override func isContentValid() -> Bool { // Do validation of contentText and/or NSExtensionContext attachments here if textString != nil { if !contentText.isEmpty { return true } }

iOS Share Extension: get URL of page when sharing via context menu in Safari

送分小仙女□ 提交于 2020-05-09 19:09:21
问题 What I want I'm trying to achieve the following user flow: User is browsing a webpage in iOS Safari. User selects some content (text and images) and waits for context menu to appear. User selects the "Share..." item. User selects my App Extension in the sharing menu that comes up from the bottom. Selected content and the webpage URL is shared to a remote server via an HTT call. What I tried I made a Share extension via Xcode. Here's the NSExtension section of my info.plist : <key>NSExtension<

NSItemProvider loadItem method returns _NSItemProviderSandboxedResource instead of URL

女生的网名这么多〃 提交于 2020-02-03 07:33:53
问题 In one of the apps I develop, I use a share extension to import Wallet passes (PKPass). On iOS 13 (including the latest beta 8), when calling the share extension from within the iOS Mail app, the extension is not receiving the data in the expected format (URL). This is the relevant snippet from the share extension’s ShareViewController: if let inputItems = self.extensionContext?.inputItems, let inputItem = inputItems.first as? NSExtensionItem, let attachments = inputItem.attachments, let

NSItemProvider loadItem method returns _NSItemProviderSandboxedResource instead of URL

安稳与你 提交于 2020-02-03 07:33:46
问题 In one of the apps I develop, I use a share extension to import Wallet passes (PKPass). On iOS 13 (including the latest beta 8), when calling the share extension from within the iOS Mail app, the extension is not receiving the data in the expected format (URL). This is the relevant snippet from the share extension’s ShareViewController: if let inputItems = self.extensionContext?.inputItems, let inputItem = inputItems.first as? NSExtensionItem, let attachments = inputItem.attachments, let

swift share extension not sharing amzon item

耗尽温柔 提交于 2020-01-05 08:37:34
问题 in my app i integrated share extension. and i am able to get url when i am sharing safari page. but when i go on amazon site or app. and when i am tapping on share option of any product my share extension is not showing. Here is my info.plist <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <string>TRUEPREDICATE</string> <key>NSExtensionJavaScriptPreprocessingFile</key> <string>GetURL</string> </dict> <key>NSExtensionMainStoryboard<

Share extension react native - expo

怎甘沉沦 提交于 2019-12-30 10:13:00
问题 I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app. I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode) I think react-native or expo does not have any share API In this picture, you can see how he got the option to import data into the app. I understand that without share extension API, I think react-native and Expo both are

Share extension react native - expo

落爺英雄遲暮 提交于 2019-12-30 10:12:06
问题 I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app. I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode) I think react-native or expo does not have any share API In this picture, you can see how he got the option to import data into the app. I understand that without share extension API, I think react-native and Expo both are

Share extension react native - expo

六月ゝ 毕业季﹏ 提交于 2019-12-30 10:12:05
问题 I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app. I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode) I think react-native or expo does not have any share API In this picture, you can see how he got the option to import data into the app. I understand that without share extension API, I think react-native and Expo both are