Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to enable or disable android or ios #82

Closed
export-mike opened this issue Jul 7, 2024 · 1 comment · Fixed by #83
Closed

option to enable or disable android or ios #82

export-mike opened this issue Jul 7, 2024 · 1 comment · Fixed by #83
Labels
enhancement New feature or request

Comments

@export-mike
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch expo-share-intent@2.1.1 for the project I'm working on.

I'm using this for iOS https://github.com/MaxAst/expo-share-extension

but for android I want to use an intent filter and launch the app, so it makes sense to use expo-share-intent to launch for android and disable the plugin for ios.

Here is the diff that solved my problem:

diff --git a/node_modules/expo-share-intent/plugin/build/index.js b/node_modules/expo-share-intent/plugin/build/index.js
index b538162..950046e 100644
--- a/node_modules/expo-share-intent/plugin/build/index.js
+++ b/node_modules/expo-share-intent/plugin/build/index.js
@@ -16,9 +16,9 @@ const pkg = {
 const withShareMenu = (0, config_plugins_1.createRunOncePlugin)((config, params = {}) => {
     return (0, config_plugins_1.withPlugins)(config, [
         // IOS
-        withIosAppEntitlements_1.withAppEntitlements,
-        () => (0, withIosShareExtensionConfig_1.withShareExtensionConfig)(config, params),
-        () => (0, withIosShareExtensionXcodeTarget_1.withShareExtensionXcodeTarget)(config, params),
+        // withIosAppEntitlements_1.withAppEntitlements,
+        // () => (0, withIosShareExtensionConfig_1.withShareExtensionConfig)(config, params),
+        // () => (0, withIosShareExtensionXcodeTarget_1.withShareExtensionXcodeTarget)(config, params),
         // Android
         () => (0, withAndroidIntentFilters_1.withAndroidIntentFilters)(config, params),
         () => (0, withAndroidMainActivityAttributes_1.withAndroidMainActivityAttributes)(config, params),

This issue body was partially generated by patch-package.

@achorein
Copy link
Owner

achorein commented Jul 9, 2024

Good idea ! I'll make a PR for it!

@achorein achorein added the enhancement New feature or request label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants