iOS example app does not seem to work
When I run the app from the example folder on https://github.com/KasemJaffer/receive_sharing_intent/tree/master/example on iOS it does not seem to work.
When sharing an image:
- You see the app in the list
- Then for a split second you see this window pop up
- Then nothing happens
I tested this on an iPhone 15 Pro Max emulator running iOS 17.4
me to π’ I tested this on an iPhone 14 Pro actual machine
me to π’ I checked again and again to see what I might have done wrong. Has anyone found a solution?
My biggest concern at the moment is reliability of this feature / package. It has been 2 weeks without reply to this issue. I am holding back to use this package for now. If I use this in production and it breaks, I do not want to risk to have a broken feature for weeks.
I managed to get it to work. While the package publisher could have provided clearer instructions, it's important to understand some key points when adding packages to your application. After trying many forked versions of this package and examining the package codes, I've gained full experience with it. The issue is actually quite simple. Here are the key steps:
Pay attention to the Info.plist files. Insert the required codes correctly. Provide the host and extension IDs in the correct format. After filling in the ShareViewController content, be sure to run pod install in the iOS directory before running the application. Follow the cycle described by the publisher carefully. If you are not using custom IDs, fill them in manually in the Info.plist table. The original package works fine and is more compact than other packages. It also has a supportive community.
I hope this helps others who are facing similar issues.
for me what made it work is adding the custom IDs manually for both Runner and Sharing Extension under Build Settings, what @olerhan suggested above.
Same here. I cloned the example and it doesn't work for iOS either. The app doesn't receive the shared files. Confirmed on iOS 17.5 simulator.
@tamara-jovanoska I solved it the same way (tested on physical iOS 17.5.1). @olerhan and @tamara-jovanoska, your comments could helped clarify instructions from point 6 from the publisher.
I think the issue is not caused by the configuration, but by this:
- #294
For me everything still works fine. Everyone just needs to be more careful about using the package. This issue (296 or 294) is not a real issueβ¦
I managed to get it to work. While the package publisher could have provided clearer instructions, it's important to understand some key points when adding packages to your application. After trying many forked versions of this package and examining the package codes, I've gained full experience with it. The issue is actually quite simple. Here are the key steps:
Pay attention to the Info.plist files. Insert the required codes correctly. Provide the host and extension IDs in the correct format. After filling in the ShareViewController content, be sure to run pod install in the iOS directory before running the application. Follow the cycle described by the publisher carefully. If you are not using custom IDs, fill them in manually in the Info.plist table. The original package works fine and is more compact than other packages. It also has a supportive community.
I hope this helps others who are facing similar issues.
@olerhan Youβre absolutely right β Iβve been facing image sharing intent issues for several days as well.
In my case, Iβm using multiple flavors (development & production) in my Flutter app, and most of the problems were due to native misconfigurations. I spent almost 2β3 weeks debugging, but I finally figured out the full setup:
What caused the issue
- Share Extension and App Group were not configured correctly per flavor.
CUSTOM_GROUP_IDwas not properly assigned for each flavor in Build Settings.- In Xcode β Runner β Info β Configurations, I had selected the wrong flavor for the execution target.
Final Fix
- Created separate Share Extension bundle identifier + App Group IDs for each flavor.
- Ensured
Info.plistvalues were filled explicitly for each build. - Set
CUSTOM_GROUP_IDcorrectly in Build Phases for both Development and Production. - Re-ran
pod installevery time after making changes.
β Now image sharing is working properly on both Android and iOS.
One Remaining Question
Right now, when I share an image (from Gallery or using a quick screenshot on iOS), it shows an intermediate popup before redirecting to my app.
However, I noticed that some apps (like Discord) redirect directly into their app without showing that popup UI.
Is there a way to achieve instant redirect bypassing the popup UI entirely in iOS Share Extensions?
Would appreciate any guidance if you have insights on this approach.
this is my ShareViewController.swift code
import receive_sharing_intent
class ShareViewController: RSIShareViewController {
// Automatically redirect to main app without showing any UI
override func shouldAutoRedirect() -> Bool {
return true // Enable automatic redirect
}
}
this is my current working app video
https://github.com/user-attachments/assets/c487f3e5-2106-4519-b398-3efb6da8f625
https://github.com/user-attachments/assets/1ea247d3-e660-41fb-820f-81879f118a81
Additional Observation
When using the iOS Share Extension to share an image from a freshly taken screenshot, the app does not display the selected image. Instead, only the keyboard opens with no preview. The shared media is not passed correctly into the app on real devices.
This happens because receive_sharing_intent uses a fallback mechanism β it creates a temporary image file (TempImage.png) inside the App Group container when iOS provides only an in-memory UIImage (not a file URL). However, on real devices, the shared file is not accessible to the main app due to App Group misconfiguration or sandboxing, even though it works fine on the simulator.
π Related Discussions (React Native)
React Native discussion β similar issue solved natively π https://github.com/achorein/expo-share-intent-demo/issues/28 π https://github.com/ajith-ab/react-native-receive-sharing-intent/issues/56
If anyone has managed to achieve instant redirect without showing the intermediate share popup in Flutter (not React Native), please share your insights here