Questions tagged [share-extension]
198 questions
22
votes
3 answers
Retrieve google user from ios extension
I am trying to create a share extension for my application which requires to login to Google from the extension. I've setup the sharing group keychain and am able to write from the main application and read the extension target. But I can't login to…

sahara108
- 2,829
- 1
- 22
- 41
22
votes
9 answers
How to launch a parent iOS App from its App Extension
Does any one know how to launch the parent app from the app extension's view controller?
I just want to launch the main app from its app extension.

loganathan
- 2,056
- 2
- 23
- 34
20
votes
2 answers
iOS Share Extension: get URL of page when sharing via context menu in Safari
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…

Stas Bichenko
- 13,013
- 8
- 45
- 83
15
votes
1 answer
Is there a way to get the app group identifier from host app and share extension on iOS?
I have set up App Groups for both my host app and the share extension. The identifier looks like "group.com.abc.xyzApp". Is there a way to get this string out programmatically?
Also, how do I detect if app groups are set programmatically? Is trying…

Shwethascar
- 1,142
- 9
- 18
14
votes
1 answer
How to locally pass information from Safari Share Extension back to Web Page?
Imagine Web Page on iOS/Android is able to share file (using Web Share API) with custom request content with Safari Share Extension.
I’m looking for a reliable way to get response (let's say an arbitrary JSON) back from Safari Share Extension to a…

k06a
- 17,755
- 10
- 70
- 110
14
votes
3 answers
iOS Share Extension with custom View Controller
I'm creating a Share Extension to allow to share Youtube videos into my app and am having a hard time to present my custom UI smoothly. Instead of the default view controller which just contains the raw Youtube URL, I want to do something visually…

leandrodemarco
- 1,552
- 1
- 15
- 22
11
votes
10 answers
'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead
I am using following pods in a Share Extension. The complier is keep showing error:
sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead. in every library on…

Pavan Jadhav
- 121
- 1
- 1
- 4
11
votes
2 answers
iOS Share Extension issue with ItemProvider can't read from Photo library
I used the Solution form iOS Share Extension issue when sharing images from Photo library to get Images from the Photo App. This works great in the Simulator, but on the Device I get an error that I can't Access the NSURL provided by the…

Indiana J.
- 119
- 6
10
votes
2 answers
Background upload with share extension
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…

Besi
- 22,579
- 24
- 131
- 223
10
votes
1 answer
Detect safe area insets on Share Extension
I'm adapting an app to support iPhone X. I have a share extension with a custom view controller. I need to know the safe area insets of my device, but the safeAreaInsets method from UIWindow provided by calling UIApplication.shared.keyWindow isn't…

Nicola Giancecchi
- 3,045
- 2
- 25
- 41
9
votes
3 answers
NSItemProvider loadItem method returns _NSItemProviderSandboxedResource instead of URL
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…

mmklug
- 2,252
- 2
- 16
- 31
8
votes
1 answer
Share extension with NSExtensionJavaScriptPreprocessingFile no image
I'm building an iOS Share extension. I need to grab some data from web pages so I'm using a JavaScript file to grab that data and send it back to the app to be used in the extension.
I noticed the following. When I set the…

Andres
- 11,439
- 12
- 48
- 87
8
votes
2 answers
How to get the status bar height in iOS Extension
I can get the status bar from UIApplication in normal app by
[UIApplication sharedApplication].statusBarFrame
But we cannot access UIApplication from Extension.Is there a way to find get the statusbar in share?

guhan0
- 666
- 6
- 19
8
votes
2 answers
Get PHAsset from iOS Share Extension
I am developing a share extension for photos for my iOS app. Inside the extension, I am able to successfully retrieve the UIImage object from the NSItemProvider.
However, I would like to be able to share the image with my container app, without…

haplo1384
- 1,206
- 1
- 12
- 29
7
votes
1 answer
Share Extension Modal Presentation Style iOS 13 is not working
I implemented the share extension and I want animate my View Controller with a crossDissolve, so i set the modalPresentationStyle = .overFullScreen and modalTransitionStyle = crossDissolve but it seems not working. The VC still appear from the…

Fab
- 816
- 8
- 17