New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-share-menu

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-share-menu - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

2

package.json
{
"name": "react-native-share-menu",
"description": "Adds the app to share menu, so it can be launched from share menu and receive data from other apps",
"version": "4.1.0",
"version": "4.1.1",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -111,2 +111,51 @@ # react-native-share-menu

Make these changes to your Podfile:
```diff
target '<PROJECT_NAME>' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target '<PROJECT_NAME>Tests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
+ end
+ end
end
end
+target '<SHARE_EXTENSION_NAME>' do
+ config = use_native_modules!
+
+ use_react_native!(:path => config["reactNativePath"])
+end
```
Run `pod install` in your `ios/` directory.
<details>
<summary>If you're using React Native < 0.62</summary>
<br>
Create a bridging header by right clicking on your project folder:
- Selecting Add Files to "PROJECT_NAME"
- Choose Swift
- Make sure the selected target is your main app target
- Create file and say yes to creating a Bridging Header file
- Delete everything in the Swift file, but keep the file around
</details>
Create an App Group to be able to share data between your extension and your app. To do so, go to your app target's settings, go to `Signing & Capabilities`, press `+ Capability` and select `App Groups`

@@ -189,39 +238,2 @@

Make these changes to your Podfile:
```diff
target '<PROJECT_NAME>' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target '<PROJECT_NAME>Tests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
+ end
+ end
end
end
target '<SHARE_EXTENSION_NAME>' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
end
```
Run `pod install` in your `ios/` directory.
Right click on your Share Extension folder, and choose `Add Files to "ProjectName"`

@@ -279,3 +291,6 @@

```javascript
AppRegistry.registerComponent('ShareMenuModuleComponent', () => MyShareComponent);
AppRegistry.registerComponent(
"ShareMenuModuleComponent",
() => MyShareComponent
);
```

@@ -359,7 +374,7 @@

const Share = () => {
const [sharedData, setSharedData] = useState('');
const [sharedMimeType, setSharedMimeType] = useState('');
const [sharedData, setSharedData] = useState("");
const [sharedMimeType, setSharedMimeType] = useState("");
useEffect(() => {
ShareMenuReactView.data().then(({mimeType, data}) => {
ShareMenuReactView.data().then(({ mimeType, data }) => {
setSharedData(data);

@@ -400,7 +415,9 @@ setSharedMimeType(mimeType);

onPress={() => {
ShareMenuReactView.continueInApp({hello: "from the other side"});
ShareMenuReactView.continueInApp({ hello: "from the other side" });
}}
/>
{sharedMimeType === "text/plain" && <Text>{sharedData}</Text>}
{sharedMimeType.startsWith("image/") && <Image source={{uri: sharedData}} />}
{sharedMimeType.startsWith("image/") && (
<Image source={{ uri: sharedData }} />
)}
</View>

@@ -407,0 +424,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc