`
58 |
59 | #### Gets the shared data this Share Extension was opened with.
60 |
61 | #### Where `ShareData`
62 |
63 | | Result | Type | Description |
64 | | -------- | ------ | ---------------------------------------------------------- |
65 | | mimeType | String | The mime type of the shared data |
66 | | data | String | Either the shared text, or the location of the shared file |
67 |
--------------------------------------------------------------------------------
/example/Share.js:
--------------------------------------------------------------------------------
1 | import React, {useEffect, useState} from 'react';
2 | import {View, Text, Pressable, Image, StyleSheet} from 'react-native';
3 | import {ShareMenuReactView} from 'react-native-share-menu';
4 |
5 | const Button = ({onPress, title, style}) => (
6 |
7 | {title}
8 |
9 | )
10 |
11 | const Share = () => {
12 | const [sharedData, setSharedData] = useState('');
13 | const [sharedMimeType, setSharedMimeType] = useState('');
14 | const [sending, setSending] = useState(false);
15 |
16 | useEffect(() => {
17 | ShareMenuReactView.data().then(({mimeType, data}) => {
18 | setSharedData(data);
19 | setSharedMimeType(mimeType);
20 | });
21 | }, []);
22 |
23 | return (
24 |
25 |
26 |
46 | {sharedMimeType === 'text/plain' && {sharedData}}
47 | {sharedMimeType.startsWith('image/') && (
48 |
53 | )}
54 |
55 | {
58 | ShareMenuReactView.dismissExtension('Dismissed with error');
59 | }}
60 | style={styles.destructive}
61 | />
62 | {
65 | ShareMenuReactView.continueInApp();
66 | }}
67 | />
68 | {
71 | ShareMenuReactView.continueInApp({hello: 'from the other side'});
72 | }}
73 | />
74 |
75 |
76 | );
77 | };
78 |
79 | const styles = StyleSheet.create({
80 | container: {
81 | flex: 1,
82 | backgroundColor: 'white',
83 | },
84 | header: {
85 | flexDirection: 'row',
86 | justifyContent: 'space-between',
87 | },
88 | destructive: {
89 | color: 'red',
90 | },
91 | send: {
92 | color: 'blue',
93 | },
94 | sending: {
95 | color: 'grey',
96 | },
97 | image: {
98 | width: '100%',
99 | height: 200,
100 | },
101 | buttonGroup: {
102 | alignItems: 'center',
103 | },
104 | });
105 |
106 | export default Share;
107 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 | @rem Execute Gradle
88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
89 |
90 | :end
91 | @rem End local scope for the variables with windows NT shell
92 | if "%ERRORLEVEL%"=="0" goto mainEnd
93 |
94 | :fail
95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
96 | rem the _cmd.exe /c_ return code!
97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
98 | exit /b 1
99 |
100 | :mainEnd
101 | if "%OS%"=="Windows_NT" endlocal
102 |
103 | :omega
104 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/java/com/github/meedaan/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.github.meedaan;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceManager;
23 | import com.facebook.react.bridge.ReactContext;
24 | import com.facebook.react.modules.network.NetworkingModule;
25 | import okhttp3.OkHttpClient;
26 |
27 | public class ReactNativeFlipper {
28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29 | if (FlipperUtils.shouldEnableFlipper(context)) {
30 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
31 |
32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
33 | client.addPlugin(new ReactFlipperPlugin());
34 | client.addPlugin(new DatabasesFlipperPlugin(context));
35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
36 | client.addPlugin(CrashReporterPlugin.getInstance());
37 |
38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
39 | NetworkingModule.setCustomClientBuilder(
40 | new NetworkingModule.CustomClientBuilder() {
41 | @Override
42 | public void apply(OkHttpClient.Builder builder) {
43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
44 | }
45 | });
46 | client.addPlugin(networkFlipperPlugin);
47 | client.start();
48 |
49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
50 | // Hence we run if after all native modules have been initialized
51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
52 | if (reactContext == null) {
53 | reactInstanceManager.addReactInstanceEventListener(
54 | new ReactInstanceManager.ReactInstanceEventListener() {
55 | @Override
56 | public void onReactContextInitialized(ReactContext reactContext) {
57 | reactInstanceManager.removeReactInstanceEventListener(this);
58 | reactContext.runOnNativeModulesQueueThread(
59 | new Runnable() {
60 | @Override
61 | public void run() {
62 | client.addPlugin(new FrescoFlipperPlugin());
63 | }
64 | });
65 | }
66 | });
67 | } else {
68 | client.addPlugin(new FrescoFlipperPlugin());
69 | }
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/example/ios/Test.xcodeproj/xcshareddata/xcschemes/Test.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/example/ios/Test.xcodeproj/xcshareddata/xcschemes/Test-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/SHARE_EXTENSION_VIEW.md:
--------------------------------------------------------------------------------
1 | # Custom iOS Share View
2 |
3 | ### If you want a custom sharing view, do these steps
4 |
5 | ## Create Bridging Header
6 |
7 | Right click on your Share Extension folder, and choose `New File...`
8 |
9 | Select Objective-C, make sure the target is your Share Extension
10 |
11 | Create the file and say yes when prompted to create a Bridging Header
12 |
13 | Delete the created `.m` file
14 |
15 | Add the following to the new `Bridging-Header.h` file:
16 |
17 | ```Objective-c
18 | #import
19 | #import
20 | #import
21 | #import
22 | ```
23 |
24 | ## Add React View Controller
25 |
26 | Right click on your Share Extension folder, and choose `Add Files to "ProjectName"`
27 |
28 | On the pop-up, select `node_modules/react-native-share-menu/ios/ReactShareViewController.swift`. Make sure `Copy items if needed` is NOT selected and that the selected target is your newly created Share Extension
29 |
30 | 
31 |
32 | Now go to your `MainInterface.storyboard` and:
33 |
34 | 1. Select the first item in the storyboard inspector
35 |
36 | 2. Select `Show the Identity Inspector` on the right
37 |
38 | 3. Replace the value in `Class` with `ReactShareViewController`
39 |
40 | 
41 |
42 | ## Edit Info.plist
43 |
44 | Open your Share Extension's `Info.plist` and add the following:
45 |
46 | ```OpenStep Property List
47 | ReactShareViewBackgroundColor
48 |
49 | Red
50 | 1
51 | Green
52 | 1
53 | Blue
54 | 1
55 | Alpha
56 | 1
57 | Transparent
58 |
59 |
60 | NSAppTransportSecurity
61 |
62 | NSAllowsArbitraryLoads
63 |
64 | NSExceptionDomains
65 |
66 | localhost
67 |
68 | NSExceptionAllowsInsecureHTTPLoads
69 |
70 |
71 |
72 |
73 | ```
74 |
75 | Feel free to change the values in ReactShareViewBackgroundColor to whatever you want.
76 |
77 | ## Bundle JS code and assets in your Share Extension
78 |
79 | If you're planning to run builds outside the simulator, or to make Release builds, add a `Run Script Phase` to your Share Extension target:
80 |
81 | - Go to your Share Extension target's `Build Phases` settings
82 |
83 | - Add a new `Build Phase` and select `New Run Script Phase`
84 |
85 | - Rename it to `Bundle React Native code and images`
86 |
87 | - Leave the shell as `/bin/sh` and paste the following as the script:
88 |
89 | ```shell
90 | export NODE_BINARY=node
91 | export ENTRY_FILE=index.share.js
92 | ../node_modules/react-native/scripts/react-native-xcode.sh
93 | ```
94 |
95 | - Drag it behind `[CP] Copy Pods Resources`
96 |
97 | You should end up with something like this:
98 |
99 | 
100 |
101 | ## Register Component
102 |
103 | Finally, create an `index.share.js` file, register the component you want to render in your Share Extension view:
104 |
105 | ```javascript
106 | import { AppRegistry } from "react-native";
107 |
108 | AppRegistry.registerComponent(
109 | "ShareMenuModuleComponent",
110 | () => MyShareComponent
111 | );
112 | ```
113 |
114 | ## Example
115 |
116 | If you're rendering an empty component, you should be seeing something similar to this when you share to your app:
117 |
118 | 
119 |
--------------------------------------------------------------------------------
/ios/Modules/ShareMenu.swift:
--------------------------------------------------------------------------------
1 | @objc(ShareMenu)
2 | class ShareMenu: RCTEventEmitter {
3 |
4 | private(set) static var _shared: ShareMenu?
5 | @objc public static var shared: ShareMenu
6 | {
7 | get {
8 | return ShareMenu._shared!
9 | }
10 | }
11 |
12 | var sharedData: [[String:String]?]?
13 |
14 | static var initialShare: (UIApplication, URL, [UIApplication.OpenURLOptionsKey : Any])?
15 |
16 | var hasListeners = false
17 |
18 | var _targetUrlScheme: String?
19 | var targetUrlScheme: String
20 | {
21 | get {
22 | return _targetUrlScheme!
23 | }
24 | }
25 |
26 | public override init() {
27 | super.init()
28 | ShareMenu._shared = self
29 |
30 | if let (app, url, options) = ShareMenu.initialShare {
31 | share(application: app, openUrl: url, options: options)
32 | }
33 | }
34 |
35 | override static public func requiresMainQueueSetup() -> Bool {
36 | return false
37 | }
38 |
39 | open override func supportedEvents() -> [String]! {
40 | return [NEW_SHARE_EVENT]
41 | }
42 |
43 | open override func startObserving() {
44 | hasListeners = true
45 | }
46 |
47 | open override func stopObserving() {
48 | hasListeners = false
49 | }
50 |
51 | public static func messageShare(
52 | application app: UIApplication,
53 | openUrl url: URL,
54 | options: [UIApplication.OpenURLOptionsKey : Any]
55 | ) {
56 | guard (ShareMenu._shared != nil) else {
57 | initialShare = (app, url, options)
58 | return
59 | }
60 |
61 | ShareMenu.shared.share(application: app, openUrl: url, options: options)
62 | }
63 |
64 | func share(
65 | application app: UIApplication,
66 | openUrl url: URL,
67 | options: [UIApplication.OpenURLOptionsKey : Any]) {
68 | if _targetUrlScheme == nil {
69 | guard let bundleUrlTypes = Bundle.main.object(forInfoDictionaryKey: "CFBundleURLTypes") as? [NSDictionary] else {
70 | print("Error: \(NO_URL_TYPES_ERROR_MESSAGE)")
71 | return
72 | }
73 | guard let bundleUrlSchemes = bundleUrlTypes.first?.value(forKey: "CFBundleURLSchemes") as? [String] else {
74 | print("Error: \(NO_URL_SCHEMES_ERROR_MESSAGE)")
75 | return
76 | }
77 | guard let expectedUrlScheme = bundleUrlSchemes.first else {
78 | print("Error \(NO_URL_SCHEMES_ERROR_MESSAGE)")
79 | return
80 | }
81 |
82 | _targetUrlScheme = expectedUrlScheme
83 | }
84 |
85 | guard let scheme = url.scheme, scheme == targetUrlScheme else { return }
86 | guard let bundleId = Bundle.main.bundleIdentifier else { return }
87 | guard let userDefaults = UserDefaults(suiteName: "group.\(bundleId)") else {
88 | print("Error: \(NO_APP_GROUP_ERROR)")
89 | return
90 | }
91 |
92 | let extraData = userDefaults.object(forKey: USER_DEFAULTS_EXTRA_DATA_KEY) as? [String:Any]
93 |
94 | if let data = userDefaults.object(forKey: USER_DEFAULTS_KEY) as? [[String:String]] {
95 | sharedData = data
96 | dispatchEvent(with: data, and: extraData)
97 | userDefaults.removeObject(forKey: USER_DEFAULTS_KEY)
98 | }
99 | }
100 |
101 | @objc(getSharedText:)
102 | func getSharedText(callback: RCTResponseSenderBlock) {
103 | var data = [DATA_KEY: sharedData] as [String: Any]
104 |
105 | if let bundleId = Bundle.main.bundleIdentifier, let userDefaults = UserDefaults(suiteName: "group.\(bundleId)") {
106 | data[EXTRA_DATA_KEY] = userDefaults.object(forKey: USER_DEFAULTS_EXTRA_DATA_KEY) as? [String: Any]
107 | } else {
108 | print("Error: \(NO_APP_GROUP_ERROR)")
109 | }
110 |
111 | callback([data as Any])
112 | sharedData = []
113 | }
114 |
115 | func dispatchEvent(with data: [[String:String]], and extraData: [String:Any]?) {
116 | guard hasListeners else { return }
117 |
118 | var finalData = [DATA_KEY: data] as [String: Any]
119 | if (extraData != nil) {
120 | finalData[EXTRA_DATA_KEY] = extraData
121 | }
122 |
123 | sendEvent(withName: NEW_SHARE_EVENT, body: finalData)
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-native-share-menu
2 |
3 | [](https://www.npmjs.com/package/react-native-share-menu)
4 |
5 | Add your app as a target for sharing from other apps and write iOS Share Extensions in React Native.
6 |
7 | ## Installation
8 |
9 | ```bash
10 | npm i --save react-native-share-menu
11 | ```
12 |
13 | ### Automatic Linking (React Native 0.60+)
14 |
15 | At the command line, in the ios directory:
16 |
17 | ```bash
18 | pod install
19 | ```
20 |
21 | ### Manual Linking (React Native 0.36+)
22 |
23 | At the command line, in the project directory:
24 |
25 | ```bash
26 | react-native link
27 | ```
28 |
29 | ## [Android Instructions](ANDROID_INSTRUCTIONS.md)
30 |
31 | ## [iOS Instructions](IOS_INSTRUCTIONS.md)
32 |
33 | ## [Custom iOS Share View (optional)](SHARE_EXTENSION_VIEW.md)
34 |
35 | ## [API Docs](API_DOCS.md)
36 |
37 | ## [Example Project](example/)
38 |
39 | ### Example Usage
40 |
41 | ```javascript
42 | import React, { useState, useEffect, useCallback } from "react";
43 | import { AppRegistry, Text, View, Image, Button } from "react-native";
44 | import ShareMenu, { ShareMenuReactView } from "react-native-share-menu";
45 |
46 | type SharedItem = {
47 | mimeType: string,
48 | data: string,
49 | extraData: any,
50 | };
51 |
52 | const Test = () => {
53 | const [sharedData, setSharedData] = useState(null);
54 | const [sharedMimeType, setSharedMimeType] = useState(null);
55 |
56 | const handleShare = useCallback((item: ?SharedItem) => {
57 | if (!item) {
58 | return;
59 | }
60 |
61 | const { mimeType, data, extraData } = item;
62 |
63 | setSharedData(data);
64 | setSharedMimeType(mimeType);
65 | // You can receive extra data from your custom Share View
66 | console.log(extraData);
67 | }, []);
68 |
69 | useEffect(() => {
70 | ShareMenu.getInitialShare(handleShare);
71 | }, []);
72 |
73 | useEffect(() => {
74 | const listener = ShareMenu.addNewShareListener(handleShare);
75 |
76 | return () => {
77 | listener.remove();
78 | };
79 | }, []);
80 |
81 | if (!sharedMimeType && !sharedData) {
82 | // The user hasn't shared anything yet
83 | return null;
84 | }
85 |
86 | if (sharedMimeType === "text/plain") {
87 | // The user shared text
88 | return Shared text: {sharedData};
89 | }
90 |
91 | if (sharedMimeType.startsWith("image/")) {
92 | // The user shared an image
93 | return (
94 |
95 | Shared image:
96 |
97 |
98 | );
99 | }
100 |
101 | // The user shared a file in general
102 | return (
103 |
104 | Shared mime type: {sharedMimeType}
105 | Shared file location: {sharedData}
106 |
107 | );
108 | };
109 |
110 | const Share = () => {
111 | const [sharedData, setSharedData] = useState("");
112 | const [sharedMimeType, setSharedMimeType] = useState("");
113 |
114 | useEffect(() => {
115 | ShareMenuReactView.data().then(({ mimeType, data }) => {
116 | setSharedData(data);
117 | setSharedMimeType(mimeType);
118 | });
119 | }, []);
120 |
121 | return (
122 |
123 | {
126 | ShareMenuReactView.dismissExtension();
127 | }}
128 | />
129 | {
132 | // Share something before dismissing
133 | ShareMenuReactView.dismissExtension();
134 | }}
135 | />
136 | {
139 | ShareMenuReactView.dismissExtension("Something went wrong!");
140 | }}
141 | />
142 | {
145 | ShareMenuReactView.continueInApp();
146 | }}
147 | />
148 | {
151 | ShareMenuReactView.continueInApp({ hello: "from the other side" });
152 | }}
153 | />
154 | {sharedMimeType === "text/plain" && {sharedData}}
155 | {sharedMimeType.startsWith("image/") && (
156 |
157 | )}
158 |
159 | );
160 | };
161 |
162 | AppRegistry.registerComponent("Test", () => Test);
163 | AppRegistry.registerComponent("ShareMenuModuleComponent", () => Share);
164 | ```
165 |
166 | Or check the "example" directory for an example application.
167 |
168 | ## How it looks
169 |
170 | ### Android
171 |
172 |
173 |
174 | ### iOS
175 |
176 |
177 |
178 | ## Releasing a new version
179 |
180 | `$ npm version && npm publish`
181 |
182 | ## Credits
183 |
184 |
185 |
186 | * Between 2016 and 2023, sponsored by [Meedan](https://meedan.com) and created and developed by [Caio Almeida](https://ca.ios.ba)
187 | * iOS version supported by [Gustavo Parreira](https://github.com/Gustash)
188 |
--------------------------------------------------------------------------------
/android/src/main/java/com/meedan/ShareMenuModule.java:
--------------------------------------------------------------------------------
1 | package com.meedan;
2 |
3 | import com.facebook.react.bridge.ActivityEventListener;
4 | import com.facebook.react.bridge.Arguments;
5 | import com.facebook.react.bridge.ReactApplicationContext;
6 | import com.facebook.react.bridge.ReactContext;
7 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
8 | import com.facebook.react.bridge.ReactMethod;
9 | import com.facebook.react.bridge.Callback;
10 | import com.facebook.react.bridge.ReadableMap;
11 | import com.facebook.react.bridge.WritableArray;
12 | import com.facebook.react.bridge.WritableMap;
13 | import com.facebook.react.modules.core.DeviceEventManagerModule;
14 |
15 | import android.app.Activity;
16 | import android.content.Intent;
17 | import android.net.Uri;
18 |
19 | import androidx.annotation.NonNull;
20 | import androidx.annotation.Nullable;
21 |
22 | import java.util.ArrayList;
23 |
24 | public class ShareMenuModule extends ReactContextBaseJavaModule implements ActivityEventListener {
25 |
26 | // Events
27 | final String NEW_SHARE_EVENT = "NewShareEvent";
28 |
29 | // Keys
30 | final String MIME_TYPE_KEY = "mimeType";
31 | final String DATA_KEY = "data";
32 |
33 | private ReactContext mReactContext;
34 |
35 | public ShareMenuModule(ReactApplicationContext reactContext) {
36 | super(reactContext);
37 | mReactContext = reactContext;
38 |
39 | mReactContext.addActivityEventListener(this);
40 | }
41 |
42 | @NonNull
43 | @Override
44 | public String getName() {
45 | return "ShareMenu";
46 | }
47 |
48 | @Nullable
49 | private ReadableMap extractShared(Intent intent) {
50 | String type = intent.getType();
51 |
52 | if (type == null) {
53 | return null;
54 | }
55 |
56 | String action = intent.getAction();
57 |
58 | WritableMap data = Arguments.createMap();
59 | data.putString(MIME_TYPE_KEY, type);
60 |
61 | if (Intent.ACTION_SEND.equals(action)) {
62 | if ("text/plain".equals(type)) {
63 | data.putString(DATA_KEY, intent.getStringExtra(Intent.EXTRA_TEXT));
64 | return data;
65 | }
66 |
67 | Uri fileUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
68 | if (fileUri != null) {
69 | data.putString(DATA_KEY, fileUri.toString());
70 | return data;
71 | }
72 | } else if (Intent.ACTION_SEND_MULTIPLE.equals(action)) {
73 | ArrayList fileUris = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
74 | if (fileUris != null) {
75 | WritableArray uriArr = Arguments.createArray();
76 | for (Uri uri : fileUris) {
77 | uriArr.pushString(uri.toString());
78 | }
79 | data.putArray(DATA_KEY, uriArr);
80 | return data;
81 | }
82 | }
83 |
84 | return null;
85 | }
86 |
87 | @ReactMethod
88 | public void getSharedText(Callback successCallback) {
89 | Activity currentActivity = getCurrentActivity();
90 |
91 | if (currentActivity == null) {
92 | return;
93 | }
94 |
95 | // If this isn't the root activity then make sure it is
96 | if (!currentActivity.isTaskRoot()) {
97 | Intent newIntent = new Intent(currentActivity.getIntent());
98 | newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
99 | currentActivity.startActivity(newIntent);
100 |
101 | ReadableMap shared = extractShared(newIntent);
102 | successCallback.invoke(shared);
103 | clearSharedText();
104 | currentActivity.finish();
105 | return;
106 | }
107 |
108 | Intent intent = currentActivity.getIntent();
109 |
110 | ReadableMap shared = extractShared(intent);
111 | successCallback.invoke(shared);
112 | clearSharedText();
113 | }
114 |
115 | @ReactMethod
116 | public void addListener(String eventName) {
117 | // Required for RN built in Event Emitter Calls.
118 | }
119 |
120 | @ReactMethod
121 | public void removeListeners(Integer count) {
122 | // Required for RN built in Event Emitter Calls.
123 | }
124 |
125 | private void dispatchEvent(ReadableMap shared) {
126 | if (mReactContext == null || !mReactContext.hasActiveCatalystInstance()) {
127 | return;
128 | }
129 |
130 | mReactContext
131 | .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
132 | .emit(NEW_SHARE_EVENT, shared);
133 | }
134 |
135 | public void clearSharedText() {
136 | Activity mActivity = getCurrentActivity();
137 |
138 | if(mActivity == null) { return; }
139 |
140 | Intent intent = mActivity.getIntent();
141 | String type = intent.getType();
142 |
143 | if (type == null) {
144 | return;
145 | }
146 |
147 | if ("text/plain".equals(type)) {
148 | intent.removeExtra(Intent.EXTRA_TEXT);
149 | return;
150 | }
151 |
152 | intent.removeExtra(Intent.EXTRA_STREAM);
153 | }
154 |
155 | @Override
156 | public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
157 | // DO nothing
158 | }
159 |
160 | @Override
161 | public void onNewIntent(Intent intent) {
162 | // Possibly received a new share while the app was already running
163 |
164 | Activity currentActivity = getCurrentActivity();
165 |
166 | if (currentActivity == null) {
167 | return;
168 | }
169 |
170 | ReadableMap shared = extractShared(intent);
171 | dispatchEvent(shared);
172 |
173 | // Update intent in case the user calls `getSharedText` again
174 | currentActivity.setIntent(intent);
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/IOS_INSTRUCTIONS.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | ## Create Share Extension
4 |
5 | Create a Share Extension by going to your project settings
6 |
7 | 
8 |
9 | Then creating a new target
10 |
11 | 
12 |
13 | And choosing Share Extension
14 |
15 | 
16 |
17 | Name your extension and make sure you've selected Swift as the language to use
18 |
19 | Select your new target, go to `Build Settings`, search for `iOS Deployment Target` and make sure it matches your app's target (iOS 10.0 in RN 0.63)
20 |
21 | When your extension has been created, delete the `ShareViewController.swift` file generated by Xcode in the extension folder, right click on the folder, and choose `Add Files to "ProjectName"`
22 |
23 | On the pop-up, select `node_modules/react-native-share-menu/ios/ShareViewController.swift`. Make sure `Copy items if needed` is NOT selected and that the selected target is your newly created Share Extension
24 |
25 | 
26 |
27 | ## Edit Podfile
28 |
29 | Make these changes to your Podfile:
30 |
31 | ```diff
32 | target '' do
33 | config = use_native_modules!
34 |
35 | use_react_native!(:path => config["reactNativePath"])
36 |
37 | target 'Tests' do
38 | inherit! :complete
39 | # Pods for testing
40 | end
41 |
42 | # Enables Flipper.
43 | #
44 | # Note that if you have use_frameworks! enabled, Flipper will not work and
45 | # you should disable these next few lines.
46 | use_flipper!
47 | post_install do |installer|
48 | flipper_post_install(installer)
49 | + installer.pods_project.targets.each do |target|
50 | + target.build_configurations.each do |config|
51 | + config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
52 | + end
53 | + end
54 | end
55 | end
56 |
57 | +target '' do
58 | + use_react_native!
59 | +
60 | + pod 'RNShareMenu', :path => '../node_modules/react-native-share-menu'
61 | + # Manually link packages here to keep your extension bundle size minimal
62 | +end
63 | ```
64 |
65 | Run `pod install` in your `ios/` directory.
66 |
67 |
68 | If you're using React Native < 0.62
69 |
70 | Create a bridging header by right clicking on your project folder:
71 |
72 | - Selecting New File...
73 | - Choose Swift
74 | - Make sure the selected target is your main app target
75 | - Create the file and say yes to creating a Bridging Header file
76 | - Delete everything in the Swift file, but keep the file around
77 |
78 |
79 | ## Create App Group and URL Scheme
80 |
81 | 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`
82 |
83 | 
84 |
85 | At the bottom of the window on Xcode you should see an `App Groups` section. Press the `+` button and add a group named `group.YOUR_APP_BUNDLE_ID`.
86 |
87 | Repeat this process for the Share Extension target, with the exact same group name.
88 |
89 | Add the following to your app's `Info.plist` (if you already had other URL Schemes, make sure the one you're adding now is the FIRST one):
90 |
91 | ```OpenStep Property List
92 | CFBundleURLTypes
93 |
94 |
95 | CFBundleTypeRole
96 | Editor
97 | CFBundleURLSchemes
98 |
99 | A_URL_SCHEME_UNIQUE_TO_YOUR_APP
100 |
101 |
102 |
103 |
104 | ```
105 |
106 | Add the following to your Share Extension's `Info.plist`:
107 |
108 | ```OpenStep Property List
109 | HostAppBundleIdentifier
110 | YOUR_APP_TARGET_BUNDLE_ID
111 | HostAppURLScheme
112 | YOUR_APP_URL_SCHEME_DEFINED_ABOVE
113 |
114 | NSExtension
115 |
116 | NSExtensionAttributes
117 |
118 | NSExtensionActivationRule
119 |
120 |
121 | NSExtensionActivationSupportsImageWithMaxCount
122 | 1
123 | NSExtensionActivationSupportsText
124 |
125 | NSExtensionActivationSupportsWebURLWithMaxCount
126 | 1
127 |
128 |
129 | NSExtensionMainStoryboard
130 | MainInterface
131 | NSExtensionPointIdentifier
132 | com.apple.share-services
133 |
134 | ```
135 |
136 | ## Edit AppDelegate.m
137 |
138 | Finally, in your `AppDelegate.m` add the following:
139 |
140 | ```Objective-c
141 | ...
142 | #import
143 |
144 | ...
145 |
146 | @implementation AppDelegate
147 | ...
148 |
149 | - (BOOL)application:(UIApplication *)app
150 | openURL:(NSURL *)url
151 | options:(NSDictionary *)options
152 | {
153 | return [ShareMenuManager application:app openURL:url options:options];
154 | }
155 | @end
156 | ```
157 |
--------------------------------------------------------------------------------
/example/ios/Test/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
25 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin or MSYS, switch paths to Windows format before running java
129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=`expr $i + 1`
158 | done
159 | case $i in
160 | 0) set -- ;;
161 | 1) set -- "$args0" ;;
162 | 2) set -- "$args0" "$args1" ;;
163 | 3) set -- "$args0" "$args1" "$args2" ;;
164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=`save "$@"`
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | exec "$JAVACMD" "$@"
184 |
--------------------------------------------------------------------------------
/ios/Modules/ShareMenuReactView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShareMenuReactView.swift
3 | // RNShareMenu
4 | //
5 | // Created by Gustavo Parreira on 28/07/2020.
6 | // Modified by Veselin Stoyanov on 17/04/2021.
7 |
8 | import Foundation
9 | import MobileCoreServices
10 |
11 | @objc(ShareMenuReactView)
12 | public class ShareMenuReactView: NSObject {
13 | static var viewDelegate: ReactShareViewDelegate?
14 |
15 | @objc
16 | static public func requiresMainQueueSetup() -> Bool {
17 | return false
18 | }
19 |
20 | public static func attachViewDelegate(_ delegate: ReactShareViewDelegate!) {
21 | guard (ShareMenuReactView.viewDelegate == nil) else { return }
22 |
23 | ShareMenuReactView.viewDelegate = delegate
24 | }
25 |
26 | public static func detachViewDelegate() {
27 | ShareMenuReactView.viewDelegate = nil
28 | }
29 |
30 | @objc(dismissExtension:)
31 | func dismissExtension(_ error: String?) {
32 | guard let extensionContext = ShareMenuReactView.viewDelegate?.loadExtensionContext() else {
33 | print("Error: \(NO_EXTENSION_CONTEXT_ERROR)")
34 | return
35 | }
36 |
37 | if error != nil {
38 | let exception = NSError(
39 | domain: Bundle.main.bundleIdentifier!,
40 | code: DISMISS_SHARE_EXTENSION_WITH_ERROR_CODE,
41 | userInfo: ["error": error!]
42 | )
43 | extensionContext.cancelRequest(withError: exception)
44 | return
45 | }
46 |
47 | extensionContext.completeRequest(returningItems: [], completionHandler: nil)
48 | }
49 |
50 | @objc
51 | func openApp() {
52 | guard let viewDelegate = ShareMenuReactView.viewDelegate else {
53 | print("Error: \(NO_DELEGATE_ERROR)")
54 | return
55 | }
56 |
57 | viewDelegate.openApp()
58 | }
59 |
60 | @objc(continueInApp:)
61 | func continueInApp(_ extraData: [String:Any]?) {
62 | guard let viewDelegate = ShareMenuReactView.viewDelegate else {
63 | print("Error: \(NO_DELEGATE_ERROR)")
64 | return
65 | }
66 |
67 | let extensionContext = viewDelegate.loadExtensionContext()
68 |
69 | guard let items = extensionContext.inputItems as? [NSExtensionItem] else {
70 | print("Error: \(COULD_NOT_FIND_ITEMS_ERROR)")
71 | return
72 | }
73 |
74 | viewDelegate.continueInApp(with: items, and: extraData)
75 | }
76 |
77 | @objc(data:reject:)
78 | func data(_
79 | resolve: @escaping RCTPromiseResolveBlock,
80 | reject: @escaping RCTPromiseRejectBlock) {
81 | guard let extensionContext = ShareMenuReactView.viewDelegate?.loadExtensionContext() else {
82 | print("Error: \(NO_EXTENSION_CONTEXT_ERROR)")
83 | return
84 | }
85 |
86 | extractDataFromContext(context: extensionContext) { (data, error) in
87 | guard (error == nil) else {
88 | reject("error", error?.description, nil)
89 | return
90 | }
91 |
92 | resolve([DATA_KEY: data])
93 | }
94 | }
95 |
96 | func extractDataFromContext(context: NSExtensionContext, withCallback callback: @escaping ([Any]?, NSException?) -> Void) {
97 | DispatchQueue.global().async {
98 | let semaphore = DispatchSemaphore(value: 0)
99 | let items:[NSExtensionItem]! = context.inputItems as? [NSExtensionItem]
100 | var results: [[String: String]] = []
101 |
102 | for item in items {
103 | guard let attachments = item.attachments else {
104 | callback(nil, NSException(name: NSExceptionName(rawValue: "Error"), reason:"couldn't find attachments", userInfo:nil))
105 | return
106 | }
107 |
108 | for provider in attachments {
109 | if provider.hasItemConformingToTypeIdentifier(kUTTypeURL as String) {
110 | provider.loadItem(forTypeIdentifier: kUTTypeURL as String, options: nil) { (item, error) in
111 | let url: URL! = item as? URL
112 |
113 | results.append([DATA_KEY: url.absoluteString, MIME_TYPE_KEY: "text/plain"])
114 |
115 | semaphore.signal()
116 | }
117 | semaphore.wait()
118 | } else if provider.hasItemConformingToTypeIdentifier(kUTTypeText as String) {
119 | provider.loadItem(forTypeIdentifier: kUTTypeText as String, options: nil) { (item, error) in
120 | let text:String! = item as? String
121 |
122 | results.append([DATA_KEY: text, MIME_TYPE_KEY: "text/plain"])
123 |
124 | semaphore.signal()
125 | }
126 | semaphore.wait()
127 | } else if provider.hasItemConformingToTypeIdentifier(kUTTypeImage as String) {
128 | provider.loadItem(forTypeIdentifier: kUTTypeImage as String, options: nil) { (item, error) in
129 | let imageUrl: URL! = item as? URL
130 |
131 | if (imageUrl != nil) {
132 | if let imageData = try? Data(contentsOf: imageUrl) {
133 | results.append([DATA_KEY: imageUrl.absoluteString, MIME_TYPE_KEY: self.extractMimeType(from: imageUrl)])
134 | }
135 | } else {
136 | let image: UIImage! = item as? UIImage
137 |
138 | if (image != nil) {
139 | let imageData: Data! = image.pngData();
140 |
141 | // Creating temporary URL for image data (UIImage)
142 | guard let imageURL = NSURL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("TemporaryScreenshot.png") else {
143 | return
144 | }
145 |
146 | do {
147 | // Writing the image to the URL
148 | try imageData.write(to: imageURL)
149 |
150 | results.append([DATA_KEY: imageUrl.absoluteString, MIME_TYPE_KEY: imageURL.extractMimeType()])
151 | } catch {
152 | callback(nil, NSException(name: NSExceptionName(rawValue: "Error"), reason:"Can't load image", userInfo:nil))
153 | }
154 | }
155 | }
156 |
157 | semaphore.signal()
158 | }
159 | semaphore.wait()
160 | } else if provider.hasItemConformingToTypeIdentifier(kUTTypeData as String) {
161 | provider.loadItem(forTypeIdentifier: kUTTypeData as String, options: nil) { (item, error) in
162 | let url: URL! = item as? URL
163 |
164 | results.append([DATA_KEY: url.absoluteString, MIME_TYPE_KEY: self.extractMimeType(from: url)])
165 |
166 | semaphore.signal()
167 | }
168 | semaphore.wait()
169 | } else {
170 | callback(nil, NSException(name: NSExceptionName(rawValue: "Error"), reason:"couldn't find provider", userInfo:nil))
171 | }
172 | }
173 | }
174 |
175 | callback(results, nil)
176 | }
177 | }
178 |
179 | func extractMimeType(from url: URL) -> String {
180 | let fileExtension: CFString = url.pathExtension as CFString
181 | guard let extUTI = UTTypeCreatePreferredIdentifierForTag(
182 | kUTTagClassFilenameExtension,
183 | fileExtension,
184 | nil
185 | )?.takeUnretainedValue() else { return "" }
186 |
187 | guard let mimeUTI = UTTypeCopyPreferredTagWithClass(extUTI, kUTTagClassMIMEType)
188 | else { return "" }
189 |
190 | return mimeUTI.takeUnretainedValue() as String
191 | }
192 | }
193 |
--------------------------------------------------------------------------------
/ios/ShareViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShareViewController.swift
3 | // RNShareMenu
4 | //
5 | // DO NOT EDIT THIS FILE. IT WILL BE OVERRIDEN BY NPM OR YARN.
6 | //
7 | // Created by Gustavo Parreira on 26/07/2020.
8 | //
9 | // Modified by Veselin Stoyanov on 17/04/2021.
10 |
11 | import Foundation
12 | import MobileCoreServices
13 | import UIKit
14 | import Social
15 | import RNShareMenu
16 |
17 | class ShareViewController: SLComposeServiceViewController {
18 | var hostAppId: String?
19 | var hostAppUrlScheme: String?
20 | var sharedItems: [Any] = []
21 |
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 |
25 | if let hostAppId = Bundle.main.object(forInfoDictionaryKey: HOST_APP_IDENTIFIER_INFO_PLIST_KEY) as? String {
26 | self.hostAppId = hostAppId
27 | } else {
28 | print("Error: \(NO_INFO_PLIST_INDENTIFIER_ERROR)")
29 | }
30 |
31 | if let hostAppUrlScheme = Bundle.main.object(forInfoDictionaryKey: HOST_URL_SCHEME_INFO_PLIST_KEY) as? String {
32 | self.hostAppUrlScheme = hostAppUrlScheme
33 | } else {
34 | print("Error: \(NO_INFO_PLIST_URL_SCHEME_ERROR)")
35 | }
36 | }
37 |
38 | override func isContentValid() -> Bool {
39 | // Do validation of contentText and/or NSExtensionContext attachments here
40 | return true
41 | }
42 |
43 | override func didSelectPost() {
44 | // This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments.
45 | guard let items = extensionContext?.inputItems as? [NSExtensionItem] else {
46 | cancelRequest()
47 | return
48 | }
49 |
50 | handlePost(items)
51 | }
52 |
53 | override func configurationItems() -> [Any]! {
54 | // To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here.
55 | return []
56 | }
57 |
58 | func handlePost(_ items: [NSExtensionItem], extraData: [String:Any]? = nil) {
59 | DispatchQueue.global().async {
60 | guard let hostAppId = self.hostAppId else {
61 | self.exit(withError: NO_INFO_PLIST_INDENTIFIER_ERROR)
62 | return
63 | }
64 | guard let userDefaults = UserDefaults(suiteName: "group.\(hostAppId)") else {
65 | self.exit(withError: NO_APP_GROUP_ERROR)
66 | return
67 | }
68 |
69 | if let data = extraData {
70 | self.storeExtraData(data)
71 | } else {
72 | self.removeExtraData()
73 | }
74 |
75 | let semaphore = DispatchSemaphore(value: 0)
76 | var results: [Any] = []
77 |
78 | for item in items {
79 | guard let attachments = item.attachments else {
80 | self.cancelRequest()
81 | return
82 | }
83 |
84 | for provider in attachments {
85 | if provider.isText {
86 | self.storeText(withProvider: provider, semaphore)
87 | } else if provider.isURL {
88 | self.storeUrl(withProvider: provider, semaphore)
89 | } else {
90 | self.storeFile(withProvider: provider, semaphore)
91 | }
92 |
93 | semaphore.wait()
94 | }
95 | }
96 |
97 | userDefaults.set(self.sharedItems,
98 | forKey: USER_DEFAULTS_KEY)
99 | userDefaults.synchronize()
100 |
101 | self.openHostApp()
102 | }
103 | }
104 |
105 | func storeExtraData(_ data: [String:Any]) {
106 | guard let hostAppId = self.hostAppId else {
107 | print("Error: \(NO_INFO_PLIST_INDENTIFIER_ERROR)")
108 | return
109 | }
110 | guard let userDefaults = UserDefaults(suiteName: "group.\(hostAppId)") else {
111 | print("Error: \(NO_APP_GROUP_ERROR)")
112 | return
113 | }
114 | userDefaults.set(data, forKey: USER_DEFAULTS_EXTRA_DATA_KEY)
115 | userDefaults.synchronize()
116 | }
117 |
118 | func removeExtraData() {
119 | guard let hostAppId = self.hostAppId else {
120 | print("Error: \(NO_INFO_PLIST_INDENTIFIER_ERROR)")
121 | return
122 | }
123 | guard let userDefaults = UserDefaults(suiteName: "group.\(hostAppId)") else {
124 | print("Error: \(NO_APP_GROUP_ERROR)")
125 | return
126 | }
127 | userDefaults.removeObject(forKey: USER_DEFAULTS_EXTRA_DATA_KEY)
128 | userDefaults.synchronize()
129 | }
130 |
131 | func storeText(withProvider provider: NSItemProvider, _ semaphore: DispatchSemaphore) {
132 | provider.loadItem(forTypeIdentifier: kUTTypeText as String, options: nil) { (data, error) in
133 | guard (error == nil) else {
134 | self.exit(withError: error.debugDescription)
135 | return
136 | }
137 | guard let text = data as? String else {
138 | self.exit(withError: COULD_NOT_FIND_STRING_ERROR)
139 | return
140 | }
141 |
142 | self.sharedItems.append([DATA_KEY: text, MIME_TYPE_KEY: "text/plain"])
143 | semaphore.signal()
144 | }
145 | }
146 |
147 | func storeUrl(withProvider provider: NSItemProvider, _ semaphore: DispatchSemaphore) {
148 | provider.loadItem(forTypeIdentifier: kUTTypeURL as String, options: nil) { (data, error) in
149 | guard (error == nil) else {
150 | self.exit(withError: error.debugDescription)
151 | return
152 | }
153 | guard let url = data as? URL else {
154 | self.exit(withError: COULD_NOT_FIND_URL_ERROR)
155 | return
156 | }
157 |
158 | self.sharedItems.append([DATA_KEY: url.absoluteString, MIME_TYPE_KEY: "text/plain"])
159 | semaphore.signal()
160 | }
161 | }
162 |
163 | func storeFile(withProvider provider: NSItemProvider, _ semaphore: DispatchSemaphore) {
164 | provider.loadItem(forTypeIdentifier: kUTTypeData as String, options: nil) { (data, error) in
165 | guard (error == nil) else {
166 | self.exit(withError: error.debugDescription)
167 | return
168 | }
169 | guard let url = data as? URL else {
170 | self.exit(withError: COULD_NOT_FIND_IMG_ERROR)
171 | return
172 | }
173 | guard let hostAppId = self.hostAppId else {
174 | self.exit(withError: NO_INFO_PLIST_INDENTIFIER_ERROR)
175 | return
176 | }
177 | guard let groupFileManagerContainer = FileManager.default
178 | .containerURL(forSecurityApplicationGroupIdentifier: "group.\(hostAppId)")
179 | else {
180 | self.exit(withError: NO_APP_GROUP_ERROR)
181 | return
182 | }
183 |
184 | let mimeType = url.extractMimeType()
185 | let fileExtension = url.pathExtension
186 | let fileName = UUID().uuidString
187 | let filePath = groupFileManagerContainer
188 | .appendingPathComponent("\(fileName).\(fileExtension)")
189 |
190 | guard self.moveFileToDisk(from: url, to: filePath) else {
191 | self.exit(withError: COULD_NOT_SAVE_FILE_ERROR)
192 | return
193 | }
194 |
195 | self.sharedItems.append([DATA_KEY: filePath.absoluteString, MIME_TYPE_KEY: mimeType])
196 | semaphore.signal()
197 | }
198 | }
199 |
200 | func moveFileToDisk(from srcUrl: URL, to destUrl: URL) -> Bool {
201 | do {
202 | if FileManager.default.fileExists(atPath: destUrl.path) {
203 | try FileManager.default.removeItem(at: destUrl)
204 | }
205 | try FileManager.default.copyItem(at: srcUrl, to: destUrl)
206 | } catch (let error) {
207 | print("Could not save file from \(srcUrl) to \(destUrl): \(error)")
208 | return false
209 | }
210 |
211 | return true
212 | }
213 |
214 | func exit(withError error: String) {
215 | print("Error: \(error)")
216 | cancelRequest()
217 | }
218 |
219 | internal func openHostApp() {
220 | guard let urlScheme = self.hostAppUrlScheme else {
221 | exit(withError: NO_INFO_PLIST_URL_SCHEME_ERROR)
222 | return
223 | }
224 |
225 | let url = URL(string: urlScheme)
226 | let selectorOpenURL = sel_registerName("openURL:")
227 | var responder: UIResponder? = self
228 |
229 | while responder != nil {
230 | if responder?.responds(to: selectorOpenURL) == true {
231 | responder?.perform(selectorOpenURL, with: url)
232 | }
233 | responder = responder!.next
234 | }
235 |
236 | completeRequest()
237 | }
238 |
239 | func completeRequest() {
240 | // Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context.
241 | extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
242 | }
243 |
244 | func cancelRequest() {
245 | extensionContext!.cancelRequest(withError: NSError())
246 | }
247 |
248 | }
249 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation. If none specified and
19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20 | * // default. Can be overridden with ENTRY_FILE environment variable.
21 | * entryFile: "index.android.js",
22 | *
23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format
24 | * bundleCommand: "ram-bundle",
25 | *
26 | * // whether to bundle JS and assets in debug mode
27 | * bundleInDebug: false,
28 | *
29 | * // whether to bundle JS and assets in release mode
30 | * bundleInRelease: true,
31 | *
32 | * // whether to bundle JS and assets in another build variant (if configured).
33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34 | * // The configuration property can be in the following formats
35 | * // 'bundleIn${productFlavor}${buildType}'
36 | * // 'bundleIn${buildType}'
37 | * // bundleInFreeDebug: true,
38 | * // bundleInPaidRelease: true,
39 | * // bundleInBeta: true,
40 | *
41 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
42 | * // for example: to disable dev mode in the staging build type (if configured)
43 | * devDisabledInStaging: true,
44 | * // The configuration property can be in the following formats
45 | * // 'devDisabledIn${productFlavor}${buildType}'
46 | * // 'devDisabledIn${buildType}'
47 | *
48 | * // the root of your project, i.e. where "package.json" lives
49 | * root: "../../",
50 | *
51 | * // where to put the JS bundle asset in debug mode
52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53 | *
54 | * // where to put the JS bundle asset in release mode
55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56 | *
57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
58 | * // require('./image.png')), in debug mode
59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60 | *
61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
62 | * // require('./image.png')), in release mode
63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64 | *
65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69 | * // for example, you might want to remove it from here.
70 | * inputExcludes: ["android/**", "ios/**"],
71 | *
72 | * // override which node gets called and with what additional arguments
73 | * nodeExecutableAndArgs: ["node"],
74 | *
75 | * // supply additional arguments to the packager
76 | * extraPackagerArgs: []
77 | * ]
78 | */
79 |
80 | project.ext.react = [
81 | enableHermes: false, // clean and rebuild if changing
82 | ]
83 |
84 | apply from: "../../node_modules/react-native/react.gradle"
85 |
86 | /**
87 | * Set this to true to create two separate APKs instead of one:
88 | * - An APK that only works on ARM devices
89 | * - An APK that only works on x86 devices
90 | * The advantage is the size of the APK is reduced by about 4MB.
91 | * Upload all the APKs to the Play Store and people will download
92 | * the correct one based on the CPU architecture of their device.
93 | */
94 | def enableSeparateBuildPerCPUArchitecture = false
95 |
96 | /**
97 | * Run Proguard to shrink the Java bytecode in release builds.
98 | */
99 | def enableProguardInReleaseBuilds = false
100 |
101 | /**
102 | * The preferred build flavor of JavaScriptCore.
103 | *
104 | * For example, to use the international variant, you can use:
105 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106 | *
107 | * The international variant includes ICU i18n library and necessary data
108 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109 | * give correct results when using with locales other than en-US. Note that
110 | * this variant is about 6MiB larger per architecture than default.
111 | */
112 | def jscFlavor = 'org.webkit:android-jsc:+'
113 |
114 | /**
115 | * Whether to enable the Hermes VM.
116 | *
117 | * This should be set on project.ext.react and mirrored here. If it is not set
118 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119 | * and the benefits of using Hermes will therefore be sharply reduced.
120 | */
121 | def enableHermes = project.ext.react.get("enableHermes", false);
122 |
123 | android {
124 | compileSdkVersion rootProject.ext.compileSdkVersion
125 |
126 | compileOptions {
127 | sourceCompatibility JavaVersion.VERSION_1_8
128 | targetCompatibility JavaVersion.VERSION_1_8
129 | }
130 |
131 | defaultConfig {
132 | applicationId "com.github.meedaan"
133 | minSdkVersion rootProject.ext.minSdkVersion
134 | targetSdkVersion rootProject.ext.targetSdkVersion
135 | versionCode 1
136 | versionName "1.0"
137 | }
138 | splits {
139 | abi {
140 | reset()
141 | enable enableSeparateBuildPerCPUArchitecture
142 | universalApk false // If true, also generate a universal APK
143 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
144 | }
145 | }
146 | signingConfigs {
147 | debug {
148 | storeFile file('debug.keystore')
149 | storePassword 'android'
150 | keyAlias 'androiddebugkey'
151 | keyPassword 'android'
152 | }
153 | }
154 | buildTypes {
155 | debug {
156 | signingConfig signingConfigs.debug
157 | }
158 | release {
159 | // Caution! In production, you need to generate your own keystore file.
160 | // see https://reactnative.dev/docs/signed-apk-android.
161 | signingConfig signingConfigs.debug
162 | minifyEnabled enableProguardInReleaseBuilds
163 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164 | }
165 | }
166 |
167 | // applicationVariants are e.g. debug, release
168 | applicationVariants.all { variant ->
169 | variant.outputs.each { output ->
170 | // For each separate APK per architecture, set a unique version code as described here:
171 | // https://developer.android.com/studio/build/configure-apk-splits.html
172 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
173 | def abi = output.getFilter(OutputFile.ABI)
174 | if (abi != null) { // null for the universal-debug, universal-release variants
175 | output.versionCodeOverride =
176 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
177 | }
178 |
179 | }
180 | }
181 | }
182 |
183 | dependencies {
184 | implementation fileTree(dir: "libs", include: ["*.jar"])
185 | //noinspection GradleDynamicVersion
186 | implementation "com.facebook.react:react-native:+" // From node_modules
187 |
188 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
189 |
190 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
191 | exclude group:'com.facebook.fbjni'
192 | }
193 |
194 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
195 | exclude group:'com.facebook.flipper'
196 | exclude group:'com.squareup.okhttp3', module:'okhttp'
197 | }
198 |
199 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
200 | exclude group:'com.facebook.flipper'
201 | }
202 |
203 | if (enableHermes) {
204 | def hermesPath = "../../node_modules/hermes-engine/android/";
205 | debugImplementation files(hermesPath + "hermes-debug.aar")
206 | releaseImplementation files(hermesPath + "hermes-release.aar")
207 | } else {
208 | implementation jscFlavor
209 | }
210 | }
211 |
212 | // Run this once to be able to run the application with BUCK
213 | // puts all compile dependencies into folder libs for BUCK to use
214 | task copyDownloadableDepsToLibs(type: Copy) {
215 | from configurations.compile
216 | into 'libs'
217 | }
218 |
219 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
220 |
--------------------------------------------------------------------------------
/ios/ShareMenu.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 |
11 |
12 | F4FF95D7245B92E800C19C63 /* ShareMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* ShareMenu.swift */; };
13 |
14 | 5E555C0D2413F4C50049A1A2 /* ShareMenu.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* ShareMenu.mm */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXCopyFilesBuildPhase section */
18 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
19 | isa = PBXCopyFilesBuildPhase;
20 | buildActionMask = 2147483647;
21 | dstPath = "include/$(PRODUCT_NAME)";
22 | dstSubfolderSpec = 16;
23 | files = (
24 | );
25 | runOnlyForDeploymentPostprocessing = 0;
26 | };
27 | /* End PBXCopyFilesBuildPhase section */
28 |
29 | /* Begin PBXFileReference section */
30 | 134814201AA4EA6300B7C361 /* libShareMenu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libShareMenu.a; sourceTree = BUILT_PRODUCTS_DIR; };
31 |
32 |
33 | B3E7B5891CC2AC0600A0062D /* ShareMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareMenu.m; sourceTree = ""; };
34 | F4FF95D5245B92E700C19C63 /* ShareMenu-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ShareMenu-Bridging-Header.h"; sourceTree = ""; };
35 | F4FF95D6245B92E800C19C63 /* ShareMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareMenu.swift; sourceTree = ""; };
36 |
37 | /* End PBXFileReference section */
38 |
39 | /* Begin PBXFrameworksBuildPhase section */
40 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
41 | isa = PBXFrameworksBuildPhase;
42 | buildActionMask = 2147483647;
43 | files = (
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | 134814211AA4EA7D00B7C361 /* Products */ = {
51 | isa = PBXGroup;
52 | children = (
53 | 134814201AA4EA6300B7C361 /* libShareMenu.a */,
54 | );
55 | name = Products;
56 | sourceTree = "";
57 | };
58 | 58B511D21A9E6C8500147676 = {
59 | isa = PBXGroup;
60 | children = (
61 |
62 |
63 | F4FF95D6245B92E800C19C63 /* ShareMenu.swift */,
64 | B3E7B5891CC2AC0600A0062D /* ShareMenu.m */,
65 | F4FF95D5245B92E700C19C63 /* ShareMenu-Bridging-Header.h */,
66 |
67 | 134814211AA4EA7D00B7C361 /* Products */,
68 | );
69 | sourceTree = "";
70 | };
71 | /* End PBXGroup section */
72 |
73 | /* Begin PBXNativeTarget section */
74 | 58B511DA1A9E6C8500147676 /* ShareMenu */ = {
75 | isa = PBXNativeTarget;
76 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "ShareMenu" */;
77 | buildPhases = (
78 | 58B511D71A9E6C8500147676 /* Sources */,
79 | 58B511D81A9E6C8500147676 /* Frameworks */,
80 | 58B511D91A9E6C8500147676 /* CopyFiles */,
81 | );
82 | buildRules = (
83 | );
84 | dependencies = (
85 | );
86 | name = ShareMenu;
87 | productName = RCTDataManager;
88 | productReference = 134814201AA4EA6300B7C361 /* libShareMenu.a */;
89 | productType = "com.apple.product-type.library.static";
90 | };
91 | /* End PBXNativeTarget section */
92 |
93 | /* Begin PBXProject section */
94 | 58B511D31A9E6C8500147676 /* Project object */ = {
95 | isa = PBXProject;
96 | attributes = {
97 | LastUpgradeCheck = 0920;
98 | ORGANIZATIONNAME = Facebook;
99 | TargetAttributes = {
100 | 58B511DA1A9E6C8500147676 = {
101 | CreatedOnToolsVersion = 6.1.1;
102 | };
103 | };
104 | };
105 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "ShareMenu" */;
106 | compatibilityVersion = "Xcode 3.2";
107 | developmentRegion = English;
108 | hasScannedForEncodings = 0;
109 | knownRegions = (
110 | English,
111 | en,
112 | );
113 | mainGroup = 58B511D21A9E6C8500147676;
114 | productRefGroup = 58B511D21A9E6C8500147676;
115 | projectDirPath = "";
116 | projectRoot = "";
117 | targets = (
118 | 58B511DA1A9E6C8500147676 /* ShareMenu */,
119 | );
120 | };
121 | /* End PBXProject section */
122 |
123 | /* Begin PBXSourcesBuildPhase section */
124 | 58B511D71A9E6C8500147676 /* Sources */ = {
125 | isa = PBXSourcesBuildPhase;
126 | buildActionMask = 2147483647;
127 | files = (
128 |
129 |
130 | F4FF95D7245B92E800C19C63 /* ShareMenu.swift in Sources */,
131 | B3E7B58A1CC2AC0600A0062D /* ShareMenu.m in Sources */,
132 |
133 | );
134 | runOnlyForDeploymentPostprocessing = 0;
135 | };
136 | /* End PBXSourcesBuildPhase section */
137 |
138 | /* Begin XCBuildConfiguration section */
139 | 58B511ED1A9E6C8500147676 /* Debug */ = {
140 | isa = XCBuildConfiguration;
141 | buildSettings = {
142 | ALWAYS_SEARCH_USER_PATHS = NO;
143 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
144 | CLANG_CXX_LIBRARY = "libc++";
145 | CLANG_ENABLE_MODULES = YES;
146 | CLANG_ENABLE_OBJC_ARC = YES;
147 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
148 | CLANG_WARN_BOOL_CONVERSION = YES;
149 | CLANG_WARN_COMMA = YES;
150 | CLANG_WARN_CONSTANT_CONVERSION = YES;
151 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
152 | CLANG_WARN_EMPTY_BODY = YES;
153 | CLANG_WARN_ENUM_CONVERSION = YES;
154 | CLANG_WARN_INFINITE_RECURSION = YES;
155 | CLANG_WARN_INT_CONVERSION = YES;
156 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
157 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
158 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
159 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
160 | CLANG_WARN_STRICT_PROTOTYPES = YES;
161 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
162 | CLANG_WARN_UNREACHABLE_CODE = YES;
163 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
164 | COPY_PHASE_STRIP = NO;
165 | ENABLE_STRICT_OBJC_MSGSEND = YES;
166 | ENABLE_TESTABILITY = YES;
167 | GCC_C_LANGUAGE_STANDARD = gnu99;
168 | GCC_DYNAMIC_NO_PIC = NO;
169 | GCC_NO_COMMON_BLOCKS = YES;
170 | GCC_OPTIMIZATION_LEVEL = 0;
171 | GCC_PREPROCESSOR_DEFINITIONS = (
172 | "DEBUG=1",
173 | "$(inherited)",
174 | );
175 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
176 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
177 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
178 | GCC_WARN_UNDECLARED_SELECTOR = YES;
179 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
180 | GCC_WARN_UNUSED_FUNCTION = YES;
181 | GCC_WARN_UNUSED_VARIABLE = YES;
182 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
183 | MTL_ENABLE_DEBUG_INFO = YES;
184 | ONLY_ACTIVE_ARCH = YES;
185 | SDKROOT = iphoneos;
186 | };
187 | name = Debug;
188 | };
189 | 58B511EE1A9E6C8500147676 /* Release */ = {
190 | isa = XCBuildConfiguration;
191 | buildSettings = {
192 | ALWAYS_SEARCH_USER_PATHS = NO;
193 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
194 | CLANG_CXX_LIBRARY = "libc++";
195 | CLANG_ENABLE_MODULES = YES;
196 | CLANG_ENABLE_OBJC_ARC = YES;
197 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
198 | CLANG_WARN_BOOL_CONVERSION = YES;
199 | CLANG_WARN_COMMA = YES;
200 | CLANG_WARN_CONSTANT_CONVERSION = YES;
201 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
202 | CLANG_WARN_EMPTY_BODY = YES;
203 | CLANG_WARN_ENUM_CONVERSION = YES;
204 | CLANG_WARN_INFINITE_RECURSION = YES;
205 | CLANG_WARN_INT_CONVERSION = YES;
206 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
207 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
209 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
210 | CLANG_WARN_STRICT_PROTOTYPES = YES;
211 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
212 | CLANG_WARN_UNREACHABLE_CODE = YES;
213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
214 | COPY_PHASE_STRIP = YES;
215 | ENABLE_NS_ASSERTIONS = NO;
216 | ENABLE_STRICT_OBJC_MSGSEND = YES;
217 | GCC_C_LANGUAGE_STANDARD = gnu99;
218 | GCC_NO_COMMON_BLOCKS = YES;
219 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
220 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
221 | GCC_WARN_UNDECLARED_SELECTOR = YES;
222 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
223 | GCC_WARN_UNUSED_FUNCTION = YES;
224 | GCC_WARN_UNUSED_VARIABLE = YES;
225 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
226 | MTL_ENABLE_DEBUG_INFO = NO;
227 | SDKROOT = iphoneos;
228 | VALIDATE_PRODUCT = YES;
229 | };
230 | name = Release;
231 | };
232 | 58B511F01A9E6C8500147676 /* Debug */ = {
233 | isa = XCBuildConfiguration;
234 | buildSettings = {
235 | HEADER_SEARCH_PATHS = (
236 | "$(inherited)",
237 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
238 | "$(SRCROOT)/../../../React/**",
239 | "$(SRCROOT)/../../react-native/React/**",
240 | );
241 | LIBRARY_SEARCH_PATHS = "$(inherited)";
242 | OTHER_LDFLAGS = "-ObjC";
243 | PRODUCT_NAME = ShareMenu;
244 | SKIP_INSTALL = YES;
245 |
246 | SWIFT_OBJC_BRIDGING_HEADER = "ShareMenu-Bridging-Header.h";
247 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
248 | SWIFT_VERSION = 5.0;
249 |
250 | };
251 | name = Debug;
252 | };
253 | 58B511F11A9E6C8500147676 /* Release */ = {
254 | isa = XCBuildConfiguration;
255 | buildSettings = {
256 | HEADER_SEARCH_PATHS = (
257 | "$(inherited)",
258 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
259 | "$(SRCROOT)/../../../React/**",
260 | "$(SRCROOT)/../../react-native/React/**",
261 | );
262 | LIBRARY_SEARCH_PATHS = "$(inherited)";
263 | OTHER_LDFLAGS = "-ObjC";
264 | PRODUCT_NAME = ShareMenu;
265 | SKIP_INSTALL = YES;
266 |
267 | SWIFT_OBJC_BRIDGING_HEADER = "ShareMenu-Bridging-Header.h";
268 | SWIFT_VERSION = 5.0;
269 |
270 | };
271 | name = Release;
272 | };
273 | /* End XCBuildConfiguration section */
274 |
275 | /* Begin XCConfigurationList section */
276 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "ShareMenu" */ = {
277 | isa = XCConfigurationList;
278 | buildConfigurations = (
279 | 58B511ED1A9E6C8500147676 /* Debug */,
280 | 58B511EE1A9E6C8500147676 /* Release */,
281 | );
282 | defaultConfigurationIsVisible = 0;
283 | defaultConfigurationName = Release;
284 | };
285 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "ShareMenu" */ = {
286 | isa = XCConfigurationList;
287 | buildConfigurations = (
288 | 58B511F01A9E6C8500147676 /* Debug */,
289 | 58B511F11A9E6C8500147676 /* Release */,
290 | );
291 | defaultConfigurationIsVisible = 0;
292 | defaultConfigurationName = Release;
293 | };
294 | /* End XCConfigurationList section */
295 | };
296 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
297 | }
298 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost-for-react-native (1.63.0)
3 | - CocoaAsyncSocket (7.6.4)
4 | - CocoaLibEvent (1.0.0)
5 | - DoubleConversion (1.1.6)
6 | - FBLazyVector (0.63.2)
7 | - FBReactNativeSpec (0.63.2):
8 | - Folly (= 2020.01.13.00)
9 | - RCTRequired (= 0.63.2)
10 | - RCTTypeSafety (= 0.63.2)
11 | - React-Core (= 0.63.2)
12 | - React-jsi (= 0.63.2)
13 | - ReactCommon/turbomodule/core (= 0.63.2)
14 | - Flipper (0.41.5):
15 | - Flipper-Folly (~> 2.2)
16 | - Flipper-RSocket (~> 1.1)
17 | - Flipper-DoubleConversion (1.1.7)
18 | - Flipper-Folly (2.2.0):
19 | - boost-for-react-native
20 | - CocoaLibEvent (~> 1.0)
21 | - Flipper-DoubleConversion
22 | - Flipper-Glog
23 | - OpenSSL-Universal (= 1.0.2.19)
24 | - Flipper-Glog (0.3.6)
25 | - Flipper-PeerTalk (0.0.4)
26 | - Flipper-RSocket (1.1.0):
27 | - Flipper-Folly (~> 2.2)
28 | - FlipperKit (0.41.5):
29 | - FlipperKit/Core (= 0.41.5)
30 | - FlipperKit/Core (0.41.5):
31 | - Flipper (~> 0.41.5)
32 | - FlipperKit/CppBridge
33 | - FlipperKit/FBCxxFollyDynamicConvert
34 | - FlipperKit/FBDefines
35 | - FlipperKit/FKPortForwarding
36 | - FlipperKit/CppBridge (0.41.5):
37 | - Flipper (~> 0.41.5)
38 | - FlipperKit/FBCxxFollyDynamicConvert (0.41.5):
39 | - Flipper-Folly (~> 2.2)
40 | - FlipperKit/FBDefines (0.41.5)
41 | - FlipperKit/FKPortForwarding (0.41.5):
42 | - CocoaAsyncSocket (~> 7.6)
43 | - Flipper-PeerTalk (~> 0.0.4)
44 | - FlipperKit/FlipperKitHighlightOverlay (0.41.5)
45 | - FlipperKit/FlipperKitLayoutPlugin (0.41.5):
46 | - FlipperKit/Core
47 | - FlipperKit/FlipperKitHighlightOverlay
48 | - FlipperKit/FlipperKitLayoutTextSearchable
49 | - YogaKit (~> 1.18)
50 | - FlipperKit/FlipperKitLayoutTextSearchable (0.41.5)
51 | - FlipperKit/FlipperKitNetworkPlugin (0.41.5):
52 | - FlipperKit/Core
53 | - FlipperKit/FlipperKitReactPlugin (0.41.5):
54 | - FlipperKit/Core
55 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.41.5):
56 | - FlipperKit/Core
57 | - FlipperKit/SKIOSNetworkPlugin (0.41.5):
58 | - FlipperKit/Core
59 | - FlipperKit/FlipperKitNetworkPlugin
60 | - Folly (2020.01.13.00):
61 | - boost-for-react-native
62 | - DoubleConversion
63 | - Folly/Default (= 2020.01.13.00)
64 | - glog
65 | - Folly/Default (2020.01.13.00):
66 | - boost-for-react-native
67 | - DoubleConversion
68 | - glog
69 | - glog (0.3.5)
70 | - OpenSSL-Universal (1.0.2.19):
71 | - OpenSSL-Universal/Static (= 1.0.2.19)
72 | - OpenSSL-Universal/Static (1.0.2.19)
73 | - RCTRequired (0.63.2)
74 | - RCTTypeSafety (0.63.2):
75 | - FBLazyVector (= 0.63.2)
76 | - Folly (= 2020.01.13.00)
77 | - RCTRequired (= 0.63.2)
78 | - React-Core (= 0.63.2)
79 | - React (0.63.2):
80 | - React-Core (= 0.63.2)
81 | - React-Core/DevSupport (= 0.63.2)
82 | - React-Core/RCTWebSocket (= 0.63.2)
83 | - React-RCTActionSheet (= 0.63.2)
84 | - React-RCTAnimation (= 0.63.2)
85 | - React-RCTBlob (= 0.63.2)
86 | - React-RCTImage (= 0.63.2)
87 | - React-RCTLinking (= 0.63.2)
88 | - React-RCTNetwork (= 0.63.2)
89 | - React-RCTSettings (= 0.63.2)
90 | - React-RCTText (= 0.63.2)
91 | - React-RCTVibration (= 0.63.2)
92 | - React-callinvoker (0.63.2)
93 | - React-Core (0.63.2):
94 | - Folly (= 2020.01.13.00)
95 | - glog
96 | - React-Core/Default (= 0.63.2)
97 | - React-cxxreact (= 0.63.2)
98 | - React-jsi (= 0.63.2)
99 | - React-jsiexecutor (= 0.63.2)
100 | - Yoga
101 | - React-Core/CoreModulesHeaders (0.63.2):
102 | - Folly (= 2020.01.13.00)
103 | - glog
104 | - React-Core/Default
105 | - React-cxxreact (= 0.63.2)
106 | - React-jsi (= 0.63.2)
107 | - React-jsiexecutor (= 0.63.2)
108 | - Yoga
109 | - React-Core/Default (0.63.2):
110 | - Folly (= 2020.01.13.00)
111 | - glog
112 | - React-cxxreact (= 0.63.2)
113 | - React-jsi (= 0.63.2)
114 | - React-jsiexecutor (= 0.63.2)
115 | - Yoga
116 | - React-Core/DevSupport (0.63.2):
117 | - Folly (= 2020.01.13.00)
118 | - glog
119 | - React-Core/Default (= 0.63.2)
120 | - React-Core/RCTWebSocket (= 0.63.2)
121 | - React-cxxreact (= 0.63.2)
122 | - React-jsi (= 0.63.2)
123 | - React-jsiexecutor (= 0.63.2)
124 | - React-jsinspector (= 0.63.2)
125 | - Yoga
126 | - React-Core/RCTActionSheetHeaders (0.63.2):
127 | - Folly (= 2020.01.13.00)
128 | - glog
129 | - React-Core/Default
130 | - React-cxxreact (= 0.63.2)
131 | - React-jsi (= 0.63.2)
132 | - React-jsiexecutor (= 0.63.2)
133 | - Yoga
134 | - React-Core/RCTAnimationHeaders (0.63.2):
135 | - Folly (= 2020.01.13.00)
136 | - glog
137 | - React-Core/Default
138 | - React-cxxreact (= 0.63.2)
139 | - React-jsi (= 0.63.2)
140 | - React-jsiexecutor (= 0.63.2)
141 | - Yoga
142 | - React-Core/RCTBlobHeaders (0.63.2):
143 | - Folly (= 2020.01.13.00)
144 | - glog
145 | - React-Core/Default
146 | - React-cxxreact (= 0.63.2)
147 | - React-jsi (= 0.63.2)
148 | - React-jsiexecutor (= 0.63.2)
149 | - Yoga
150 | - React-Core/RCTImageHeaders (0.63.2):
151 | - Folly (= 2020.01.13.00)
152 | - glog
153 | - React-Core/Default
154 | - React-cxxreact (= 0.63.2)
155 | - React-jsi (= 0.63.2)
156 | - React-jsiexecutor (= 0.63.2)
157 | - Yoga
158 | - React-Core/RCTLinkingHeaders (0.63.2):
159 | - Folly (= 2020.01.13.00)
160 | - glog
161 | - React-Core/Default
162 | - React-cxxreact (= 0.63.2)
163 | - React-jsi (= 0.63.2)
164 | - React-jsiexecutor (= 0.63.2)
165 | - Yoga
166 | - React-Core/RCTNetworkHeaders (0.63.2):
167 | - Folly (= 2020.01.13.00)
168 | - glog
169 | - React-Core/Default
170 | - React-cxxreact (= 0.63.2)
171 | - React-jsi (= 0.63.2)
172 | - React-jsiexecutor (= 0.63.2)
173 | - Yoga
174 | - React-Core/RCTSettingsHeaders (0.63.2):
175 | - Folly (= 2020.01.13.00)
176 | - glog
177 | - React-Core/Default
178 | - React-cxxreact (= 0.63.2)
179 | - React-jsi (= 0.63.2)
180 | - React-jsiexecutor (= 0.63.2)
181 | - Yoga
182 | - React-Core/RCTTextHeaders (0.63.2):
183 | - Folly (= 2020.01.13.00)
184 | - glog
185 | - React-Core/Default
186 | - React-cxxreact (= 0.63.2)
187 | - React-jsi (= 0.63.2)
188 | - React-jsiexecutor (= 0.63.2)
189 | - Yoga
190 | - React-Core/RCTVibrationHeaders (0.63.2):
191 | - Folly (= 2020.01.13.00)
192 | - glog
193 | - React-Core/Default
194 | - React-cxxreact (= 0.63.2)
195 | - React-jsi (= 0.63.2)
196 | - React-jsiexecutor (= 0.63.2)
197 | - Yoga
198 | - React-Core/RCTWebSocket (0.63.2):
199 | - Folly (= 2020.01.13.00)
200 | - glog
201 | - React-Core/Default (= 0.63.2)
202 | - React-cxxreact (= 0.63.2)
203 | - React-jsi (= 0.63.2)
204 | - React-jsiexecutor (= 0.63.2)
205 | - Yoga
206 | - React-CoreModules (0.63.2):
207 | - FBReactNativeSpec (= 0.63.2)
208 | - Folly (= 2020.01.13.00)
209 | - RCTTypeSafety (= 0.63.2)
210 | - React-Core/CoreModulesHeaders (= 0.63.2)
211 | - React-jsi (= 0.63.2)
212 | - React-RCTImage (= 0.63.2)
213 | - ReactCommon/turbomodule/core (= 0.63.2)
214 | - React-cxxreact (0.63.2):
215 | - boost-for-react-native (= 1.63.0)
216 | - DoubleConversion
217 | - Folly (= 2020.01.13.00)
218 | - glog
219 | - React-callinvoker (= 0.63.2)
220 | - React-jsinspector (= 0.63.2)
221 | - React-jsi (0.63.2):
222 | - boost-for-react-native (= 1.63.0)
223 | - DoubleConversion
224 | - Folly (= 2020.01.13.00)
225 | - glog
226 | - React-jsi/Default (= 0.63.2)
227 | - React-jsi/Default (0.63.2):
228 | - boost-for-react-native (= 1.63.0)
229 | - DoubleConversion
230 | - Folly (= 2020.01.13.00)
231 | - glog
232 | - React-jsiexecutor (0.63.2):
233 | - DoubleConversion
234 | - Folly (= 2020.01.13.00)
235 | - glog
236 | - React-cxxreact (= 0.63.2)
237 | - React-jsi (= 0.63.2)
238 | - React-jsinspector (0.63.2)
239 | - React-RCTActionSheet (0.63.2):
240 | - React-Core/RCTActionSheetHeaders (= 0.63.2)
241 | - React-RCTAnimation (0.63.2):
242 | - FBReactNativeSpec (= 0.63.2)
243 | - Folly (= 2020.01.13.00)
244 | - RCTTypeSafety (= 0.63.2)
245 | - React-Core/RCTAnimationHeaders (= 0.63.2)
246 | - React-jsi (= 0.63.2)
247 | - ReactCommon/turbomodule/core (= 0.63.2)
248 | - React-RCTBlob (0.63.2):
249 | - FBReactNativeSpec (= 0.63.2)
250 | - Folly (= 2020.01.13.00)
251 | - React-Core/RCTBlobHeaders (= 0.63.2)
252 | - React-Core/RCTWebSocket (= 0.63.2)
253 | - React-jsi (= 0.63.2)
254 | - React-RCTNetwork (= 0.63.2)
255 | - ReactCommon/turbomodule/core (= 0.63.2)
256 | - React-RCTImage (0.63.2):
257 | - FBReactNativeSpec (= 0.63.2)
258 | - Folly (= 2020.01.13.00)
259 | - RCTTypeSafety (= 0.63.2)
260 | - React-Core/RCTImageHeaders (= 0.63.2)
261 | - React-jsi (= 0.63.2)
262 | - React-RCTNetwork (= 0.63.2)
263 | - ReactCommon/turbomodule/core (= 0.63.2)
264 | - React-RCTLinking (0.63.2):
265 | - FBReactNativeSpec (= 0.63.2)
266 | - React-Core/RCTLinkingHeaders (= 0.63.2)
267 | - React-jsi (= 0.63.2)
268 | - ReactCommon/turbomodule/core (= 0.63.2)
269 | - React-RCTNetwork (0.63.2):
270 | - FBReactNativeSpec (= 0.63.2)
271 | - Folly (= 2020.01.13.00)
272 | - RCTTypeSafety (= 0.63.2)
273 | - React-Core/RCTNetworkHeaders (= 0.63.2)
274 | - React-jsi (= 0.63.2)
275 | - ReactCommon/turbomodule/core (= 0.63.2)
276 | - React-RCTSettings (0.63.2):
277 | - FBReactNativeSpec (= 0.63.2)
278 | - Folly (= 2020.01.13.00)
279 | - RCTTypeSafety (= 0.63.2)
280 | - React-Core/RCTSettingsHeaders (= 0.63.2)
281 | - React-jsi (= 0.63.2)
282 | - ReactCommon/turbomodule/core (= 0.63.2)
283 | - React-RCTText (0.63.2):
284 | - React-Core/RCTTextHeaders (= 0.63.2)
285 | - React-RCTVibration (0.63.2):
286 | - FBReactNativeSpec (= 0.63.2)
287 | - Folly (= 2020.01.13.00)
288 | - React-Core/RCTVibrationHeaders (= 0.63.2)
289 | - React-jsi (= 0.63.2)
290 | - ReactCommon/turbomodule/core (= 0.63.2)
291 | - ReactCommon/turbomodule/core (0.63.2):
292 | - DoubleConversion
293 | - Folly (= 2020.01.13.00)
294 | - glog
295 | - React-callinvoker (= 0.63.2)
296 | - React-Core (= 0.63.2)
297 | - React-cxxreact (= 0.63.2)
298 | - React-jsi (= 0.63.2)
299 | - RNShareMenu (4.1.4):
300 | - React
301 | - Yoga (1.14.0)
302 | - YogaKit (1.18.1):
303 | - Yoga (~> 1.14)
304 |
305 | DEPENDENCIES:
306 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
307 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
308 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
309 | - Flipper (~> 0.41.1)
310 | - Flipper-DoubleConversion (= 1.1.7)
311 | - Flipper-Folly (~> 2.2)
312 | - Flipper-Glog (= 0.3.6)
313 | - Flipper-PeerTalk (~> 0.0.4)
314 | - Flipper-RSocket (~> 1.1)
315 | - FlipperKit (~> 0.41.1)
316 | - FlipperKit/Core (~> 0.41.1)
317 | - FlipperKit/CppBridge (~> 0.41.1)
318 | - FlipperKit/FBCxxFollyDynamicConvert (~> 0.41.1)
319 | - FlipperKit/FBDefines (~> 0.41.1)
320 | - FlipperKit/FKPortForwarding (~> 0.41.1)
321 | - FlipperKit/FlipperKitHighlightOverlay (~> 0.41.1)
322 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.41.1)
323 | - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.41.1)
324 | - FlipperKit/FlipperKitNetworkPlugin (~> 0.41.1)
325 | - FlipperKit/FlipperKitReactPlugin (~> 0.41.1)
326 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.41.1)
327 | - FlipperKit/SKIOSNetworkPlugin (~> 0.41.1)
328 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
329 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
330 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
331 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
332 | - React (from `../node_modules/react-native/`)
333 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
334 | - React-Core (from `../node_modules/react-native/`)
335 | - React-Core/DevSupport (from `../node_modules/react-native/`)
336 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
337 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
338 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
339 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
340 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
341 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
342 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
343 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
344 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
345 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
346 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
347 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
348 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
349 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
350 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
351 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
352 | - RNShareMenu (from `../..`)
353 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
354 |
355 | SPEC REPOS:
356 | trunk:
357 | - boost-for-react-native
358 | - CocoaAsyncSocket
359 | - CocoaLibEvent
360 | - Flipper
361 | - Flipper-DoubleConversion
362 | - Flipper-Folly
363 | - Flipper-Glog
364 | - Flipper-PeerTalk
365 | - Flipper-RSocket
366 | - FlipperKit
367 | - OpenSSL-Universal
368 | - YogaKit
369 |
370 | EXTERNAL SOURCES:
371 | DoubleConversion:
372 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
373 | FBLazyVector:
374 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
375 | FBReactNativeSpec:
376 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
377 | Folly:
378 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
379 | glog:
380 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
381 | RCTRequired:
382 | :path: "../node_modules/react-native/Libraries/RCTRequired"
383 | RCTTypeSafety:
384 | :path: "../node_modules/react-native/Libraries/TypeSafety"
385 | React:
386 | :path: "../node_modules/react-native/"
387 | React-callinvoker:
388 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
389 | React-Core:
390 | :path: "../node_modules/react-native/"
391 | React-CoreModules:
392 | :path: "../node_modules/react-native/React/CoreModules"
393 | React-cxxreact:
394 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
395 | React-jsi:
396 | :path: "../node_modules/react-native/ReactCommon/jsi"
397 | React-jsiexecutor:
398 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
399 | React-jsinspector:
400 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
401 | React-RCTActionSheet:
402 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
403 | React-RCTAnimation:
404 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
405 | React-RCTBlob:
406 | :path: "../node_modules/react-native/Libraries/Blob"
407 | React-RCTImage:
408 | :path: "../node_modules/react-native/Libraries/Image"
409 | React-RCTLinking:
410 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
411 | React-RCTNetwork:
412 | :path: "../node_modules/react-native/Libraries/Network"
413 | React-RCTSettings:
414 | :path: "../node_modules/react-native/Libraries/Settings"
415 | React-RCTText:
416 | :path: "../node_modules/react-native/Libraries/Text"
417 | React-RCTVibration:
418 | :path: "../node_modules/react-native/Libraries/Vibration"
419 | ReactCommon:
420 | :path: "../node_modules/react-native/ReactCommon"
421 | RNShareMenu:
422 | :path: "../.."
423 | Yoga:
424 | :path: "../node_modules/react-native/ReactCommon/yoga"
425 |
426 | SPEC CHECKSUMS:
427 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
428 | CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
429 | CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
430 | DoubleConversion: cde416483dac037923206447da6e1454df403714
431 | FBLazyVector: 3ef4a7f62e7db01092f9d517d2ebc0d0677c4a37
432 | FBReactNativeSpec: dc7fa9088f0f2a998503a352b0554d69a4391c5a
433 | Flipper: 33585e2d9810fe5528346be33bcf71b37bb7ae13
434 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
435 | Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
436 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
437 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
438 | Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
439 | FlipperKit: bc68102cd4952a258a23c9c1b316c7bec1fecf83
440 | Folly: b73c3869541e86821df3c387eb0af5f65addfab4
441 | glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
442 | OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
443 | RCTRequired: f13f25e7b12f925f1f6a6a8c69d929a03c0129fe
444 | RCTTypeSafety: 44982c5c8e43ff4141eb519a8ddc88059acd1f3a
445 | React: e1c65dd41cb9db13b99f24608e47dd595f28ca9a
446 | React-callinvoker: 552a6a6bc8b3bb794cf108ad59e5a9e2e3b4fc98
447 | React-Core: 9d341e725dc9cd2f49e4c49ad1fc4e8776aa2639
448 | React-CoreModules: 5335e168165da7f7083ce7147768d36d3e292318
449 | React-cxxreact: d3261ec5f7d11743fbf21e263a34ea51d1f13ebc
450 | React-jsi: 54245e1d5f4b690dec614a73a3795964eeef13a8
451 | React-jsiexecutor: 8ca588cc921e70590820ce72b8789b02c67cce38
452 | React-jsinspector: b14e62ebe7a66e9231e9581279909f2fc3db6606
453 | React-RCTActionSheet: 910163b6b09685a35c4ebbc52b66d1bfbbe39fc5
454 | React-RCTAnimation: 9a883bbe1e9d2e158d4fb53765ed64c8dc2200c6
455 | React-RCTBlob: 39cf0ece1927996c4466510e25d2105f67010e13
456 | React-RCTImage: de355d738727b09ad3692f2a979affbd54b5f378
457 | React-RCTLinking: 8122f221d395a63364b2c0078ce284214bd04575
458 | React-RCTNetwork: 8f96c7b49ea6a0f28f98258f347b6ad218bc0830
459 | React-RCTSettings: 8a49622aff9c1925f5455fa340b6fe4853d64ab6
460 | React-RCTText: 1b6773e776e4b33f90468c20fe3b16ca3e224bb8
461 | React-RCTVibration: 4d2e726957f4087449739b595f107c0d4b6c2d2d
462 | ReactCommon: a0a1edbebcac5e91338371b72ffc66aa822792ce
463 | RNShareMenu: 43c83aa52d50a689b1f16b02f7815ea0406b1cc0
464 | Yoga: 7740b94929bbacbddda59bf115b5317e9a161598
465 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
466 |
467 | PODFILE CHECKSUM: f5882acce3ccb72d524e52d64e8194cbbb00bbb5
468 |
469 | COCOAPODS: 1.9.3
470 |
--------------------------------------------------------------------------------