react-native-share-menu
react-native-share-menu copied to clipboard
No such module 'RNShareMenu'
hi, i find this error on xcode, how can i fix it?
![Schermata 2021-08-02 alle 11 03 55](https://user-images.githubusercontent.com/32598073/127834840-c354b7cc-1dd9-463c-83c1-546a3fca0842.png)
Same problem.
same issue, couldn't find a workaround
The issues seems to come from misaligned Deployment Target.
Those 4 needs to match:
- App target
- App Project
- ShareExtension target
- Podfile
platform :ios, '11.0'
![Capture d’écran 2021-09-09 à 14 22 48](https://user-images.githubusercontent.com/662377/132685110-b0f741b1-8a84-4017-a55d-26c3d0a6a103.png)
![Capture d’écran 2021-09-09 à 14 22 30](https://user-images.githubusercontent.com/662377/132685122-ab2a9e3a-64f5-45c2-a3d5-f81c6d262393.png)
Mine are all on 11.0 and this doesn't seem to resolve this issue.
Mine are all on 11.0 and this doesn't seem to resolve this issue.
did you check all 4?
Yes, but for me, I just checked it was the Podfile not being correct. A recent git merge removed the additional code for me. I'm referring to this:
post_install do |installer| react_native_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
end
end
end
end
target 'SHARE_EXTENSION' do
use_react_native!(
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => true
)
pod 'RNShareMenu', :path => '../node_modules/react-native-share-menu'
# Manually link packages here to keep your extension bundle size minimal
end
This is resolved for me :)
I fixed this after a full day of searching on a Mac M1:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '$(inherited)'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
Hi all I've tried all the workarounds here, and none work, I'm still stuck without being able to build with the same error as the OP
/.../node_modules/react-native-share-menu/ios/ReactShareViewController.swift:10:8: error: no such module 'RNShareMenu'
import RNShareMenu
^
This is the case when building with the command line as well as building within XCode
Any hints ?
Xcode: 13.3.1 M1 Pro
Increasing deployment targets to 11.0 on both the main project AND the share extension finally worked for me
I have this problem too on last 6.0.0
<unknown>:0: error: module map file '/Users/username/Library/Developer/Xcode/DerivedData/Projectname-fstvewgwphvmyzbeiiueojksdirp/Build/Products/Debug-iphoneos/RNShareMenu/RNShareMenu.modulemap' not found
Command PrecompileSwiftBridgingHeader emitted errors but did not return a nonzero exit code to indicate failure
Solution: I find my mistake open *.xcodeproj, but need *.xcworkspace :-)
Unfortunately nothing helped so far for me. I was able to resolve "No such module 'RNShareMenu' " error by starting Xcode with "Rosetta".
But I still receive the two errors: "RNShareMenu.modulemap'" not found and "Command SwiftGeneratePch emitted errors but did not return a nonzero exit code to indicate failure".
Does someone has any idea?
IOS 13.0.1 Xcode 14.1 M1 Pro
Thanks in advance
Same issue, any solution yet?