react-native-share-extension: updated code is not there in npm
I just saw in lib/index.js ``` import { NativeModules } from ‘react-native’
// import ShareExtension from ‘react-native-share-extension’ // const { type, value } = await NativeModules.ShareExtension.data() // NativeModules.ShareExtension.close() export default { data: () => NativeModules.ReactNativeShareExtension.data(), close: () => NativeModules.ReactNativeShareExtension.close() }
but in the git repo the latest code is
`import { NativeModules } from 'react-native'
// import ShareExtension from 'react-native-share-extension'
// const { type, value } = await NativeModules.ShareExtension.data()
// NativeModules.ShareExtension.close()
export default {
data: () => NativeModules.ReactNativeShareExtension.data(),
close: () => NativeModules.ReactNativeShareExtension.close(),
openURL: (url) => NativeModules.ReactNativeShareExtension.openURL(url),
}`
Thats the reason openURL is not working. Can admin push the latest code into repo?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 26
@AndrewHenderson I believe I do already have npm permissions - I spoke to @alinz via email. We should get you on there as well, for sure.
I Make react-native-file-share-intent it’s Work perfectly on both platforms. It supports all media to share our App
@jvandenaardweg Does the
openUrl
method work in your app on Android?also thanks for the advice on installing from commit vs master
I am happy to just release the latest master as v2.0.0 (I assume there are breaking changes). What do you think @AndrewHenderson?
Thanks for the update. I’ve then decided to use the last commit in master
npm install https://github.com/alinz/react-native-share-extension.git\#3db5320135c154c367d72c44688a29ce41b210e7 --save
Seems to be working fine in my app 👍 Needed the
openUrl
method, that’s not available in 1.2.1I would advice people to not use
#master
when using a github repo as an npm package as stated above in the comments, as the master branch may include breaking changes in the future, breaking your app on a new install. A commit is more strict.@AndrewHenderson Looks good, glad to hear that the bug was indeed (hopefully) isolated to 1e98f58. Let’s focus on putting together a stable release, and then getting out the “stable” features (like openURL) which have been sitting in PRs for a long time.
hey, what about
"react-native-share-extension": "github:alinz/react-native-share-extension"
in dependencies in package.json?@dfabarbosa I fixed it by adding the scripts in the extension build phase. Now i don’t have any more issues. Great Repo! Very big thanks to the developer.