react-native-share-menu icon indicating copy to clipboard operation
react-native-share-menu copied to clipboard

iOS app is not building with new architecture in react native 0.72.6

Open singh-sukhmanjit opened this issue 1 year ago • 20 comments

React Native 0.72.6 Xcode 15 New architecture enabled

App builds successfully with old architecture but gives following error with new architecture while building -

image

Below is the podspec for Share Extension

target 'ShareExtension' do
  use_react_native!

  pod 'RNShareMenu', :path => '../node_modules/react-native-share-menu'
end

singh-sukhmanjit avatar Jan 08 '24 13:01 singh-sukhmanjit

Yeah, the project does not currently support the new architecture. If you'd like to follow along, we're tracking support for this in #293.

lindboe avatar Jan 18 '24 00:01 lindboe

Hi @lindboe , what is the latest react-native version compatible with the [email protected]? is it [email protected] as shown in the example? thanks

mhsfh avatar Jan 20 '24 21:01 mhsfh

@mhsfh if you're not using the new architecture, which is not required by recent react native, you can use the latest version of react native with a few patches to this library (using patch-package). Check out the list in Phase 0 for the PRs that fix those issues, you can copy their fix as a patch for now: https://github.com/Expensify/react-native-share-menu/issues/294

lindboe avatar Jan 22 '24 19:01 lindboe

@lindboe I made it work, thank you so much 🙏

mhsfh avatar Jan 22 '24 19:01 mhsfh

@lindboe I made it work, thank you so much 🙏

Can you describe the path you fallowed?

EKOzkan avatar Jan 27 '24 10:01 EKOzkan

@lindboe I made it work, thank you so much 🙏

Can you describe the path you fallowed?

for android I had to apply this patch:

diff --git a/android/build.gradle b/android/build.gradle
index 9557fdbf2fbf97b7f7aeaf7ce86d301a8ced213d..8adad42908c0d73c535c30f01c5437e2a7d9f33f 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,7 +1,7 @@
 apply plugin: 'com.android.library'
 
 android {
-    compileSdkVersion 29
+    compileSdkVersion rootProject.ext.compileSdkVersion
     buildToolsVersion "29.0.2"
 
     defaultConfig {

are you facing ios errors?

mhsfh avatar Jan 27 '24 20:01 mhsfh

@lindboe I made it work, thank you so much 🙏

Can you describe the path you fallowed?

for android I had to apply this patch:

diff --git a/android/build.gradle b/android/build.gradle
index 9557fdbf2fbf97b7f7aeaf7ce86d301a8ced213d..8adad42908c0d73c535c30f01c5437e2a7d9f33f 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,7 +1,7 @@
 apply plugin: 'com.android.library'
 
 android {
-    compileSdkVersion 29
+    compileSdkVersion rootProject.ext.compileSdkVersion
     buildToolsVersion "29.0.2"
 
     defaultConfig {

are you facing ios errors?

Yeah, I've been trying to get this package to work on iOS for several days. I've experimented with different React Native versions, various projects, and different paths, but unfortunately, I haven't had any luck with it.

EKOzkan avatar Jan 27 '24 22:01 EKOzkan

@EKOzkan am using react-native-share-menu 6.0.0 with react-native 0.72.6. what issue are you facing?

singh-sukhmanjit avatar Feb 02 '24 10:02 singh-sukhmanjit

@EKOzkan am using react-native-share-menu 6.0.0 with react-native 0.72.6. what issue are you facing?

Hello @singh-sukhmanjit here to me I'm facing with "'RNShareMenu-Swift.h' file not found" message when I try build iOS.

React-Native 0.72 Xcode 15.3 Apple M3

It's happen in file "node_modules/react-native-share-menu/ios/ShareMenuManager.m" line 9: #import "RNShareMenu-Swift.h"

Where is this file?

RobledoFootbao avatar Mar 22 '24 22:03 RobledoFootbao

image

RobledoFootbao avatar Mar 24 '24 04:03 RobledoFootbao

I can't get it to build with the custom view config either.

RN 0.73.6

Screenshot 2024-03-28 at 3 09 05 PM

jorgegvallejo avatar Mar 28 '24 21:03 jorgegvallejo

Found Pull Request #260 witch fixes this issue:

image

LukasB-DEV avatar Apr 24 '24 12:04 LukasB-DEV

Found Pull Request #260 witch fixes this issue:

image

So it works for you with the new arch enabled?

jorgegvallejo avatar May 06 '24 15:05 jorgegvallejo